Created
July 1, 2016 00:23
-
-
Save lopezpdvn/bbbf72e2ccc33c0e35b130eba0108e59 to your computer and use it in GitHub Desktop.
Compress raw video into Matroska container
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
date >> log.txt | |
echo 'Starting job' >> log.txt | |
sudo systemctl stop fahclient.service | |
sudo systemctl status --full fahclient.service | |
for src in *avi ; do | |
date >> log.txt ; | |
echo "Starting conversion for $src" >> log.txt ; | |
dst="$(echo $src | sed -e 's/\.avi$//')".mkv ; | |
ffmpeg -ac 2 -channel_layout stereo -i "$src" -c:v libx264 -preset slow -crf 17 -pix_fmt yuv422p -c:a pcm_s16le "$dst" ; | |
date >> log.txt ; | |
echo "Finished conversion, created $dst" >> log.txt ; | |
done | |
sudo systemctl start fahclient.service | |
sudo systemctl status --full fahclient.service | |
date >> log.txt | |
echo 'Ended job' >> log.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment