Last active
June 18, 2022 14:53
-
-
Save thoriqmacto/e1e2dc09652055e7c40f8691b5ea8896 to your computer and use it in GitHub Desktop.
Script to run FFMPEG overlay audio-viz to picture.
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 | |
ifn="[slug_name]" | |
pref="`basename $0 .sh`" | |
fpathaudio="in/${ifn}.mp3" | |
fpathpic="in/${ifn}.jpg" | |
# RUN FFMPEG SCRIPT | |
./ffmpeg -y -i "${fpathaudio}" -i "${fpathpic}" -filter_complex " | |
[0:a]showwaves=s=640x150:mode=cline:colors=red,colorkey=0x000000:0.01:0.1,format=yuva420p[v]; | |
[1:v]scale=1280:720[bg]; | |
[bg][v]overlay=(W-w)/2:500[outv] | |
" -map "[outv]" -map "0:a" -threads 0 -c:v libx264 -pix_fmt yuv420p -b:a 360k -r:a 44100 -c:a copy -shortest "out/${pref}_${ifn}.mp4" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment