
showspectrumpic and background color
-
- Posts: 2
- Joined: Tue Jun 11, 2019 7:46 am
showspectrumpic and background color
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. 

Re: showspectrumpic and background color
I don't understand your question, try to rephrase your question. Perhaps simple steps or some picture, provide your script code etc.
-
- Posts: 2
- Joined: Tue Jun 11, 2019 7:46 am
Re: showspectrumpic and background color
Okey, example
this result
ffmpeg -i 123.wav -lavfi showspectrumpic=s=1000x500:color=6:scale=log:win_func=hann:legend=disable image-out.png 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
this result
ffmpeg -i 123.wav -lavfi showspectrumpic=s=1000x500:color=6:scale=log:win_func=hann:legend=disable image-out.png 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
Re: showspectrumpic and background color
Consider donating to FFmpeg for this addition.
Re: showspectrumpic and background color
Could you not invert the image i know your other colours will change but it's a way around it
Re: showspectrumpic and background color
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
'