Last active
December 22, 2016 17:13
-
-
Save dallaylaen/46e29d748b2815937fd32846a998b9bc to your computer and use it in GitHub Desktop.
Convert audio file + cover image into youtubable video file with avconv (as ffmpeg has been removed from Ubuntu 14.04)
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/sh | |
PIC=$1 | |
SND=$2 | |
OUT=$3 | |
if [ -z "$SND" ]; then | |
echo "Usage: $0 <image> <audio> [<video>]" | |
echo "Default for video is audio renamed to *.mp4" | |
exit 1 | |
fi | |
[ -z "$OUT" ] && OUT=`echo "$SND" | sed s/\.[a-z0-9]*$/.mp4/` | |
avconv -loop 1 -f image2 -i "$PIC" -i "$SND" -acodec copy -shortest "$OUT" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment