Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to use ffmpeg.wasm in vue+Vue-cli? #855

Unanswered
yupengfei9147 asked this question in Q&A
Discussion options

We meet a problem by a problem when we try to use ffmpeg.wasm for video compress in our front project.The project use vue+vue-cli.Have anyone used ffmpeg.wasm 0.12x version in your vue+vue-cli project successfully?

You must be logged in to vote

Replies: 1 comment 1 reply

Comment options

I think I have figured it out, but there were many errors along the way, and the right way depends on your exact setup. Say more about the errors you are seeing, including console output, as well as the URLs you are using. For instance, I am loading index.html from localhost:8000 (python backend) but all JS is grabbed from localhost:5173 (Vite), and that is causing some problems. The ffmpeg worker files are set to fetch from unpkg, which causes other problems.

You must be logged in to vote
1 reply
Comment options

I copy the demo code to my project

ffmpeg.on("log", ({ message: msg }) => {
message.value = msg;
totalTime.value = (new Date().getTime() - startTime) / 1000;
});
await ffmpeg.load({
coreURL: await toBlobURL(${baseURL}/ffmpeg-core.js, "text/javascript"),
wasmURL: await toBlobURL(${baseURL}/ffmpeg-core.wasm, "application/wasm"),
workerURL: await toBlobURL(${baseURL}/ffmpeg-core.worker.js, "text/javascript"),
});

when executed ffmpeg.load,I got problem from console like below:
Uncaught (in promise) Error: Cannot find module"http://10.18.2.208:8080/c293e02d-2742-47c0-9e255-b7cbfe713d06

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /