Answers.Body: <p>Use the <a href="https://ffmpeg.org/ffmpeg-filters.html#overlay" rel="nofollow noreferrer">overlay</a> filter to put the <a href="https://ffmpeg.org/ffmpeg-filters.html#showwaves" rel="nofollow noreferrer">showwaves</a> on top of <code>image.jpg</code>:</p>
  
  <pre><code>ffmpeg -i song.mp3 -i image.jpg -filter_complex "[0:a]showwaves=s=3840x200:mode=line:colors=red|yellow[sw];[1][sw]overlay=(W-w)/2:(H-h)/2:format=auto,format=yuv420p[v]" -map "[v]" -map 0:a -movflags +faststart video.mp4
  </code></pre>
  
  <ul>
  <li><p>Adjust showwaves colors with the <code>colors</code> option. Each channel will have its own color, so in this example, if <code>song.mp3</code> is stereo, the left channel is red and the right channel is yellow.</p></li>
  <li><p>If you just want a single waveform of all channels add the <a href="https://ffmpeg.org/ffmpeg-filters.html#aformat" rel="nofollow noreferrer">aformat</a> filter before showwaves, as in <code>aformat=channel_layouts=mono,showwaves=s=3840x200:mode=line:colors=00ff00</code>.</p></li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-29T18:20:56.113Z
Answers.LastActivityDate: 2020-04-29T18:20:56.113Z
Answers.UserDisplayName: llogan
Body: <p>I have an mp3 song that I am making a video for, I also have a background image.</p>
  
  <p>My command that doesn't work.</p>
  
  <pre><code>ffmpeg -i song.mp3 -i image.jpg -filter_complex \  "[0:a]showwaves=s=3840x200:mode=line[sw];" \
  -map "[out]" -map 0:a video.mp4
  </code></pre>
  
  <p>I'm trying to read the documentation and understand how to just put the image as a background, overlay the Soundwaves on the Image and keep the audio. Can someone help me understand how to do this?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-29T03:37:41.287Z
Comments.Text: Added bonus would be showwaves customization with color and histogram
Comments.UserDisplayName: devssh
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-29T14:57:36.697Z
Comments.Text: Could you please try this: ffmpeg -loop 1 -i image.jpg -i song.mp3 -c:v libx264 -tune stillimage -c:a aac -b:a 192k -pix_fmt yuv420p -shortest video.mp4
Comments.UserDisplayName: geoai777
Tags: <video><ffmpeg><audio>
Title: FFMPEG how to add image and soundwaves to video
UserDisplayName: devssh
ThreadText: # FFMPEG how to add image and soundwaves to video
  
  (Asked by: username_0 on 2020-04-29)
  
  I have an mp3 song that I am making a video for, I also have a background image.
  
  My command that doesn't work.
  
  ```
  ffmpeg -i song.mp3 -i image.jpg -filter_complex \  "[0:a]showwaves=s=3840x200:mode=line[sw];" \
  -map "[out]" -map 0:a video.mp4
  
  ```
  
  I'm trying to read the documentation and understand how to just put the image as a background, overlay the Soundwaves on the Image and keep the audio. Can someone help me understand how to do this?
  
  **Tags:** video, ffmpeg, audio
  
  > **Comments:**
  > **username_0**: Added bonus would be showwaves customization with color and histogram  
  > **username_1**: Could you please try this: ffmpeg -loop 1 -i image.jpg -i song.mp3 -c:v libx264 -tune stillimage -c:a aac -b:a 192k -pix_fmt yuv420p -shortest video.mp4  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2020-04-29. Score: 1 | Accepted answer
  
  Use the [overlay](https://ffmpeg.org/ffmpeg-filters.html#overlay) filter to put the [showwaves](https://ffmpeg.org/ffmpeg-filters.html#showwaves) on top of `image.jpg`:
  
  ```
  ffmpeg -i song.mp3 -i image.jpg -filter_complex "[0:a]showwaves=s=3840x200:mode=line:colors=red|yellow[sw];[1][sw]overlay=(W-w)/2:(H-h)/2:format=auto,format=yuv420p[v]" -map "[v]" -map 0:a -movflags +faststart video.mp4
  
  ```
  
  * Adjust showwaves colors with the `colors` option. Each channel will have its own color, so in this example, if `song.mp3` is stereo, the left channel is red and the right channel is yellow.
  * If you just want a single waveform of all channels add the [aformat](https://ffmpeg.org/ffmpeg-filters.html#aformat) filter before showwaves, as in `aformat=channel_layouts=mono,showwaves=s=3840x200:mode=line:colors=00ff00`.
  
  
  ---
  
  