[FFmpeg-trac] #5392(undetermined:new): A bug in the scale2ref filter

FFmpeg trac at avcodec.org
Thu Mar 31 18:19:01 CEST 2016


#5392: A bug in the scale2ref filter
-------------------------------------+-------------------------------------
             Reporter:  mulvya       |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:
  undetermined                       |  unspecified
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 The scale2ref filter allows one to resize an input with reference to a
 secondary input. However, this can lead to an undesired outcome when the
 frame aspect ratios of the two inputs are not the same.

 Consider the case where a square-pixel 2:1 watermark logo needs to be
 resized with reference to a square-pixel 4:3 base video. With the
 scale2ref filter, an expression of '''scale2ref=-1:ih/2''' will lead to
 the resized watermark having a ratio of 4:3. Not what most users would
 desire or expect.

 A demo command to show the behaviour:


 {{{
 ffmpeg -f lavfi -i "color=black:600x600" -f lavfi -i
 "color=white:1200x600" -filter_complex
 "[1][0]scale2ref=-1:ih/2[1v][0v];[0v][1v]overlay[v]" -map "[v]" -t 1
 scale2ref-ar-bug.mp4
 }}}

 There should be a way to flag ffmpeg to preserve the operand's aspect
 ratio with the scale2ref filter.

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


More information about the FFmpeg-trac mailing list