Last active
March 16, 2016 10:28
-
-
Save tracend/77ef8cb8830cd8558a33 to your computer and use it in GitHub Desktop.
FFMPEG cheat sheet
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
# Convert MP4 to 1080p | |
# source: http://askubuntu.com/a/353282 | |
ffmpeg -i {{input.mp4}} -strict -2 -codec:v libx264 -crf 12 -preset medium -movflags faststart -vf scale=-1:1080,format=yuv420p {{output.mp4}} | |
# better compression | |
ffmpeg -i {{input.mp4}} -strict -2 -codec:v libx264 -crf 22.5 -movflags faststart -vf scale=-1:1080,format=yuv420p {{output.mp4}} | |
# split mp4 file | |
ffmpeg -i {{input.mp4}} -acodec copy -vcodec copy -ss 0 -t 00:00:00 {{output.mp4}} | |
# concat two mp4 files | |
cat 1.mp4 2.mp4 | ffmpeg -f concat -i - -c copy output | |
# convert ogv to mp4 | |
ffmpeg -i {{input.ogv}} -vcodec libx264 {{output.mp4}} | |
# convert mp4 to ogv | |
ffmpeg -i {{input.mp4}} -codec:v libtheora -qscale:v 7 -codec:a libvorbis -qscale:a 5 {{output.ogv}} | |
# - better conversion | |
ffmpeg -i {{input.mp4}} -codec:v libtheora -crf 22.5 -movflags faststart -vf scale=-1:144 -codec:a libvorbis -qscale:a 5 {{output.ogv}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment