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

前端 未结 2 1454
眼角桃花
眼角桃花 2020-12-16 16:34

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         


        
相关标签:
2条回答
  • 2020-12-16 16:54

    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
    
    0 讨论(0)
  • 2020-12-16 16:54

    Here is one more simple way https://stackoverflow.com/a/48853654/6465520

    ffmpeg -i input1.mp4 -i input2.mp4 -filter_complex "[0:v]scale=1024:576:force_original_aspect_ratio=1[v0]; [1:v]scale=1024:576:force_original_aspect_ratio=1[v1]; [v0][0:a][v1][1:a]concat=n=2:v=1:a=1[v][a]" -map [v] -map [a] output.mp4
    

    So, first you scale all input videos to the same resolution and then concatenate them.

    0 讨论(0)
提交回复
热议问题