ffmpeg - Input link in1:v0 parameters (size 640x64

2020-02-12 04:57发布

问题:

I'm trying to concat 4 mp4 files. I'm using the command below but not able to concat

ffmpeg -i new1.mp4 -i new2.mp4 -i new3.mp4 -i new4.mp4 -filter_complex concat=n=4:v=1:a=1 output.mp4

Getting this error :

Input link in1:v0 parameters (size 640x640, SAR 16:9) do not match the corresponding output link in0:v0 parameters (640x640, SAR 427:240)

All four vides has the same codec and same size (640x640) and the same bitrate (30)

What I am doing wrong?

回答1:

The inputs don't have identical sample aspect ratios. Try

ffmpeg -i new1.mp4 -i new2.mp4 -i new3.mp4 -i new4.mp4 -filter_complex \
        "[0]setdar=16/9[a];[1]setdar=16/9[b];[2]setdar=16/9[c];[3]setdar=16/9[d]; \
         [a][b][c][d]concat=n=4:v=1:a=1" output.mp4


标签: ffmpeg