[FFmpeg-devel] [PATCH] vf_scale: Detecting changes of incoming frame properties and dinamically evaluate width and height expressions

Bodecs Bela bodecsb at vivanet.hu
Tue Jan 19 16:08:58 CET 2016

Hi All,

currently scale video  filter accepts expressions in its width and height
parameters but evaluates them only once at init and replaces them with
their actual values. Later on, if any parameter of incoming frames
changes - ie those were used in the original size expressions - then
they new values will not have any affect for width and heigth values.
They remain the same. This patch makes possible that width and height
expressions be evaluated frame-by-frame basis if width/height/sar/format
properties of incoming frame would change. To retain the current
behaviour and not to break any earlier app, a new config parameter has
been introduced. Its name is "eval" and it has two distinct values:
"init" and "frame". The default value is "init".
This feature is very usefull in case of DVBT mpeg-ts streams where SAR 
may change
time-by-time from 4/3 to 16/9 and vica-versa and the size remains the 
same and
and you want to create a variable sized output with 1/1 SAR.

Please consider to put this patch into the official ffmpeg source tree.

thank you,

Bela Bodecs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vf_scale_0001.patch
Type: text/x-patch
Size: 4665 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160119/5a681de7/attachment.bin>

More information about the ffmpeg-devel mailing list