ffmpegwasm / ffmpeg.wasm

FFmpeg for browser, powered by WebAssembly
https://ffmpegwasm.netlify.app
MIT License
14.19k stars 831 forks source link

In multithreading mode(core-mt), there are still some issues present #654

Open xifanii opened 9 months ago

xifanii commented 9 months ago

Describe the bug Thank you very much for the updates in version 0.12.8, which have resolved many issues! I tried running it in 'react-vite-app' and it worked fine with the original sample files. However, when I adapted it to replace the sample with my own AVI video(bigger size), it didn't complete the task when using the core-mt multithreading mode. There were no issues when I didn't use the multithreading mode.

my sample file: stock-footage.avi.zip

Screenshots Change example code:

image

When using core-mt(work fail):

image

When using core(work success):

image

Desktop (please complete the following information):

foureight84 commented 9 months ago

I am currently facing the same a similar issue with with core-mt on nextjs. Transcoding works as expected on single thread but when I switch to the multithread library it seems to just stops after loading the video file.

image

foureight84 commented 9 months ago

Describe the bug Thank you very much for the updates in version 0.12.8, which have resolved many issues! I tried running it in 'react-vite-app' and it worked fine with the original sample files. However, when I adapted it to replace the sample with my own AVI video(bigger size), it didn't complete the task when using the core-mt multithreading mode. There were no issues when I didn't use the multithreading mode.

my sample file: stock-footage.avi.zip

Screenshots Change example code: image When using core-mt(work fail): image When using core(work success): image

Desktop (please complete the following information):

  • OS: macOS Monterey 12.3
  • Browser: Chrome 119.0.6045.159 (arm64)
  • Version: 0.12.8

set "-threads", "4" flags to your ffmpeg.exec. This ended up working for me. https://github.com/ffmpegwasm/ffmpeg.wasm/issues/597#issuecomment-1809161507

xifanii commented 8 months ago

Describe the bug Thank you very much for the updates in version 0.12.8, which have resolved many issues! I tried running it in 'react-vite-app' and it worked fine with the original sample files. However, when I adapted it to replace the sample with my own AVI video(bigger size), it didn't complete the task when using the core-mt multithreading mode. There were no issues when I didn't use the multithreading mode. my sample file: stock-footage.avi.zip Screenshots Change example code: image When using core-mt(work fail): image When using core(work success): image Desktop (please complete the following information):

  • OS: macOS Monterey 12.3
  • Browser: Chrome 119.0.6045.159 (arm64)
  • Version: 0.12.8

set "-threads", "4" flags to your ffmpeg.exec. This ended up working for me. #597 (comment) It doesn't work for me

ongnxco commented 7 months ago

Its work for me

ffmpeg -i input.avi -c:v copy -c:a copy OUTPUT.mp4
anujpahade commented 4 months ago

Same issue. The playground example for multi-threading doesn't work on Google Chrome. It works fine on Firefox.

Single threaded version works on both.