Skip to content

Instantly share code, notes, and snippets.

@lesthack lesthack/pod2vid.sh forked from eruizdechavez/pod2vid.sh
Last active Oct 16, 2019

Embed
What would you like to do?
#!/bin/bash
font_family="FiraCode-Regular.ttf"
image="logo.jpg"
getMetaTitle (){
tmp=$( ffprobe "$1" 2>&1 | grep title)
echo ${tmp##*:}
}
for file in *.mp3;
do
title=$(getMetaTitle "$file")
filename=${file%%.*}
ffmpeg -y -i "$file" -i "$image" -filter_complex \
"[1:v]scale=w=320:h=320,pad=1280:720:(ow-iw)/2:oh/2-ih[image]; \
[0:a]showwaves=s=1280x200:mode=cline:colors=#2A384E[sw]; \
[image][sw]overlay=0:H-h,drawtext=text=${title}:fontcolor=white:fontsize=36:x=(W-tw)/2:y=H/2+th:fix_bounds=true:fontfile=$font_family[out]" \
-map "[out]" -map 0:a -c:v libx264 -preset fast -crf 18 -c:a copy "${filename}.mkv"
done
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.