1

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...

1

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;
| improve this answer | |
  • 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!) – A K Jun 16 '19 at 5:11
  • @AK, thank you here = voting up (click on the upper triangle) and / or accepting the answer (click on the check mark). – MarianD Jun 16 '19 at 6:36
  • done so :) ... just learning the ropes – A K Jun 16 '19 at 16:19
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;```
| improve this answer | |
  • The ccc filter is not necessary. Add format=rgba instead. – Gyan Jun 16 '19 at 6:45
  • 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. – A K Jun 20 '19 at 15:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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