-
-
Save eruizdechavez/c4cbc596b92adb7a463ecefc78d9f878 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 | |
# For each mp3 file in the folder... | |
for file in $(ls *.mp3); do | |
#... extract ID3 tags into a text file... | |
ffmpeg -y -i $file -f ffmetadata ${file}.txt | |
#... extract the episode title into a text file... | |
cat ${file}.txt | grep title | awk -F "=" 'NR==1{print $2}' > ${file}.title.txt | |
# ... and mix the logo, audio, and the title into a single video file | |
ffmpeg -y -i $file -i logo.jpg -filter_complex \ | |
"[1:v]scale=w=320:h=320,pad=1280:720:(ow-iw)/2:oh/2-ih[logo]; \ | |
[0:a]showwaves=s=1280x200:mode=cline:colors=#2A384E[sw]; \ | |
[logo][sw]overlay=0:H-h,drawtext=textfile=${file}.title.txt:fontcolor=white:fontsize=36:x=(W-tw)/2:y=H/2+th:fix_bounds=true:fontfile=/Users/erick.ruizdechavez/Library/Fonts/FiraCode-Regular.ttf[out]" \ | |
-map "[out]" -map 0:a -c:v libx264 -preset fast -crf 18 -c:a copy ${file}.mkv | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Si quieres mi muy humilde opinión, yo si valoro esos datos dentro del archivo.