Skip to content

Instantly share code, notes, and snippets.

@aji
Created February 19, 2018 09:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aji/c5e3ec24633f31d49a8db3d6cc53cd6a to your computer and use it in GitHub Desktop.
Save aji/c5e3ec24633f31d49a8db3d6cc53cd6a to your computer and use it in GitHub Desktop.
#!/bin/sh
CTR=0
while [ -f "out$CTR.mkv" ]; do
let CTR=CTR+1
done
if [ -z "$1" ]; then
echo "missing input argument"
exit 1
fi
ffmpeg -f lavfi -i 'amovie='"$1"', asplit [a][out1]; [a] showcqt=fps=30:count=5 [out0]' \
-vf scale=3840:2160 \
-c:v libx264 -crf 24 -preset ultrafast \
-profile:v high -pix_fmt yuv420p \
-c:a copy \
out$CTR.mkv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment