showspectrumpic and background color

Questions involving a Windows version of FFmpeg.
Post Reply
gotostereo
Posts: 2
Joined: Tue Jun 11, 2019 7:46 am

showspectrumpic and background color

Post by gotostereo » Tue Jun 11, 2019 7:54 am

Hello. How i can change background color from output image? Format image is PNG! I didn't see info in official doc. I think that this parameter needed. :(

pandy
Posts: 200
Joined: Mon Feb 24, 2014 1:46 pm

Re: showspectrumpic and background color

Post by pandy » Mon Jul 01, 2019 7:15 pm

I don't understand your question, try to rephrase your question. Perhaps simple steps or some picture, provide your script code etc.

gotostereo
Posts: 2
Joined: Tue Jun 11, 2019 7:46 am

Re: showspectrumpic and background color

Post by gotostereo » Wed Jul 10, 2019 11:06 am

Okey, example
this result
ffmpeg -i 123.wav -lavfi showspectrumpic=s=1000x500:color=6:scale=log:win_func=hann:legend=disable image-out.png
Y1lXfLvxovh7t.png
Y1lXfLvxovh7t.png (88.75 KiB) Viewed 322 times
background color black, i need white color or without color

format png has alpha channel, pse-example
backgroundColor=rgba(0,0,0,0)

maybe for many this not no matter, but i need this parameter

richardpl
Posts: 54
Joined: Sat Aug 01, 2015 6:35 pm

Re: showspectrumpic and background color

Post by richardpl » Wed Jul 10, 2019 1:49 pm

Consider donating to FFmpeg for this addition.

Djketley
Posts: 8
Joined: Sat May 25, 2019 1:20 am

Re: showspectrumpic and background color

Post by Djketley » Wed Jul 10, 2019 6:12 pm

Could you not invert the image i know your other colours will change but it's a way around it

pandy
Posts: 200
Joined: Mon Feb 24, 2014 1:46 pm

Re: showspectrumpic and background color

Post by pandy » Wed Jul 10, 2019 7:06 pm

Black as transparent and overlay on top white field (but spectrum "fringes" may have bleed to black i.e. not nicely looking on white). Had similar problem in past trying to overlay transparently oscilogram - cli is probably suboptimal and poor but works for me and may works for you:

Code: Select all

@set name=%1

@ffplay -loop 0 -color_range 1 -f lavfi "amovie=%name%,asplit=2[out1],compand,showwaves=split_channels=1:s=1920x128:mode=p2p:colors=0x8888FF|0xFF8888:n=1:draw=full,colorkey=0x000000:1/96:1/4,scale=w=iw/4:h=ih[wfm];movie=%name%,hqdn3d=9,tmix=frames=6:weights='.004 .012 .037 .111 .333 1'[vout];[vout][wfm]overlay=(W-w)/2:((H-h)/4)*3:format=auto,scale=w=iw:h=-2[out0]" -color_range 2

Post Reply
'