Created
February 16, 2020 16:22
-
-
Save leonidlezner/5d6dbc4f34fc6b0a491d9f219a674ba0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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