[FFmpeg-trac] #5081(undetermined:new): A wish for ffmpeg to be able to reference input properties

FFmpeg trac at avcodec.org
Fri Dec 11 05:51:03 CET 2015


#5081: A wish for ffmpeg to be able to reference input properties
-------------------------------------+-------------------------------------
             Reporter:  mulvya       |                     Type:
               Status:  new          |  enhancement
            Component:               |                 Priority:  wish
  undetermined                       |                  Version:  git-
             Keywords:  properties   |  master
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0
-------------------------------------+-------------------------------------
 This is a feature request for ffmpeg to have the ability to reference
 input properties like codec, container, dimensions, bitrate, duration, GOP
 size..etc. Often the output properties bear some relation to input
 properties and adding the requested ability to ffmpeg will allow to bypass
 a script with ffprobe/grep multi-command-chain. This feature will be most
 useful when one wishes to perform adaptive processing of a batch of files
 having diverse properties.

 Here is a mock (exaggerated) command example to illustrate the use of such
 a facility.

 {{{
     ffmpeg -i file.ext -i file2.ext2 \
 -t len(0:a) -s trunc(dim(1:v:1)/2) -c:v codec(1:v:1) -b:v bitrate(0:v) \
 -other_filter_or_parameters -f type(0) output
 }}}


 Here **-c:v codec(1:v:1)** evaluates the codec of the 2nd video stream in
 the 2nd input and sets that as the output encoder.

 **-b:v bitrate(0:v)** sets the target bitrate to be the same as the
 evaluated bitrate of the first video stream in the first input

 **-t len(0:a)** encodes till the output reaches the duration of 0:a:0

 **-s trunc(dim(1:v:1)/2)** sets the size to half of the 2nd video stream
 in the 2nd input

 **-f type(0)** sets the f flag to the same format as the 1st input. Useful
 in cases like MXF where there are variants and extension isn't unique.

 Thank You.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/5081>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list