How can I make the waveform white in colour? No matter what I do I get brown. This is presumably green and red combined?

for i in *.mp3 ; do
ffmpeg -i "$i" -loop 1 -i background.jpg -filter_complex "[0:a]showwaves=s=1280x720:mode=line,format=rgba,colorkey=0x000000:0.1:0.5[fg]; \
 [1:v]scale=1280:-1,crop=iw:720[bg]; \
[bg][fg]overlay=shortest=1,format=yuv420p[out]" -map "[out]" -map 0:a -c:v libx264 -preset fast -crf 18 -c:a libopus "$(basename "${i/.mp3}").mkv"
 sleep 60

Each channel has it's own default color, and overlapping channels will combine colors but there are several options to deal with this.

Choose the channel colors

enter image description here


Split the channels

enter image description here


Make a mono waveform

enter image description here


Also see

Use parameter expansion instead of basename

Replace "$(basename "${i/.mp3}").mkv" with "${i%.mp3}.mkv" for one less process.

  • Awesome. I spent hours trying to achieve it. You've helped me out there! Thx. – Frank Zafka Feb 18 '17 at 1:50

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.