Created
January 19, 2024 22:33
-
-
Save mwender/c00f2227a1097aab2dd719adf77aded4 to your computer and use it in GitHub Desktop.
[Optimize video files with ffmpeg] One liners for optimizing video files from your command line. #cli
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
# Reduce the filesize of your .mov and convert to .mp4 | |
# | |
$ ffmpeg -i input.mov -vcodec h264 output.mp4 | |
# Adjust the resolution of your .mov and convert to .mp4 | |
# | |
# - The following sets the width to 1280px with the | |
# height adjusting appropriately. | |
# - scale={$width}:{$height} - Specify one value and set | |
# the other to -1 to scale proportionately | |
# | |
$ ffmpeg -i input.mov -vf scale=1280:-1 -vcodec h264 output.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment