Created
May 24, 2016 22:38
-
-
Save bennylope/2987dfa723e23c9480b3478ffe00799f to your computer and use it in GitHub Desktop.
A short helper script to decode QuickTime .mov files to mp4 files using default settings. Good for creating short screencasts.
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
#!/bin/bash | |
# | |
# A short helper script to decode QuickTime .mov files to mp4 files using default settings. | |
# | |
# Usage: | |
# ./trim-movie.sh path/to/source.mov path/to/destination.mp4 | |
# ./trim-movie.sh path/to/source.mov path/to/destination.mp4 1080 | |
# | |
# The optional third paramater is width. You may need to respecify this if you encounter | |
# divisibility by 2 errors. Not sufficiently motivated to bother checking the size and | |
# correcting in the script! | |
# | |
# Author: Ben Lopatin | |
# License: Public domain | |
# | |
ffmpeg -i "$1" -vf scale=${3:-720}:-1 -vcodec h264 -acodec aac -strict -2 "$2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment