Skip to content

Instantly share code, notes, and snippets.

@monkeydom
Created February 16, 2021 11:32
Show Gist options
  • Save monkeydom/d34508a4f12ab4f639bab3691ae54aff to your computer and use it in GitHub Desktop.
Save monkeydom/d34508a4f12ab4f639bab3691ae54aff to your computer and use it in GitHub Desktop.
My MediathekView convert to h265 video script
#!/bin/sh
mkdir -p Converting
mkdir -p Source
mkdir -p Converted
for f in *.mp4; do
o=${f##*/}
t=${o%.*}.h265.mp4
ffmpeg -i "$f" \
-map 0 \
-c:v libx265 -crf 27 -tag:v hvc1 -movflags faststart \
"Converting/$t" &&
mv "Converting/$t" "Converted/$t" &&
mv "$f" "Source/$f"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment