kylemanna
8/23/2014 - 3:28 PM

transcode-wtv-to-x264.sh

#!/bin/bash
#
# Re-encode all the *.wtv videos (from Windows Media Center) in the current
# directory to x264 videos (approx 3-4x savings) with no observable degradation
#
crf=24
preset=slow
set -x
for i in *.wtv; do
    nice ionice \
        ffmpeg -y -i "$i" \
        -c:v libx264 -preset $preset -crf $crf -c:a copy -sn "${i%%.wtv}.crf${crf}.mkv"
done