ffmpeg.wasm icon indicating copy to clipboard operation
ffmpeg.wasm copied to clipboard

Compressing audio files is very slow

Open danyardo2 opened this issue 2 years ago • 1 comments

Hey guys, I am trying to “compress” audio files (wav) by lowering their sample rate (from 8k to 3k). But while I do that using ‘react’ and @ffmpeg/ffmpeg, the time that it takes for ffmpeg to do so is very long.

The commands i was running:


ffmpeg.FS(“writeFile”, “test.wav”, await fetchFile(“http://localhost:3003/sample.wav”));

await ffmpeg.run(“-i”, “test.wav”, “-ar”, “3000”, “output.wav” )

I would love to get some help about this issue, i saw there is an option for some type of threaded running of ffmpeg, maybe some of you know more about that?

danyardo2 avatar Aug 16 '22 12:08 danyardo2

I'm having the same issue. I wonder why it takes too long. since it's WASM, I expected it to be shorter...

MatanelGordon avatar Aug 16 '22 13:08 MatanelGordon

Hi, did you find any solution to improve compression performances?

vadd98 avatar Mar 30 '23 17:03 vadd98