0

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
done

1 Answer 1

1

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

showwaves=s=1280x720:mode=line:colors=white

Split the channels

enter image description here

showwaves=s=1280x720:mode=line:colors=white:split_channels=1

Make a mono waveform

enter image description here

aformat=channel_layouts=mono,showwaves=s=1280x720:mode=line:colors=white

Also see


Use parameter expansion instead of basename

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .