Upgrading to 0.12 with scripts on a different domain (vite, python) #856
incidentist
started this conversation in
General
Replies: 1 comment
-
I will also note that I did not need this in my vite config:
I admit, I'm unsure exactly what this does, so maybe if I include it it makes the bundle smaller or something. But leaving it out doesn't seem to break anything. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I had a bad time upgrading to 0.12. I ended up consulting many issues in this repo, but am documenting all the missteps in one place. The trouble mostly stemmed from the fact that my app in dev mode fetches index.html from the python backend (localhost:8000) but loads all scripts via the Vite server (localhost:5173) for speed. This causes CORS problems. The other main problems I had are:
ffmpeg-core.js
,ffmpeg-core.worker.js
andworker.js
. It is easy to get these mixed up.Here's what worked for me:
Then, you need to copy
worker.js
as well as a few files it requires, to wherever assets are served from on your backend:You can probably concat all these into one file somehow. Note that if the worker.js code changes, you'll have to do this step again to update it.
THEN, your call to ffmpeg needs to manually set the # of threads. If you don't do this, you may see ffmpeg initialize in your logs, but no actually video processing will happen.
I hope this is helpful. Thank you to everyone who gave input on these bugs on the various scattered issues I looked at (too many to list here). I think the low-hanging fruit that will make this stuff easier in the future is: 1) clearer docs about the different args to
load()
, and 2) worker.jsonmessage
makes a lot of assumptions about the structure of the data it receives. If it receives something structured differently, it fails silently. It should be louder.Beta Was this translation helpful? Give feedback.
All reactions