For this, we need Johnny...Johnny Cash.
What we're gonna do here is: download the video, extend the video height to accommodate a graphical waveform on the bottom, generate a waveform video and overlay it along the bottom of the output video.
This is our bogey;
Let's download the video;
$ youtube-dl https://www.youtube.com/watch?v=8AHCfZTRGiI
Next, generate the audio waveform from the video, note the same width of the input video and a fixed height of 120;
$ ffmpeg -i input.mp4 -filter_complex "[0:a]showwaves=s=854x120:mode=line,format=yuv420p[v]" -map "[v]" -map 0:a -c:v libx264 -c:a copy waveform.mp4
$ ffmpeg -i input.mp4 -vf 'pad=iw:ih+120 [top]; movie=waveform.mp4 [bottom];[top][bottom] overlay=0:main_h-120' -acodec copy output.mp4
You're left with Johnny and his amazing vocal range co-star'ing;
Now go make something cool.
Lovely thanks it is great
ReplyDelete