[FFmpeg-trac] #7880(ffmpeg:new): Video codec qtrle inputs are truncated in output

FFmpeg trac at avcodec.org
Sun May 5 13:15:54 EEST 2019


#7880: Video codec qtrle inputs are truncated in output
----------------------------------------+----------------------------------
             Reporter:  Acru            |                     Type:  defect
               Status:  new             |                 Priority:  normal
            Component:  ffmpeg          |                  Version:  4.1
             Keywords:  qtrle duration  |               Blocked By:
             Blocking:                  |  Reproduced by developer:  0
Analyzed by developer:  0               |
----------------------------------------+----------------------------------
 Summary of the bug:

 When transcoding with a mov/qtrle video as the source (one of the few
 formats supporting alpha channel), frames are being lost from the end of
 the output, notably if the last frame is blank and repeats but possibly in
 other cases too.

 This issue seems to have appeared between release 4.0.2 and 4.1, and
 persists to at least build 20190505-e384f6f.

 Tested with windows 32/64-bit static builds.

 How to reproduce:
 {{{
 Create a video from a few identical blank pngs; (eg. 256x256 white, 8
 frames)
 ffmpeg -framerate 1 -i Test\%04d.png -c:v qtrle -y TestIn.mov
 Transcode into any other format;
 ffmpeg -i TestIn.mov -c:v qtrle -y TestOut.mov

 Check resulting frame counts; (Or check video duration)
 ffprobe -v error -select_streams v:0 -show_entries stream=nb_frames -of
 default=nokey=1:noprint_wrappers=1 TestIn.mov
 ffprobe -v error -select_streams v:0 -show_entries stream=nb_frames -of
 default=nokey=1:noprint_wrappers=1 TestOut.mov
 }}}


 Log:
 {{{
 >ffmpeg -framerate 1 -i Test\%04d.png -c:v qtrle -y TestIn.mov
 ffmpeg version N-93762-ge384f6f2f9 Copyright (c) 2000-2019 the FFmpeg
 developers
   built with gcc 8.3.1 (GCC) 20190414
   configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-
 fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-
 libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame
 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
 --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr
 --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack
 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2
 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-
 libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa
 --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx
 --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-
 nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
   libavutil      56. 26.100 / 56. 26.100
   libavcodec     58. 52.100 / 58. 52.100
   libavformat    58. 27.103 / 58. 27.103
   libavdevice    58.  7.100 / 58.  7.100
   libavfilter     7. 50.100 /  7. 50.100
   libswscale      5.  4.100 /  5.  4.100
   libswresample   3.  4.100 /  3.  4.100
   libpostproc    55.  4.100 / 55.  4.100
 Input #0, image2, from 'Test\%04d.png':
   Duration: 00:00:08.00, start: 0.000000, bitrate: N/A
     Stream #0:0: Video: png, rgba(pc), 256x256 [SAR 3780:3780 DAR 1:1], 1
 fps, 1 tbr, 1 tbn, 1 tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (png (native) -> qtrle (native))
 Press [q] to stop, [?] for help
 Output #0, mov, to 'TestIn.mov':
   Metadata:
     encoder         : Lavf58.27.103
     Stream #0:0: Video: qtrle (rle  / 0x20656C72), argb, 256x256 [SAR 1:1
 DAR 1:1], q=2-31, 200 kb/s, 1 fps, 16384 tbn, 1 tbc
     Metadata:
       encoder         : Lavc58.52.100 qtrle
 frame=    8 fps=0.0 q=-0.0 Lsize=       4kB time=00:00:07.00 bitrate=
 4.5kbits/s speed= 778x
 video:3kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: 25.383633%

 >ffmpeg -i TestIn.mov -c:v qtrle -y TestOut.mov
 ffmpeg version N-93762-ge384f6f2f9 Copyright (c) 2000-2019 the FFmpeg
 developers
   built with gcc 8.3.1 (GCC) 20190414
   configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-
 fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-
 libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame
 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
 --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr
 --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack
 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2
 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-
 libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa
 --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx
 --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-
 nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
   libavutil      56. 26.100 / 56. 26.100
   libavcodec     58. 52.100 / 58. 52.100
   libavformat    58. 27.103 / 58. 27.103
   libavdevice    58.  7.100 / 58.  7.100
   libavfilter     7. 50.100 /  7. 50.100
   libswscale      5.  4.100 /  5.  4.100
   libswresample   3.  4.100 /  3.  4.100
   libpostproc    55.  4.100 / 55.  4.100
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'TestIn.mov':
   Metadata:
     major_brand     : qt
     minor_version   : 512
     compatible_brands: qt
     encoder         : Lavf58.27.103
   Duration: 00:00:08.00, start: 0.000000, bitrate: 3 kb/s
     Stream #0:0(eng): Video: qtrle (rle  / 0x20656C72), argb(progressive),
 256x256, 3 kb/s, SAR 1:1 DAR 1:1, 1 fps, 1 tbr, 16384 tbn, 16384 tbc
 (default)
     Metadata:
       handler_name    : VideoHandler
       encoder         : Lavc58.52.100 qtrle
 Stream mapping:
   Stream #0:0 -> #0:0 (qtrle (native) -> qtrle (native))
 Press [q] to stop, [?] for help
 Output #0, mov, to 'TestOut.mov':
   Metadata:
     major_brand     : qt
     minor_version   : 512
     compatible_brands: qt
     encoder         : Lavf58.27.103
     Stream #0:0(eng): Video: qtrle (rle  / 0x20656C72), argb, 256x256 [SAR
 1:1 DAR 1:1], q=2-31, 200 kb/s, 1 fps, 16384 tbn, 1 tbc (default)
     Metadata:
       handler_name    : VideoHandler
       encoder         : Lavc58.52.100 qtrle
 frame=    1 fps=0.0 q=-0.0 Lsize=       4kB time=00:00:00.00
 bitrate=501114.8kbits/s speed=0.00762x
 video:3kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: 24.098734%

 >ffprobe -v error -select_streams v:0 -show_entries stream=nb_frames -of
 default=nokey=1:noprint_wrappers=1 TestIn.mov
 8

 >ffprobe -v error -select_streams v:0 -show_entries stream=nb_frames -of
 default=nokey=1:noprint_wrappers=1 TestOut.mov
 1
 }}}

 Leave a note if you find a workaround, reverted to ffmpeg version 4.0.2 in
 the mean time.

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


More information about the FFmpeg-trac mailing list