[FFmpeg-user] Mixing two audio files to left/right channels, but using a (stream-copied) video from a third input

Alfredo Di Napoli alfredo.dinapoli at gmail.com
Mon Nov 24 17:04:24 CET 2014

Hello everyone,

and sorry if the title is convoluted, I couldn't find a better one. What
I'm trying to accomplish is simple, in practice: Assume I have three files:
- Left_Audio.mp3
- Right_Audio.mp3
- Video.mov

(Extensions are not important). What I would like to achieve is to come up
with a CLI command which would give me a resulting video such that:

- The left audio channel of the output will be mixed from  Left_Audio.mp3
- The right audio channel of the output will be mixed from Right_Audio.mp3
- The video will be a stream copy of Video.mov

To be even clearer, I guess what I need is something along the lines of
what's described here (covers exactly my audio needs) but with the extra
step of the video copy:


(last picture of the section, where we send FL and FR of input 0 to FL of
output 0 and so on and so forth.

If what I'm looking for is not possible with a single pass, I would also
accept a simplification:
- Generate the audio mix, produce an intermediate file and then create a
new output obtained with the resulting audio mix plus the aforementioned
stream copy of the video.

Is that possible?
Thanks in advance!

Alfredo Di Napoli

More information about the ffmpeg-user mailing list