Last active
March 4, 2021 07:45
-
-
Save kassoulet/ef90c6cfa3f936316290d62b9a127f58 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
# Recompress video, add audio waveform | |
# usage: ./compress-video-waveform.sh video-source video-destination | |
videocodec="libx264 -strict -2 -crf 20 -preset slow" | |
audiocodec="libmp3lame -b:a 320k" | |
waveform="[0:a]showwaves=s=1920x540:mode=cline:split_channels=1:colors=\#ffffff40|\#ffffff40,format=argb[w];[0:v][w]overlay=(W-w)/2:(H-h)/2[v]" | |
ffmpeg -y -i $1 -c:v $videocodec -acodec $audiocodec -filter_complex $waveform -map "[v]" -map 0:a $2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment