#3315 closed defect (fixed)
overlay with shortest=1 loops forever if one input is of unlimited duration
| Reported by: | Andrey Utkin | Owned by: | |
|---|---|---|---|
| Priority: | important | Component: | avfilter |
| Version: | git-master | Keywords: | regression |
| Cc: | eric@getvictorious.com | Blocked By: | |
| Blocking: | Reproduced by developer: | yes | |
| Analyzed by developer: | no |
Description
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@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
Change History (5)
comment:1 by , 12 years ago
| Keywords: | regression added |
|---|---|
| Priority: | normal → important |
comment:2 by , 12 years ago
| Reproduced by developer: | set |
|---|---|
| Status: | new → open |
comment:3 by , 12 years ago
The following works as expected:
$ ffmpeg -f lavfi -i testsrc=d=1 -vf "testsrc,overlay=shortest=1" -f null -
comment:4 by , 12 years ago
| Resolution: | → fixed |
|---|---|
| Status: | open → closed |
Fixed by Nicolas in 2dc5980d - thank you for the report!
comment:5 by , 11 years ago
| Cc: | added |
|---|
Note:
See TracTickets
for help on using tickets.



Regression since 231e5015
-t 1is not needed to reproduce:$ ffmpeg -f lavfi -i testsrc=d=1 -vf "testsrc[overlaid];[0:0][overlaid]overlay=shortest=1" -f null -