ffmpegwasm / ffmpeg.wasm

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

What is the correct way to concat (merge) two audio (or video) files? #250

Open ttodua opened 3 years ago

ttodua commented 3 years ago

Basically, I want to concat two audio files (lets say, file1.mp3 and file2.mp3) , what is the correct code to achieve that?

(as a bonus, will be nice a way to concat mp4 files too). [I've only seen this thread, and even closed without answer.]

kosso commented 3 years ago

See the concatDemuxer examples for browser and node. You'll see it needs to create a temporary text file list to use with concat.

browser: https://github.com/ffmpegwasm/ffmpeg.wasm/blob/master/examples/browser/concatDemuxer.html node: https://github.com/ffmpegwasm/ffmpeg.wasm/blob/master/examples/node/concatDemuxer.js

rudolp-tmQ commented 1 year ago

@kosso I tried the example however I got this error image

james-spears commented 1 year ago

I got a very similar error and was able to get the example to work by changing the file name to one with no spaces.

muhammedenes619 commented 8 months ago

i have the same issue did you solve it yet??

Gricardov commented 2 months ago

The links are broken. Can you reopen them again please?

Gricardov commented 2 months ago

i have the same issue did you solve it yet??

Do you have the working code? It was deleted from the branch