-
-
Save Bioblaze/b8ef24d66261f798fa79e25b6531c63c to your computer and use it in GitHub Desktop.
ffmpeg cheat sheet
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
# Encode a video in H.264 with a constant rate factor of 0 (visually non-lossy), run it through a filter for deinterlacing (Weston | |
# Three-Field), and do not re-encode the audio | |
ffmpeg -i input.mkv -c:v libx264 -crf 0 -filter:v w3fdif -c:a copy output_edit-x264-crf0-w3fdif.mkv | |
# H.264 video at an average bitrate of 25MB/s, and just copy the audio | |
# - `-an` disables audio on first pass | |
# - `-y` automatically overwrites an existing output file, but don't worry since it's /dev/null on the first pass | |
ffmpeg -y -i input.mkv -c:v libx264 -b:v 25000k -pass 1 -an -f mp4 /dev/null && \ | |
ffmpeg -i input.mkv -c:v libx264 -b:v 25000k -pass 2 -c:a copy output_edit-x264-abr25000.mkv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment