[FFmpeg-devel] [PATCH] lavfi: add drawgraph filter

Paul B Mahol onemda at gmail.com
Sat Jun 27 09:47:45 CEST 2015


Dana 26. 6. 2015. 21:26 osoba "Dave Rice" <dave at dericed.com> napisala je:
>
> Hi,
>
> > On Jun 26, 2015, at 11:27 AM, Paul B Mahol <onemda at gmail.com> wrote:
> >
> > Signed-off-by: Paul B Mahol <onemda at gmail.com>
> > ---
> > Waiting for comments and flames.
>
> Here are some comments and flames:
>
> I noticed that when I set min to a value greater than max. I get a crash
with "Bus error: 10".

Good catch, I forgot about checking this.

>
> There may be an issue with negative values for min/max. When I run:
> ffplay -f lavfi -i color=gray -vf
signalstats,drawgraph=lavfi.signalstats.YAVG:min=0:max=255
> I see a line scroll across the center of the window. When I change min to
-255 I see a line at ~3/4 down the frame, where I would expect -128 to be.
Does the min and max expect non-negative numbers.
>

It is, but it doesn't draw what you expect. It should start from middle and
either go up or down.

> It could be helpful to include equations within foreground, such as:
> ffplay -i movie.mkv -vf
"signalstats,drawgraph=lavfi.signalstats.YAVG:min=0:max=255:foreground=if(gt(lavfi.signalstats.YAVG\,128)\,green\,red)"
> or actually I could probably subsequently use geq to accomplish that.

Will do, filter does not redraw whole frame it just updates columns so
different colors for bars/dots make sense in special scenarios.

I planned to do multiple graphs for multiple metadata but perhaps it is
better to call filter multiple times and then blend frames together...

>
> Can you alias 's' for 'size' as many of the other filters do.
Will do.

>
> This is very helpful, thanks!

Do you have some other interesting idea worth implementing in filter I'm
listening.

> Dave
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


More information about the ffmpeg-devel mailing list