Last active
January 18, 2017 09:27
-
-
Save redeemedfadi/d1cbbad63abe102c4db7 to your computer and use it in GitHub Desktop.
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
for f in $@ | |
do | |
echo "Compressing: $f" | |
mdate=$(GetFileInfo -m "$f") | |
avconvert --preset PresetAppleM4V1080pHD -s $f -o "compressed_$f" | |
SetFile -m "$mdate" -d "$mdate" "compressed_$f" | |
# Uncomment the following line to overwrite original file with new compressed version | |
# mv "compressed_$f" "$f" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do you use a Canon DSLR to take 1080p video and use OS X?
The size of the produced video files are huge (around 350MB/min)!
Run this script to compress all those videos up to 4.5x smaller in size without any visible quality loss!
For example, a video of length 8:27 is 2.98GB. After compression the file is 655MB!
Requires OSX
bash compress-mov.sh *.MOV
Also requires Xcode in order to preserve created/modified dates.
If you don't want to install Xcode, comment out lines 4 and 6. However, your videos will be dated today.