Answers.Body: <p>You can use <code>ffmpeg</code> to create video from audio using several filters.</p>
  
  <hr>
  
  <h1><a href="https://ffmpeg.org/ffmpeg-filters.html#ahistogram" rel="noreferrer">ahistogram</a></h1>
  
  <p>Convert input audio to a video output, displaying the volume histogram.</p>
  
  <p><a href="https://i.sstatic.net/VO0x1.jpg" rel="noreferrer"><img src="https://i.sstatic.net/VO0x1.jpg" alt="ahistogram"></a></p>
  
  <p><strong><code>ffmpeg</code></strong></p>
  
  <pre><code>ffmpeg -i input.flac -filter_complex \
  "[0:a]ahistogram,format=yuv420p[v]" \
  -map "[v]" -map 0:a output.mp4
  </code></pre>
  
  <p><strong><code>ffplay</code></strong></p>
  
  <pre><code>ffplay -f lavfi "amovie=input.flac, asplit [a][out1]; [a] ahistogram [out0]"
  </code></pre>
  
  <p>See the <a href="https://ffmpeg.org/ffmpeg-filters.html#ahistogram" rel="noreferrer"><code>ahistogram</code></a> documentation for more options and examples.</p>
  
  <hr>
  
  <h1><a href="http://ffmpeg.org/ffmpeg-filters.html#aphasemeter" rel="noreferrer">aphasemeter</a></h1>
  
  <p>Convert input audio to a video output, displaying the audio phase.</p>
  
  <p><a href="https://i.sstatic.net/vsDD6.jpg" rel="noreferrer"><img src="https://i.sstatic.net/vsDD6.jpg" alt="aphasemeter"></a></p>
  
  <p><strong><code>ffmpeg</code></strong></p>
  
  <pre><code>ffmpeg -i input.wav -filter_complex \
  "[0:a]aphasemeter=s=1280x720:mpc=cyan,format=yuv420p[v]" \
  -map "[v]" -map 0:a output.mp4
  </code></pre>
  
  <p><strong><code>ffplay</code></strong></p>
  
  <pre><code>ffplay -f lavfi "amovie=input.wav, asplit [a][out1]; [a] aphasemeter=s=1280x720:mpc=cyan [out0]"
  </code></pre>
  
  <p>See the <a href="http://ffmpeg.org/ffmpeg-filters.html#aphasemeter" rel="noreferrer"><code>aphasemeter</code></a> documentation for more options and examples.</p>
  
  <hr>
  
  <h1><a href="https://ffmpeg.org/ffmpeg-filters.html#avectorscope" rel="noreferrer">avectorscope</a></h1>
  
  <p><img src="https://i.sstatic.net/yAPxt.jpg" alt="avectorscope filter"></p>
  
  <p>Convert input audio to a video output, representing the audio vector scope. </p>
  
  <p><strong><code>ffmpeg</code></strong></p>
  
  <pre><code>ffmpeg -i input.mp3 -filter_complex \
  "[0:a]avectorscope=s=1280x720,format=yuv420p[v]" \
  -map "[v]" -map 0:a output.mp4
  </code></pre>
  
  <p><strong><code>ffplay</code></strong></p>
  
  <pre><code>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]"
  </code></pre>
  
  <p>See the <a href="https://ffmpeg.org/ffmpeg-filters.html#avectorscope" rel="noreferrer"><code>avectorscope</code></a> documentation for more options and examples.</p>
  
  <hr>
  
  <h1><a href="https://ffmpeg.org/ffmpeg-filters.html#showcqt" rel="noreferrer">showcqt</a></h1>
  
  <p><img src="https://i.sstatic.net/MtKy2.jpg" alt="showcqt filter"></p>
  
  <p>Convert input audio to a video output representing frequency spectrum with musical tone scale.</p>
  
  <p><strong><code>ffmpeg</code></strong></p>
  
  <pre><code>ffmpeg -i input.mp4 -filter_complex \
  "[0:a]showcqt,format=yuv420p[v]" \
  -map "[v]" -map 0:a output.mp4
  </code></pre>
  
  <p><strong><code>ffplay</code></strong></p>
  
  <pre><code>ffplay -f lavfi "amovie=input.mp4, asplit [a][out1]; [a] showcqt [out0]"
  </code></pre>
  
  <p>See the <a href="https://ffmpeg.org/ffmpeg-filters.html#showcqt" rel="noreferrer"><code>showcqt</code></a> documentation for more options and examples.</p>
  
  <hr>
  
  <h1><a href="https://ffmpeg.org/ffmpeg-filters.html#showfreqs" rel="noreferrer">showfreqs</a></h1>
  
  <p>Convert input audio to video output representing the audio power spectrum. Audio amplitude is on Y-axis while frequency is on X-axis. </p>
  
  <p><a href="https://i.sstatic.net/L6wnp.png" rel="noreferrer"><img src="https://i.sstatic.net/L6wnp.png" alt="showfreqs"></a></p>
  
  <p><strong><code>ffmpeg</code></strong></p>
  
  <pre><code>ffmpeg -i input.mp4 -filter_complex \
  "[0:a]showfreqs=mode=line:fscale=log,format=yuv420p[v]" \
  -map "[v]" -map 0:a output.mp4
  </code></pre>
  
  <p><strong><code>ffplay</code></strong></p>
  
  <pre><code>ffplay -f lavfi "amovie=input.mp4, asplit [a][out1]; [a]  showfreqs=mode=line:fscale=log [out0]"
  </code></pre>
  
  <p>See the <a href="https://ffmpeg.org/ffmpeg-filters.html#showfreqs" rel="noreferrer"><code>showfreqs</code></a> documentation for more options and examples.</p>
  
  <hr>
  
  <h1><a href="https://ffmpeg.org/ffmpeg-filters.html#showspectrum" rel="noreferrer">showspectrum</a></h1>
  
  <p><img src="https://i.sstatic.net/WG1Dy.jpg" alt="showspectrum image"></p>
  
  <p>Convert input audio to a video output, representing the audio frequency spectrum. </p>
  
  <p><strong><code>ffmpeg</code></strong></p>
  
  <pre><code>ffmpeg -i input.oga -filter_complex \
  "[0:a]showspectrum=s=1280x720,format=yuv420p[v]" \
  -map "[v]" -map 0:a output.mp4
  </code></pre>
  
  <p><strong><code>ffplay</code></strong></p>
  
  <pre><code>ffplay -f lavfi "amovie=input.oga, asplit [a][out1]; \
  [a] showspectrum=mode=separate:color=intensity:slide=1:scale=cbrt [out0]"
  </code></pre>
  
  <p>See the <a href="https://ffmpeg.org/ffmpeg-filters.html#showspectrum" rel="noreferrer"><code>showspectrum</code></a> documentation for more options and examples.</p>
  
  <hr>
  
  <h1><a href="https://ffmpeg.org/ffmpeg-filters.html#showwaves" rel="noreferrer">showwaves</a></h1>
  
  <p><img src="https://i.sstatic.net/MFJ4J.png" alt="showwaves filter"></p>
  
  <p>Convert input audio to a video output, representing the samples waves. </p>
  
  <p><strong><code>ffmpeg</code></strong></p>
  
  <pre><code>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
  </code></pre>
  
  <p><strong><code>ffplay</code></strong></p>
  
  <pre><code>ffplay -f lavfi "amovie=input.m4a, asplit [a][out1]; [a] showwaves [out0]"
  </code></pre>
  
  <p>See the <a href="https://ffmpeg.org/ffmpeg-filters.html#showwaves" rel="noreferrer"><code>showwaves</code></a> documentation for more options and examples.</p>
  
  <hr>
  
  <h1><a href="http://ffmpeg.org/ffmpeg-filters.html#showvolume" rel="noreferrer">showvolume</a></h1>
  
  <p><a href="https://i.sstatic.net/Hv3Og.png" rel="noreferrer"><img src="https://i.sstatic.net/Hv3Og.png" alt="showvolume filter"></a></p>
  
  <p>Convert input audio volume to a video output.</p>
  
  <p><strong><code>ffmpeg</code></strong></p>
  
  <pre><code>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
  </code></pre>
  
  <p><strong><code>ffplay</code></strong></p>
  
  <pre><code>ffplay -f lavfi "amovie=input.mka, asplit [a][out1]; [a] showvolume=f=255:b=4:w=720:h=68 [out0]"
  </code></pre>
  
  <p>See the <a href="http://ffmpeg.org/ffmpeg-filters.html#showvolume" rel="noreferrer"><code>showvolume</code></a> documentation for more options and examples.</p>
  
  <hr>
  
  <h2>Notes</h2>
  
  <ul>
  <li><p>See <a href="https://trac.ffmpeg.org/wiki/Encode/H.264" rel="noreferrer">FFmpeg Wiki: H.264 Encoding Guide</a> for more detailed information regarding output quality.</p></li>
  <li><p><code>format=yuv420p</code> makes sure that libx264 uses a pixel format that is compatible with crappy players like QuickTime.</p></li>
  <li><p>Instead of re-encoding by default, you can use <code>-c:a copy</code> to <a href="https://ffmpeg.org/ffmpeg.html#Stream-copy" rel="noreferrer">stream copy</a> 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.</p></li>
  </ul>
  
  <hr>
  
  <h2>Get <code>ffmpeg</code></h2>
  
  <p>You should always use a recent version since development is very active. Links to builds of <code>ffmpeg</code> for Windows, OS X, and Linux are available on the <a href="https://ffmpeg.org/download.html" rel="noreferrer">FFmpeg Download</a> page. Or you can follow a step-by-step <a href="http://trac.ffmpeg.org/wiki/CompilationGuide" rel="noreferrer">guide to compile <code>ffmpeg</code></a>.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-19T17:44:23.393Z
Answers.Text: 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!
Answers.UserDisplayName: mivk
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-13T03:59:14.923Z
Answers.Text: @LordNeckbeard OP here. It's been a while, but I'm back, and this is a great answer.
Answers.UserDisplayName: ccleve
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-03T18:28:29.013Z
Answers.Text: I've just created a question http://superuser.com/questions/1184922/how-do-i-insert-a-background-image-on-spectrum-audio-effect-using-ffmpeg How can I set a background image?
Answers.UserDisplayName: NineCattoRules
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-07-26T16:31:19.573Z
Answers.Text: For Ubuntu installation simply use `sudo apt install ffmpeg`. It includes `ffplay` and `ffprobe` which is all I needed for now. Your visualization techniques look promising for when playing song. When song paused the album artwork will be displayed instead.
Answers.UserDisplayName: WinEunuuchs2Unix
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2013-12-18T09:14:08.313Z
Answers.LastActivityDate: 2017-03-20T21:42:43.727Z
Answers.LastEditDate: 2017-03-20T21:42:43.727Z
Answers.UserDisplayName: llogan
Answers.Body: <p>Many music players have visualisers. Play the audio in one of them and use a screen-grabber to record the video.</p>
  
  <p>You could also try to use gstreamer as described at <a href="http://www.vidarholen.net/contents/blog/?p=23" rel="nofollow">http://www.vidarholen.net/contents/blog/?p=23</a></p>
  
  <p>Another option is Sonic Candle, <a href="http://sourceforge.net/projects/soniccandle/" rel="nofollow">http://sourceforge.net/projects/soniccandle/</a> </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2013-12-13T12:53:46.650Z
Answers.LastActivityDate: 2015-10-19T13:06:56.300Z
Answers.LastEditDate: 2015-10-19T13:06:56.300Z
Answers.UserDisplayName: liftarn
Answers.Body: <p>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 <a href="https://github.com/tokland/youtube-upload" rel="nofollow">youtube-upload</a>!</p>
  
  <p><strong>EDIT:</strong> uploading directly slows down the encoding process significantly!! </p>
  
  <h1>Script</h1>
  
  <pre><code>#!/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
  </code></pre>
  
  <p></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-12T17:12:30.270Z
Answers.LastActivityDate: 2016-02-12T17:44:21.130Z
Answers.LastEditDate: 2016-02-12T17:44:21.130Z
Answers.UserDisplayName: Mighty Dread
Answers.Body: <p>You can do it for free using VEED.IO, this video explains how to do it (Disclaimer, I am the developer of VEED.IO)</p>
  <p><div class="youtube-embed"><div>
                  <iframe width="640px" height="395px" src="https://www.youtube.com/embed/G-J36pjSthI?start=12"></iframe>
              </div></div></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-04T15:01:13.917Z
Answers.Text: You need to disclaim your ownership of this program, since it's illegal promotion otherwise.
Answers.UserDisplayName: Florian Claaßen
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-04T15:02:10.203Z
Answers.Text: Thank you @FlorianClaaßen, I have now added it.
Answers.UserDisplayName: Sabba Keynejad
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-04T14:44:00.190Z
Answers.LastActivityDate: 2020-09-04T15:01:55.223Z
Answers.LastEditDate: 2020-09-04T15:01:55.223Z
Answers.UserDisplayName: Sabba Keynejad
Answers.Body: <p>If you have access to After Effects, there's a plugin called <a href="http://www.redgiant.com/products/trapcode-sound-keys/" rel="nofollow">Trapcode Keys</a> 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.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-19T13:53:39.940Z
Answers.LastActivityDate: 2015-10-19T13:53:39.940Z
Answers.UserDisplayName: tomh
Body: <p>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.</p>
  
  <p>Is there any free or cheap tool I can use that will do this?</p>
  
  <hr>
  
  <p><em>If I ask a friend to do it, is there anything in the Adobe Creative Suite that can do the job?</em></p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2013-12-12T18:42:11.403Z
Comments.Text: It's worth mentioning that the "visualizer" tool you're probably looking for is an [oscilloscope](http://en.wikipedia.org/wiki/Oscilloscope), which may inform your search.
Comments.UserDisplayName: Warrior Bob
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-07-06T21:17:57.773Z
Comments.Text: You can use `ffmpeg` to convert directly - [ffmpeg convert audio into video](https://echowave.io/podcast-to-video/) Using [filters](https://ffmpeg.org/ffmpeg-filters.html) you can get an aesthetically pleasing video.
Comments.UserDisplayName: Lewis Quaife
Tags: <video><audio><software-recommendation>
Title: How do I turn audio into video (that is, show the waveforms in a video)?
UserDisplayName: ccleve
ThreadText: # How do I turn audio into video (that is, show the waveforms in a video)?
  
  (Asked by: username_0 on 2013-12-07)
  
  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?*
  
  **Tags:** video, audio, software-recommendation
  
  > **Comments:**
  > **username_1**: It's worth mentioning that the "visualizer" tool you're probably looking for is an [oscilloscope](http://en.wikipedia.org/wiki/Oscilloscope), which may inform your search.  
  > **username_2**: You can use `ffmpeg` to convert directly - [ffmpeg convert audio into video](https://echowave.io/podcast-to-video/) Using [filters](https://ffmpeg.org/ffmpeg-filters.html) you can get an aesthetically pleasing video.  
  
  ---
  
  ## 5 answers
  
  ### Answer by username_3 on 2013-12-18. Score: 66
  
  You can use `ffmpeg` to create video from audio using several filters.
  
  ---
  
  # [ahistogram](https://ffmpeg.org/ffmpeg-filters.html#ahistogram)
  
  Convert input audio to a video output, displaying the volume histogram.
  
  [![ahistogram](https://i.sstatic.net/VO0x1.jpg)](https://i.sstatic.net/VO0x1.jpg)
  
  **`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`](https://ffmpeg.org/ffmpeg-filters.html#ahistogram) documentation for more options and examples.
  
  ---
  
  # [aphasemeter](http://ffmpeg.org/ffmpeg-filters.html#aphasemeter)
  
  Convert input audio to a video output, displaying the audio phase.
  
  [![aphasemeter](https://i.sstatic.net/vsDD6.jpg)](https://i.sstatic.net/vsDD6.jpg)
  
  **`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`](http://ffmpeg.org/ffmpeg-filters.html#aphasemeter) documentation for more options and examples.
  
  ---
  
  # [avectorscope](https://ffmpeg.org/ffmpeg-filters.html#avectorscope)
  
  ![avectorscope filter](https://i.sstatic.net/yAPxt.jpg)
  
  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`](https://ffmpeg.org/ffmpeg-filters.html#avectorscope) documentation for more options and examples.
  
  ---
  
  # [showcqt](https://ffmpeg.org/ffmpeg-filters.html#showcqt)
  
  ![showcqt filter](https://i.sstatic.net/MtKy2.jpg)
  
  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`](https://ffmpeg.org/ffmpeg-filters.html#showcqt) documentation for more options and examples.
  
  ---
  
  # [showfreqs](https://ffmpeg.org/ffmpeg-filters.html#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](https://i.sstatic.net/L6wnp.png)](https://i.sstatic.net/L6wnp.png)
  
  **`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`](https://ffmpeg.org/ffmpeg-filters.html#showfreqs) documentation for more options and examples.
  
  ---
  
  # [showspectrum](https://ffmpeg.org/ffmpeg-filters.html#showspectrum)
  
  ![showspectrum image](https://i.sstatic.net/WG1Dy.jpg)
  
  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`](https://ffmpeg.org/ffmpeg-filters.html#showspectrum) documentation for more options and examples.
  
  ---
  
  # [showwaves](https://ffmpeg.org/ffmpeg-filters.html#showwaves)
  
  ![showwaves filter](https://i.sstatic.net/MFJ4J.png)
  
  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`](https://ffmpeg.org/ffmpeg-filters.html#showwaves) documentation for more options and examples.
  
  ---
  
  # [showvolume](http://ffmpeg.org/ffmpeg-filters.html#showvolume)
  
  [![showvolume filter](https://i.sstatic.net/Hv3Og.png)](https://i.sstatic.net/Hv3Og.png)
  
  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`](http://ffmpeg.org/ffmpeg-filters.html#showvolume) documentation for more options and examples.
  
  ---
  
  ## Notes
  
  * See [FFmpeg Wiki: H.264 Encoding Guide](https://trac.ffmpeg.org/wiki/Encode/H.264) 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](https://ffmpeg.org/ffmpeg.html#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](https://ffmpeg.org/download.html) page. Or you can follow a step-by-step [guide to compile `ffmpeg`](http://trac.ffmpeg.org/wiki/CompilationGuide).
  
  > **Comments:**
  > **username_4**: 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!  
  > **username_0**: @LordNeckbeard OP here. It's been a while, but I'm back, and this is a great answer.  
  > **username_5**: I've just created a question http://superuser.com/questions/1184922/how-do-i-insert-a-background-image-on-spectrum-audio-effect-using-ffmpeg How can I set a background image?  
  > **username_6**: For Ubuntu installation simply use `sudo apt install ffmpeg`. It includes `ffplay` and `ffprobe` which is all I needed for now. Your visualization techniques look promising for when playing song. When song paused the album artwork will be displayed instead.  
  
  ---
  
  ### Answer by username_7 on 2013-12-13. Score: 3
  
  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/>
  
  
  ---
  
  ### Answer by username_8 on 2016-02-12. Score: 3
  
  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](https://github.com/tokland/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
  
  ```
  
  
  ---
  
  ### Answer by username_9 on 2020-09-04. Score: 0
  
  You can do it for free using VEED.IO, this video explains how to do it (Disclaimer, I am the developer of VEED.IO)
  
  > **Comments:**
  > **username_10**: You need to disclaim your ownership of this program, since it's illegal promotion otherwise.  
  > **username_9**: Thank you @username_10, I have now added it.  
  
  ---
  
  ### Answer by username_11 on 2015-10-19. Score: 0
  
  If you have access to After Effects, there's a plugin called [Trapcode Keys](http://www.redgiant.com/products/trapcode-sound-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.
  
  
  ---
  
  