Skip to content

Instantly share code, notes, and snippets.

@rafael-neri
Created February 13, 2018 04:53
Show Gist options
  • Save rafael-neri/e6a36ad3b10646fffd47b92c46338675 to your computer and use it in GitHub Desktop.
Save rafael-neri/e6a36ad3b10646fffd47b92c46338675 to your computer and use it in GitHub Desktop.
Convert MP3 Audio To MP4 Video With Image Thumb Background.
#!/bin/bash
# INSTALL FFMPEG BEFORE EXECUTE THIS SCRIPT
in=/path/directory/audios/
out=/path/directory/videos/
image=/path/image.png
for file in `ls $in`
do
ffmpeg -loop 1 -i $image -i $in/$file -c:a copy -c:v libx264 -shortest $out/${file/mp3/mp4}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment