[FFmpeg-trac] #3315(avfilter:new): overlay with shortest=1 loops forever if one input is of unlimited duration

FFmpeg trac at avcodec.org
Fri Jan 17 13:14:07 CET 2014


#3315: overlay with shortest=1 loops forever if one input is of unlimited duration
----------------------------------+--------------------------------------
             Reporter:  Krieger   |                     Type:  defect
               Status:  new       |                 Priority:  normal
            Component:  avfilter  |                  Version:  git-master
             Keywords:            |               Blocked By:
             Blocking:            |  Reproduced by developer:  0
Analyzed by developer:  0         |
----------------------------------+--------------------------------------
 Summary of the bug:

 If we join with overlay=shortest=1 an input file of limited length and an
 unlimited stream, filtergraph never finishes its shutdown when one of
 streams has ended.

 How to reproduce:
 {{{
  # /usr/local/src/ffmpeg/ffmpeg -f lavfi -t 1 -i testsrc -vf
 "testsrc[overlaid];[0:0][overlaid]overlay=shortest=1" -f mpegts -y
 /dev/null
 ffmpeg version N-59909-g3721531 Copyright (c) 2000-2014 the FFmpeg
 developers
   built on Jan 17 2014 14:02:33 with gcc 4.6.3 (Gentoo 4.6.3 p1.11,
 pie-0.5.2)
   configuration: --enable-libfreetype --enable-filter=drawtext
   libavutil      52. 62.100 / 52. 62.100
   libavcodec     55. 48.101 / 55. 48.101
   libavformat    55. 23.103 / 55. 23.103
   libavdevice    55.  5.102 / 55.  5.102
   libavfilter     4.  1.100 /  4.  1.100
   libswscale      2.  5.101 /  2.  5.101
   libswresample   0. 17.104 /  0. 17.104
 Input #0, lavfi, from 'testsrc':
   Duration: N/A, start: 0.000000, bitrate: N/A
     Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 320x240
 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
 Output #0, mpegts, to '/dev/null':
   Metadata:
     encoder         : Lavf55.23.103
     Stream #0:0: Video: mpeg2video, yuv420p, 320x240 [SAR 1:1 DAR 4:3],
 q=2-31, 200 kb/s, 90k tbn, 25 tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (rawvideo -> mpeg2video)
 Press [q] to stop, [?] for help
 frame=   27 fps=4.2 q=2.0 Lsize=      63kB time=00:00:01.04 bitrate=
 497.5kbits/s dup=0 drop=3207
 video:55kB audio:0kB subtitle:0 global headers:0kB muxing overhead
 13.815072%
 Received signal 2: terminating.
 [ERR]
 14:07root at whdd.org /usr/local/src/ffmpeg
  # /usr/local/src/ffmpeg/ffmpeg -f lavfi -i testsrc=d=1 -vf
 "testsrc[overlaid];[0:0][overlaid]overlay=shortest=1" -f mpegts -y
 /dev/null
 ffmpeg version N-59909-g3721531 Copyright (c) 2000-2014 the FFmpeg
 developers
   built on Jan 17 2014 14:02:33 with gcc 4.6.3 (Gentoo 4.6.3 p1.11,
 pie-0.5.2)
   configuration: --enable-libfreetype --enable-filter=drawtext
   libavutil      52. 62.100 / 52. 62.100
   libavcodec     55. 48.101 / 55. 48.101
   libavformat    55. 23.103 / 55. 23.103
   libavdevice    55.  5.102 / 55.  5.102
   libavfilter     4.  1.100 /  4.  1.100
   libswscale      2.  5.101 /  2.  5.101
   libswresample   0. 17.104 /  0. 17.104
 Input #0, lavfi, from 'testsrc=d=1':
   Duration: N/A, start: 0.000000, bitrate: N/A
     Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 320x240
 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
 Output #0, mpegts, to '/dev/null':
   Metadata:
     encoder         : Lavf55.23.103
     Stream #0:0: Video: mpeg2video, yuv420p, 320x240 [SAR 1:1 DAR 4:3],
 q=2-31, 200 kb/s, 90k tbn, 25 tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (rawvideo -> mpeg2video)
 Press [q] to stop, [?] for help
 frame=   27 fps=2.7 q=2.0 Lsize=      63kB time=00:00:01.04 bitrate=
 497.5kbits/s dup=0 drop=5123
 video:55kB audio:0kB subtitle:0 global headers:0kB muxing overhead
 13.815072%
 Received signal 2: terminating.
 }}}

 This works:
 {{{
 /usr/local/src/ffmpeg/ffmpeg -loglevel debug -f lavfi -i testsrc -vf
 "testsrc=d=1[overlaid];[0:0][overlaid]overlay=shortest=1" -f mpegts -y
 /dev/null
 }}}

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


More information about the FFmpeg-trac mailing list