Created
May 19, 2017 18:46
-
-
Save krabello/7f928aef8e3026550118e4da4b8a3775 to your computer and use it in GitHub Desktop.
Converts a Audio file and image to video. In order to be used on youtube
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 | |
# example line | |
# 372|"Baby Beluga CD"|Raffi8054BabyBeluga.mp3|http://www.domain.com/img/data/ETA_CD56.jpg | |
while IFS='|' read field1 field2 field3 field4 || [[ -n "$line" ]]; do | |
f=$(echo $field2 | tr -d '"' | tr -d ' ' | tr -d '®' | tr -d "'" | tr -d '‘' | tr -d '’' | tr -d '&' | tr -d ',' | tr -d '-') | |
ffmpeg -loop 1 -i $field4 -i $field3 -c:v libx264 -c:a aac -strict experimental -b:a 192k -shortest ./out/$f.mp4 < /dev/null | |
done < "$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment