FFmpeg is a powerful command-line application able to record, stream, and convert multimedia files between multiple file types. This is great for compatibility with audio platforms with different format requirements. And don’t forget users who prefer lossless formats – e.g. FLAC and OGG. Some creators provide multiple audio format options on their live broadcasting website.
But it can be beneficial to share audio work on video platforms as well. Just as vloggers can benefit from creating audio-only content for podcast platforms, podcasters can do the same with video platforms. YouTube is the second most popular search engine as of 2019. Vimeo and some other video platforms have small but active communities.
But what’s the best option for converting your audio to video? There are a few common options for podcasts, music, and other audio-only content:
- Image with title info
- Image slideshow
- Video to support mood of the audio (sometimes unrelated)
- Spectrum visuals
We’re going to focus on that last option – spectrum visuals. FFmpeg can create many audio spectrum visuals. We’re going to focus on the commonly seen sample waveform view called showwaves in FFmpeg.
FFmpeg is available for installation on all InMotion VPS Hosting plans.
- Log in to SSH or cPanel Terminal
- List FFmpeg-supported file types with the command
- (Optional) Filter the results for a specific format for faster results:
ffmpeg -formats | grep mp3
- List supported codecs with the command
- Navigate to your media files directory with
- Type the following command, one line at a time, and remember to rename song-1.mp3 to the file name and file type and song-1.mp4 to your specified file name:
ffmpeg -i song-1.mp3 -filter_complex \
command, input , file name, prepare a filter function
alpha radius set to 0, filter, screen resolution, frame rate per second (FPS), output color format
-map "[v]" -map 0:a song-1.mp4
“map” channels from input to output, remove V color channel component, alpha radius set to 0, output file
If you’d rather use a single command:
ffmpeg -i song-1.mp3 -filter_complex "[0:a]showwaves=s=1280x720:mode=line:rate=25,
format=yuv420p[v]" -map "[v]" -map 0:a song-1.mp4
Once you create the file, open the file URL in your browser to see your results. You can use this file as is with the audio included. Or you can import it into a video editor for further customization.