Open Livijn opened 9 months ago
Getting the same error, seems to be to do with this line specifically:
ffmpeg.on('log', ({type, message}) => { console.log(type, message); });
Any ideas?
I also met problem when trying vue-vite-app. I just downloaded the project from below, but got problem: ffmpeg.exec seems just can not be executed, since I added console.log before and after the line, the before log can be printed, but the after log is NOT printed.
There is NO any error info on the console. How to resolve or any bug? I am on windows 11, 64 bit.
https://github.com/ffmpegwasm/ffmpeg.wasm/tree/main/apps/vue-vite-app
the pnpm list output is:
D:\gitrepository\ffmpeg.wasm-main\apps\vue-vite-app>pnpm list
Legend: production dependency, optional only, dev only
vue-vite-app@0.0.0 D:\gitrepository\ffmpeg.wasm-main\apps\vue-vite-app (PRIVATE)
dependencies:
@ffmpeg/ffmpeg 0.12.10
@ffmpeg/util 0.12.1
vue 3.4.21
devDependencies:
@rushstack/eslint-patch 1.7.2 @vue/eslint-config-prettier 9.0.0 npm-run-all 4.1.5
@tsconfig/node18 18.2.2 @vue/eslint-config-typescript 12.0.0 prettier 3.2.5
@types/node 20.11.29 @vue/tsconfig 0.5.1 typescript 5.3.3
@vitejs/plugin-vue 5.0.4 eslint 8.57.0 vite 4.5.2
@vitejs/plugin-vue-jsx 3.1.0 eslint-plugin-vue 9.23.0 vue-tsc 1.8.27
The node version:
D:\gitrepository\ffmpeg.wasm-main\apps\vue-vite-app>node -v
v20.11.1
Solved using Composition API by not having ffmpeg
be reactive
Changed this line in my code:
const ffmpeg = ref(new FFmpeg())
to:
const ffmpeg = new FFmpeg()
It's ok though to use shallowRef, e.g. const ffmpeg = shallowRef(new FFmpeg())
If using Options API, ffmpeg
should be declared outside of the component options
const ffmpeg = new FFMpeg()
export default {
...
}
Then replace all instances of this.ffmpeg
with just ffmpeg
Describe the bug I am receiving this error when trying to use this library:
To Reproduce I am using a slightly modified version of https://github.com/ffmpegwasm/ffmpeg.wasm/blob/main/apps/vue-vite-app.
Desktop (please complete the following information):