Skip to content

Instantly share code, notes, and snippets.

View c-kr's full-sized avatar

Christopher Kreft c-kr

  • Oldenburg, Germany
View GitHub Profile
@c-kr
c-kr / mts2mp4.sh
Created October 1, 2019 22:03
Convert mts to mp4 (x265) in current directory
for f in *.MTS
do
echo "Processing $f file.."
fshort=$(echo "$f" | cut -f 1 -d '.')
ffmpeg -i ${f} -vf yadif=1 -c:v libx265 -crf 20 -c:a aac -b:a 128k -tag:v hvc1 ${fshort}.mp4
touch ${fshort}.mp4 -r ${fshort}.MTS
done