Answers.Body: <p>The default codec for MP4 is x264 which does not support alpha channel. Use PNG.</p>
  
  <pre><code>ffmpeg -i music.mp3 -filter_complex \
  "[0:a]showwaves=s=1920x1080:mode=line:colors=white:draw=full,format=rgbap[v]" \
  -map "[v]" -map 0:a -c:v png output.mp4;
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-16T05:11:25.480Z
Answers.Text: i actually found another method with qtrle and colorchannelmixer that works too ... still learning ffmpeg and not sure there's a significant difference since it gives me the output i want (although the files MOV files created by qtrle are HUGE!)
Answers.UserDisplayName: A K
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-16T06:36:15.137Z
Answers.Text: @AK, thank you here = voting up (click on the upper triangle) and / or accepting the answer (click on the check mark).
Answers.UserDisplayName: MarianD
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-16T16:19:54.157Z
Answers.Text: done so :) ... just learning the ropes
Answers.UserDisplayName: A K
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-16T04:36:53.927Z
Answers.LastActivityDate: 2019-06-16T04:36:53.927Z
Answers.UserDisplayName: Gyan
Answers.Body: <p>Answering my own question after hours of research... this also works to give me a transparent background:</p>
  
  <p><code>qtrle</code> and <code>colorchannelmixer</code> got me there on my own:</p>
  
  <pre><code>ffmpeg -i music.mp3 -filter_complex \
  "[0:a]showwaves=s=1920x1080:mode=line:colors=white:draw=full,colorchannelmixer=1:0:0:0:0:1:0:0:0:0:1:0:0.3:0.3:0.3:0" \
  -map 0:a -c:v qtrle -an outputWaves.mov;```
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-16T06:45:42.510Z
Answers.Text: The ccc filter is not necessary. Add `format=rgba` instead.
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-20T15:24:01.740Z
Answers.Text: while this is absolutely correct, i'm bringing the files into screenflow which apparently can't import the `rgba` format. I had to use `qrtle` to get them to import properly.
Answers.UserDisplayName: A K
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-16T05:08:36.310Z
Answers.LastActivityDate: 2019-06-16T05:08:36.310Z
Answers.UserDisplayName: A K
Body: <p>I am trying to render a video spectrum of music using <code>showwaves</code> ... I need it to render with a <em>transparent</em> background (i think this is called an alpha channel?)... </p>
  
  <p>I tried <code>yuva420p</code> but it's still rendering a black background... here's what I'm doing:</p>
  
  <pre><code>ffmpeg -i music.mp3 -filter_complex \
  "[0:a]showwaves=s=1920x1080:mode=line:colors=white:draw=full,format=yuva420p[v]" \
  -map "[v]" -map 0:a output.mp4;
  </code></pre>
  
  <p>Can anyone help? I know I'm close...</p>
  
Tags: <ffmpeg>
Title: FFMPEG: Transparent background with 'showwaves' or 'showspectrum'
UserDisplayName: A K
ThreadText: # FFMPEG: Transparent background with 'showwaves' or 'showspectrum'
  
  (Asked by: username_0 on 2019-06-15)
  
  I am trying to render a video spectrum of music using `showwaves` ... I need it to render with a *transparent* background (i think this is called an alpha channel?)...
  
  I tried `yuva420p` but it's still rendering a black background... here's what I'm doing:
  
  ```
  ffmpeg -i music.mp3 -filter_complex \
  "[0:a]showwaves=s=1920x1080:mode=line:colors=white:draw=full,format=yuva420p[v]" \
  -map "[v]" -map 0:a output.mp4;
  
  ```
  
  Can anyone help? I know I'm close...
  
  **Tags:** ffmpeg
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2019-06-16. Score: 2 | Accepted answer
  
  The default codec for MP4 is x264 which does not support alpha channel. Use PNG.
  
  ```
  ffmpeg -i music.mp3 -filter_complex \
  "[0:a]showwaves=s=1920x1080:mode=line:colors=white:draw=full,format=rgbap[v]" \
  -map "[v]" -map 0:a -c:v png output.mp4;
  
  ```
  
  > **Comments:**
  > **username_0**: i actually found another method with qtrle and colorchannelmixer that works too ... still learning ffmpeg and not sure there's a significant difference since it gives me the output i want (although the files MOV files created by qtrle are HUGE!)  
  > **username_2**: @AK, thank you here = voting up (click on the upper triangle) and / or accepting the answer (click on the check mark).  
  > **username_0**: done so :) ... just learning the ropes  
  
  ---
  
  ### Answer by username_0 on 2019-06-16. Score: 0
  
  Answering my own question after hours of research... this also works to give me a transparent background:
  
  `qtrle` and `colorchannelmixer` got me there on my own:
  
  ```
  ffmpeg -i music.mp3 -filter_complex \
  "[0:a]showwaves=s=1920x1080:mode=line:colors=white:draw=full,colorchannelmixer=1:0:0:0:0:1:0:0:0:0:1:0:0.3:0.3:0.3:0" \
  -map 0:a -c:v qtrle -an outputWaves.mov;```
  
  ```
  
  > **Comments:**
  > **username_1**: The ccc filter is not necessary. Add `format=rgba` instead.  
  > **username_0**: while this is absolutely correct, i'm bringing the files into screenflow which apparently can't import the `rgba` format. I had to use `qrtle` to get them to import properly.  
  
  ---
  
  