Created
January 18, 2020 09:02
-
-
Save oseiskar/7ccad344d2d010f3c3aa818e4e231539 to your computer and use it in GitHub Desktop.
Miscellaneous FFmpeg scripts
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
# record lossless video to screengrab.mp4 after waiting 5 seconds, override without asking | |
sleep 5 && \ | |
ffmpeg -y -video_size 1920x1080 -framerate 25 -f x11grab -i $DISPLAY -c:v libx264 -crf 0 -preset ultrafast screengrab.mp4 | |
# lossless encoding of screengrab.mp4 with high quality, no audio ("-an", instead of "-c:a copy") | |
# CRF: "For x264, sane values are between 18 and 28. The default is 23" | |
# from start to 2 minutes | |
ffmpeg -ss 00:00:00 -i screengrab.mp4 -t 00:02:00 -c:v libx264 -preset slow -crf 22 -an output.mp4 | |
# change video container without re-encoding | |
ffmpeg -i video.mkv -codec copy video.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment