[FFmpeg-trac] #10212(ffmpeg:new): Regression when trimming frames from the start

FFmpeg trac at avcodec.org
Tue Feb 21 23:28:01 EET 2023


#10212: Regression when trimming frames from the start
-------------------------------------+-------------------------------------
             Reporter:  Ondrej       |                     Type:  defect
  Mosnacek                           |
               Status:  new          |                 Priority:  normal
            Component:  ffmpeg       |                  Version:  git-
                                     |  master
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:

 The latest ffmpeg fails one of the ffmpeg-python [1] tests. I know that
 version 4.2.7 works fine and the reproducer is simple and reliable, so I
 was able to bisect the regression to commit 9145c6d3b2e6 ("ffmpeg: move
 setting video sync method to new_video_stream()").

 [1] https://github.com/kkroening/ffmpeg-python

 How to reproduce:
 {{{
 % head -c $((32*32*3*10)) /dev/urandom | ./ffmpeg -f rawvideo -video_size
 32x32 -framerate 10 -pixel_format rgb24 -i pipe:0 -filter_complex
 [0]trim=start_frame=2[s0] -map [s0] -f rawvideo pipe:1 | wc -c
 ffmpeg version N-109896-g156ca86569 Copyright (c) 2000-2023 the FFmpeg
 developers
   built with gcc 12 (GCC)
   configuration: --disable-programs --enable-ffmpeg --disable-doc
 --disable-encoders --disable-decoders --enable-encoder=rawvideo --enable-
 decoder=rawvideo --disable-hwaccels --disable-muxers --enable-muxer=null
 --enable-muxer=rawvideo --disable-parsers --disable-bsfs --disable-devices
 --disable-filters --enable-filter=trim --disable-debug
   libavutil      58.  3.100 / 58.  3.100
   libavcodec     60.  4.100 / 60.  4.100
   libavformat    60.  4.100 / 60.  4.100
   libavdevice    60.  2.100 / 60.  2.100
   libavfilter     9.  4.100 /  9.  4.100
   libswscale      7.  2.100 /  7.  2.100
   libswresample   4. 11.100 /  4. 11.100
 Input #0, rawvideo, from 'pipe:0':
   Duration: N/A, start: 0.000000, bitrate: 245 kb/s
   Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 32x32, 245
 kb/s, 10 tbr, 10 tbn
 Stream mapping:
   Stream #0:0 (rawvideo) -> trim:default
   trim:default -> Stream #0:0 (rawvideo)
 Output #0, rawvideo, to 'pipe:1':
   Metadata:
     encoder         : Lavf60.4.100
   Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24(progressive),
 32x32, q=2-31, 245 kb/s, 10 fps, 10 tbn
     Metadata:
       encoder         : Lavc60.4.100 rawvideo
 frame=   10 fps=0.0 q=-0.0 Lsize=      30kB time=00:00:00.90 bitrate=
 273.1kbits/s dup=2 drop=0 speed=1.09e+03x
 video:30kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: 0.000000%
 30720
 }}}

 The number output at the end should be 24576 (8 frames) instead of 30720
 (10 frames).
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/10212>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list