Last active
July 26, 2024 16:55
-
-
Save edsu/6be2d12042ac7bd7a3c0dff6582414e8 to your computer and use it in GitHub Desktop.
Concat two mp4 files with different resolutions.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# concatenate two videos with different resolution | |
ffmpeg -i part1.mp4 -i part2.mp4 -filter_complex "[0]scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1[v0];[1]scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1[v1];[v0][0:a:0][v1][1:a:0]concat=n=2:v=1:a=1[v][a]" -map "[v]" -map "[a]" out.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment