The power of FFMPEG

I am I Linux enthusiast and a sound engineer. So naturally when Coder Radio threw out a challenge that was even remotely related to sound I couldn’t help myself but have a crack. If you listen to the show Chris orignally request that we make a script that would play a loop of video and combine that with an mp3 file, they then go on and expand that idea to include a ‘Wavescope’, well this is exactly what I have done. And I have done it in a single command.

Using FFMPEG I have crafted this beast;

ffmpeg -i linuxactionshowep430.mp3 -i chris_noah.jpg -filter_complex “[0:a]showwaves=s=1280×720:colors=ff|ff|ff:mode=line,format=yuv420p[wave_vid];[1:v]scale=1280×800[larger];[wave_vid]colorkey=0x000000:0.3:0.3[ckout];[larger][ckout]overlay[out]” -map “[out]” -map 0:a -codec:v libx264 -crf 18 -preset fast -codec:a aac -strict -2 -b:a 192k final_output.mp4

You will need to have FFMPEG installed to run this, and you will need to have the two media files. No problem, this is linux so you can easily get those files like this.

Get the JPG file…..

wget -O chris_noah.jpg

Get the MP3 file….


Once you have those you are good to go. What the FFMPEG command will do is create a new MP4 file that is 1280×800 and scale the JPG file up to match that. It will also generate a wavescope video of the MP3 file and Chromakey the JPG file over it. The result is the wavescope video playing over the top of the JPG file. You can muck around with the colours and wavescope style or change the image very easily.


Once your done, you’re file should look like THIS. (btw: this is a shortened version, I have only encoded the first 30 secondsĀ or so, just to show you how it should look)