FFMPEG: How to convert M2V Video with two single WAV tracks (stereo) to MP4?

467 Views Asked by At

How can I create a MP4 file with ffmpeg out of a M2V-Video-File and two WAV-Files (one file for the right audio channel and one for the left audio channel)?

1

There are 1 best solutions below

2
AudioBaton On BEST ANSWER

try this:

ffmpeg -i video.m2v -i audio1.wav -i audio2.wav -c:v copy -c:a aac -map 0:v:0 -filter_complex "[1:a][2:a]join=inputs=2:channel_layout=stereo[a]" -map "[a]" output.mp4

I believe mp4 files cannot contain PCM audio, hence converting to aac.