0
I want to output a video file with multiple sounds, but put them in one channel.
I've tried couple ways to do it, but I'm always given a video with multiple sound streams.
Like this
My command is
ffmpeg -r 30 -i test_%03d.png
-itsoffset 10 -ss 5 -t 20 -i s01.wav
-itsoffset 15 -ss 10 -t 30 -i s02.wav
-map 0:v -map 1:a:0 -map 2:a:0 -c:v libopenh264 -c:a mp3 test.mp4
New command test
-framerate 30 -i test_%03d.png -ss 0.2 -t 1 -i sound01.wav -ss 1 -t 2 -i sound02.wav
-filter_complex
"[1] aformat=sample_fmts=s16p:sample_rates=44100:channel_layouts=mono [a1];
[2] aformat=sample_fmts=s16p:sample_rates=44100:channel_layouts=mono [a2];
[a1]adelay=400|400,apad[b1];
[a2]adelay=900|900[b2];
[b1][b2]amerge=2[a]"
-map 0:v -map "[a]" -c:v libopenh264 -c:a mp3 -ac 2 output.mp4
Because filters could not choose their formats error occurred, I added aformat to the command. But now another error is happening, No channel layout for input 1 and output video lacks sound01, please help me out!
It works after changing channel_layouts=mono to stereo, but I'm still given No channel layout for input 1 error. – Ives – 2017-12-25T06:26:46.757