Created
October 25, 2017 13:13
-
-
Save jtebert/9b70861dbfe1ef07e1ea369a3dffd599 to your computer and use it in GitHub Desktop.
A simple video compression script using ffmpeg (similar to resizer.sh)
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 simple video compression script using ffmpeg (similar to resizer.sh) | |
# INPUTS: input_files width output/path | |
# EXAMPLE: compressor "videos/*.mp4" 1280 "videos/compressed" | |
mkdir -p $3 | |
for i in $1; | |
do | |
path=${i%.*} | |
name=${path##*/} | |
ffmpeg -i "$i" -vcodec h264 -vf scale=$2:-1 -an $3/$name.mp4; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment