Last active
December 11, 2018 23:47
-
-
Save thomersch/43e6dbc1b6b2ec9ffb00e92659765b81 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
# average bit rate encoding | |
ffmpeg -i $INPUT -c:v libx264 -b:v $BITRATE $OUTPUT.mp4 | |
# mux | |
ffmpeg -i video.mov -i audio.flac -c:v copy -c:a aac muxed.mp4 | |
ffmpeg -i video.mov -i audio.flac -c copy muxed.mkv # mkv takes any codec combination | |
# remux | |
ffmpeg -i v.mp4 -i a.wav -c:v copy -map 0:v:0 -map 1:a:0 new.mp4 | |
# demux | |
ffmpeg -i video.mov -vn -c:a copy audio.wav | |
# remove audio | |
ffmpeg -i input.mov -c:v copy -an output.mov | |
# Timelapse from images | |
ffmpeg -r 24 -pattern_type glob -i '*.JPG' -vcodec libx264 timelapse.mp4 | |
# Batch Convert to H.265 | |
for i in *.MOV; do ffmpeg -i $i -c:v libx265 -crf 17 $i.mp4; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment