[FFmpeg-devel] avfilter/showvolume : add new options and minor clean

Martin Vignali martin.vignali at gmail.com
Sat Mar 31 17:21:36 EEST 2018


Hello,

In attach new patchs for showvolume filter

001 : Move the clear picture part to a new func, and use it if fade option
== 0.
(no need to calculate it in float)

002/003 : Move "height" condition for draw volume at the start of the loop
and indent

004 : add a new option for choosing the display scale
currently, the filter use linear display,
most audio meter use some kind of log display


005 : WIP :
The idea is to add an option to draw a line for the max level for a given
duration.
Several audio meter have this kind of display, and its help user, to check
peak level (even
if the "peak" happen during a very short time.

I'm not entirely sure, this is the best way to add this.

For now, i store the max value for each channel, update it, if a new peak
is bigger than the store value
And count the number of frame for display. If a given display duration is
exceed, update the max value to the current max value.

Missing docs and probably code reorganization to reduce code duplication.

I also have had very few inspiration for option naming and variable naming
(and i don't know the "official name" of this little line in audio meter).
So i'm open to better naming suggestion.

This display need to be enable using dm=1
and the duration during the max value is still display can be set with
dm_duration (in seconds)


Comments welcome


Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-avfilter-showvolume-move-clear-picture-part-to-a-fun.patch
Type: application/octet-stream
Size: 2486 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180331/9db7cb78/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-avfilter-showvolume-move-width-test-for-draw-volume-.patch
Type: application/octet-stream
Size: 1426 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180331/9db7cb78/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-avfilter-showvolume-indent-after-prev-commit-and-add.patch
Type: application/octet-stream
Size: 1739 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180331/9db7cb78/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-avfilter-showvolume-add-display-scale-option.patch
Type: application/octet-stream
Size: 3866 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180331/9db7cb78/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-avfilter-showvolume-add-persistent-max-display.patch
Type: application/octet-stream
Size: 5586 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180331/9db7cb78/attachment-0004.obj>


More information about the ffmpeg-devel mailing list