0

I have a video file(V1) and two stereo audio files(A1 & A2). I'm trying to output a movie with the video content and duration from V1, and I want to set A1's audio to the left channel and A2's audio to the right channel, even if those sources are originally stereo.

I've been playing around with the stereotools and pan filters but I'm honestly having trouble deciphering the documentation. Any help is appreciated.

2
  • 1
    It would probably help if you edited the question to show what you've actually tried so far
    – hardillb
    Apr 30, 2018 at 21:44
  • I didn't even get to a point that was worth sharing unfortunately.
    – wsmith
    Apr 30, 2018 at 22:05

1 Answer 1

1

I think I've got it or pretty close at least. I still need to figure out how to control the duration but the -shortest flag encodes it at the shortest duration which is actually what I need in this case.

ffmpeg -i video.mov -i audio1.wav -i audio2.wav -filter_complex "[1:a][2:a]amerge=inputs=2,pan=stereo|c0<c0+c1|c1<c2+c3[aout]" -map 0:v -map "[aout]" -shortest output.mp3
1
  • To make sure that the video stream isn't clipped, you should pad the audio i.e. pan=stereo|c0<c0+c1|c1<c2+c3,apad[aout]
    – Gyan
    May 1, 2018 at 5:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .