[FFmpeg-user] Extract sound from multiple input files

turgut kalfaoğlu turgut at kalfaoglu.com
Mon Apr 29 12:28:31 EEST 2024


Hi. I have an interesting case. I need to extract sound from multiple 
input files,  combine those video files into one, and then re-insert the 
audio into the combined video file.

Unfortunately I need to do them in this order. Extract sounds, then 
combine the input videos, then add sound back to the resulting video.

Can someone help me the first step?

I tried this:

$ ffmpeg -i resized/360_0233.MP4   -i resized/360_0234.MP4   -i 
resized/360_0235.MP4 -vn -map 0:a   tmpsound.mp3

but it only extracted the first file's audio.

Ideally I'd like to end up with 1 audio file for all these inputs. But 
if that's not possible, multiple output files are OK, as long as I can 
figure out how to insert them into the combined video afterwards :)

I'd appreciate any help.

-turgut



More information about the ffmpeg-user mailing list