I have to create a video. Part of it involves "showing" a radio interview. Rather than just having a black screen and listening to the audio, I'd like to have a varying waveform on the screen and a caption.

Is there any free or cheap tool I can use that will do this?


If I ask a friend to do it, is there anything in the Adobe Creative Suite that can do the job?

migrated from graphicdesign.stackexchange.com Dec 12 '13 at 18:40

This question came from our site for Graphic Design professionals, students, and enthusiasts.

  • Audacity should show you the sound wave; you could record - visually - the wave. – boblet Dec 7 '13 at 20:40
  • It's worth mentioning that the "visualizer" tool you're probably looking for is an oscilloscope, which may inform your search. – Warrior Bob Dec 12 '13 at 18:42

You can use ffmpeg to create video from audio using several filters.


ahistogram

Convert input audio to a video output, displaying the volume histogram.

ahistogram

ffmpeg

ffmpeg -i input.flac -filter_complex \
"[0:a]ahistogram,format=yuv420p[v]" \
-map "[v]" -map 0:a output.mp4

ffplay

ffplay -f lavfi "amovie=input.flac, asplit [a][out1]; [a] ahistogram [out0]"

See the ahistogram documentation for more options and examples.


aphasemeter

Convert input audio to a video output, displaying the audio phase.

aphasemeter

ffmpeg

ffmpeg -i input.wav -filter_complex \
"[0:a]aphasemeter=s=1280x720:mpc=cyan,format=yuv420p[v]" \
-map "[v]" -map 0:a output.mp4

ffplay

ffplay -f lavfi "amovie=input.wav, asplit [a][out1]; [a] aphasemeter=s=1280x720:mpc=cyan [out0]"

See the aphasemeter documentation for more options and examples.


avectorscope

avectorscope filter

Convert input audio to a video output, representing the audio vector scope.

ffmpeg

ffmpeg -i input.mp3 -filter_complex \
"[0:a]avectorscope=s=1280x720,format=yuv420p[v]" \
-map "[v]" -map 0:a output.mp4

ffplay

ffplay -f lavfi "amovie=input.mp3, asplit [a][out1]; \
[a] avectorscope=zoom=1.3:rc=2:gc=200:bc=10:rf=1:gf=8:bf=7 [out0]"

See the avectorscope documentation for more options and examples.


showcqt

showcqt filter

Convert input audio to a video output representing frequency spectrum with musical tone scale.

ffmpeg

ffmpeg -i input.mp4 -filter_complex \
"[0:a]showcqt,format=yuv420p[v]" \
-map "[v]" -map 0:a output.mp4

ffplay

ffplay -f lavfi "amovie=input.mp4, asplit [a][out1]; [a] showcqt [out0]"

See the showcqt documentation for more options and examples.


showfreqs

Convert input audio to video output representing the audio power spectrum. Audio amplitude is on Y-axis while frequency is on X-axis.

showfreqs

ffmpeg

ffmpeg -i input.mp4 -filter_complex \
"[0:a]showfreqs=mode=line:fscale=log,format=yuv420p[v]" \
-map "[v]" -map 0:a output.mp4

ffplay

ffplay -f lavfi "amovie=input.mp4, asplit [a][out1]; [a]  showfreqs=mode=line:fscale=log [out0]"

See the showfreqs documentation for more options and examples.


showspectrum

showspectrum image

Convert input audio to a video output, representing the audio frequency spectrum.

ffmpeg

ffmpeg -i input.oga -filter_complex \
"[0:a]showspectrum=s=1280x720,format=yuv420p[v]" \
-map "[v]" -map 0:a output.mp4

ffplay

ffplay -f lavfi "amovie=input.oga, asplit [a][out1]; \
[a] showspectrum=mode=separate:color=intensity:slide=1:scale=cbrt [out0]"

See the showspectrum documentation for more options and examples.


showwaves

showwaves filter

Convert input audio to a video output, representing the samples waves.

ffmpeg

ffmpeg -i input.m4a -filter_complex \
"[0:a]showwaves=s=1280x720:mode=line:rate=25,format=yuv420p[v]" \
-map "[v]" -map 0:a output.mp4

ffplay

ffplay -f lavfi "amovie=input.m4a, asplit [a][out1]; [a] showwaves [out0]"

See the showwaves documentation for more options and examples.


showvolume

showvolume filter

Convert input audio volume to a video output.

ffmpeg

ffmpeg -i input.mka -filter_complex \
"[0:a]showvolume=f=1:b=4:w=720:h=68,format=yuv420p[vid]" \
-map "[vid]" -map 0:a output.mp4

ffplay

ffplay -f lavfi "amovie=input.mka, asplit [a][out1]; [a] showvolume=f=255:b=4:w=720:h=68 [out0]"

See the showvolume documentation for more options and examples.


Notes

  • See FFmpeg Wiki: H.264 Encoding Guide for more detailed information regarding output quality.

  • format=yuv420p makes sure that libx264 uses a pixel format that is compatible with crappy players like QuickTime.

  • Instead of re-encoding by default, you can use -c:a copy to stream copy the audio if your output container format supports the audio format. Think of stream copying (re-muxing) like a copy and paste – no re-encoding.


Get ffmpeg

You should always use a recent version since development is very active. Links to builds of ffmpeg for Windows, OS X, and Linux are available on the FFmpeg Download page. Or you can follow a step-by-step guide to compile ffmpeg.

  • The OP will probably want to look at the other answers which link to After Effects tutorials, but these excellent ffmpeg examples are really useful to have here. Thanks! – mivk May 19 '15 at 17:44
  • 1
    @LordNeckbeard OP here. It's been a while, but I'm back, and this is a great answer. – ccleve Feb 13 '16 at 3:59
  • @ccleve Thanks, and welcome back. – LordNeckbeard Feb 15 '16 at 18:29
  • I've just created a question superuser.com/questions/1184922/… How can I set a background image? – NineCattoRules Mar 3 '17 at 18:28

Adobe After Effects has a visualizer, see

There are also plugins such as here for Photoshop.

Good luck with your project.

I understood your question quite well. If you are trying to make a waveform pattern that moves according to the pitch and bass of your audio, then you can try this link.

http://www.videocopilot.net/tutorial/audio_to_animation/

Adobe After effects lets you do it easily. You can play along with the particle effects to get a more solid looking waveform.

Good luck!

Many music players have visualisers. Play the audio in one of them and use a screen-grabber to record the video.

You could also try to use gstreamer as described at http://www.vidarholen.net/contents/blog/?p=23

Another option is Sonic Candle, http://sourceforge.net/projects/soniccandle/

After reading the great answer from LordNeckbeard I went on created a small script to make a visualization with ffmpeg and the showspectrum filter. I also added an upload option for myself to encode directly to my remote server that has a better connection than at home to upload big videos. It also uses the great script youtube-upload!

EDIT: uploading directly slows down the encoding process significantly!!

Script

#!/bin/bash
# ffmpeg spectrum maker

action=$1

infile=$2

outfile=$3
upload_server="sftp://cloud"

upload_location="/home/master/videos/"

remote_command="youtube-upload --title=\"Remote_upload\" --privacy=\"private\" $upload_location$outfile"

#simple spectrum
filter1="showspectrum=s=1920x1080:slide=scroll:mode=combined:color=intensity:scale=cbrt:saturation=1:win_func=hann[tmp]"

#vertical mirror
filter2="[tmp]crop=iw:ih/2:0:ih/2-3,split[up][tmp];[tmp]vflip[down];[up][down]vstack[tmp]"

#horizontal mirror
filter3="[tmp]crop=iw/2:ih:iw/2:,split[left][tmp];[tmp]hflip[right];[left][right]hstack[tmp]"

#fisheye effect VERY SLOW!!! if used make change the size of the spectrum to (1920*11/10)x(1080*11/10) and use the crop filter below
filter4="[tmp]frei0r=filter_name=defish0r:filter_params=1.5|n[tmp]"

#make sure the resolution has the desired size
filter5="[tmp]crop=1920:1080"

#pass the stream to the output for ffplay
testpass="[tmp]copy[out0]"


vcodec="-codec:v libx264 -pix_fmt yuv420p -tune grain -crf 21 -preset medium -bf 2 -flags +cgop -r 25"

acodec="-codec:a libfdk_aac -b:a 128k -movflags +faststart"

#acodec="-codec:a copy"

extraflags="-movflags +faststart "


if [ "$action" = "test" ]
then
        ffplay -f lavfi "amovie=$infile,asplit[a][out1];[a]$filter1;$filter2;$filter3;$testpass"
fi

if [ "$action" = "make" ]
then
        ffmpeg -i "$infile" -filter_complex "[0:a]$filter1;$filter2;$filter3" -map [tmp] -map 0:a $vcodec $acodec $extraflags "$outfile"
fi
if [ "$action" = "upload" ]
then
        ffmpeg -i "$infile" -filter_complex "[0:a]$filter1;$filter2;$filter3" -map [tmp] -map 0:a $vcodec $acodec $extraflags "$upload_server$upload_location$outfile"
        ssh cloud $remote_command
fi
exit

If you have access to After Effects, there's a plugin called Trapcode Keys that can do this very effectively. The results look really nice - I've used it on many projects for exactly what you've described, but it's not cheap - $150 on it's own, or $899 for the full Trapcode Suite.

protected by Dr Mayhem Mar 8 at 12:02

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.