Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
basename=$1
cover=$2
if [ -z $basename ]; then
echo "Input file not set!"
exit 1
fi
if [ -z $cover ]; then
echo "Cover file not set!"
exit 1
fi
filename_without_ext=`echo "${basename}"|sed "s/\(.*\)\.\(.*\)/\1/"`
output_name="${filename_without_ext}.mp4"
ffmpeg -loop 1 -r 1 -i "$cover" -i "$basename" -c:a copy -vcodec h264 -shortest "$output_name"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.