ffmpeg合并两个不同分辨率mp4,且保证视频不变形

跟小伙伴折腾了一天..特此记录一下

ffmpeg -i 1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts tmp1.ts
ffmpeg -i 2.mp4 -c:v libx264 -vf scale=720:1080 -f mpegts tmp2.ts
ffmpeg -threads 2 -i "concat:tmp1|tmp2"  -vf "scale=720:1080:force_original_aspect_ratio=decrease,pad=720:1080:(ow-iw)/2:(oh-ih)/2" -pix_fmt yuvj420p -shortest -y out1.mp4

本文链接:

https://logs.ee/tool/20220412/fuck-ffmpeg.html
1 + 2 =
快来做第一个评论的人吧~