Last active
January 19, 2022 15:05
-
-
Save charlee/4522801 to your computer and use it in GitHub Desktop.
ffmpeg tips
This file contains hidden or 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
# losslessly concat mp4 files | |
ffmpeg -i input1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts | |
ffmpeg -i input2.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts | |
ffmpeg -i "concat:intermediate1.ts|intermediate2.ts" -c copy -bsf:a aac_adtstoasc output.mp4 | |
# encode Xvid | |
ffmpeg -i input.avi -c:v mpeg4 -vtag xvid -b:v 600k -c:a libmp3lame output.avi | |
# encode h264 | |
ffmpeg -i input.avi -c:v libx264 -preset ultrafast -crf 22 -c:a copy output.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment