[FFmpeg-user] ffprobe infinite loop when processing pgssub/dvdsub
Hans Carlson
forbyta at inbox.com
Fri Mar 18 22:53:22 CET 2016
With the latest git master (2016/03/18), if ffprobe is used on a pgssub or
dvdsub stream, it goes into an infinite loop. I don't know when this
started happening, but it was at some point after 2.8.6 because ffprobe
from that version seems to work.
I don't know if this happens with ALL psgsub and/or dvdsub streams, but
I've tried several and they all seem to show this behavior.
If I use ffprobe to "-show_frames" (see complete output below):
$ ffprobe -analyzeduration 100M -probesize 100M -i pgssub-ffprobe.infinite.loop.m2ts -select_streams s:0 -show_frames -print_format flat | grep pts_time | head
...
[pgssub @ 0xde3de0] Unknown subtitle segment type 0x0, length 0
frames.subtitle.0.pts_time="32.629956"
frames.subtitle.1.pts_time="33.005333"
frames.subtitle.2.pts_time="32.942278"
frames.subtitle.3.pts_time="32.942278"
frames.subtitle.4.pts_time="32.942278"
frames.subtitle.5.pts_time="32.942278"
Notice all the pts_time values are the same starting with the 3rd frame.
If I let the command run, it will continue to show that same value until
the command is interrupted. If I use ffprobe 2.8.6 instead, it will
display 9 frames and the command completes normally.
If I use ffprobe to "-show_streams" with the "-count_frames" option:
$ ffprobe -analyzeduration 100M -probesize 100M -i pgssub-ffprobe.infinite.loop.m2ts -count_frames -select_streams s:0 -show_streams -print_format flat
Then it displays an error message:
[pgssub @ 0x21f0de0] Unknown subtitle segment type 0x0, length 0
Last message repeated 118819 times
The "Last message repeated" counter just keeps increasing until the
command is interrupted.
Again, if I run the same command with ffprobe 2.8.6, it works fine. The
command completes and shows a value of 9 for "nb_read_frames".
If I run ffprobe on a dvdsub stream, it behaves in a similar way.
NOTE: The test file I used for a dvdsub stream was converted from a pgssub
stream, but I also checked some other dvdsub streams that were not
converted and they did the same thing.
With a dvdsub stream, both ffprobe commands go into an infinite loop, but
the "-show_streams" command doesn't show any error messages, it just
appears to hang.
If ffprobe -show_frames is run on the dvdsub stream, the pts_time value is
repeated starting from the very 1st frame.
If ffprobe 2.8.6 is used on a dvdsub stream, then both -show_streams and
-show_frames run without error and the command completes, although in both
cases only 4 frames (as opposed to 9 in the original .m2ts/pgssub source)
are returned. Don't know if that's as it should be when converting
pgssub->dvdsub, or an error, or a side effect of the fact the test source
file was obtained via "dd".
I've uploaded (or will shortly), the sample files I used in these tests:
pgssub-ffprobe.infinite.loop.m2ts
pgssub-ffprobe.infinite.loop.mpg
pgssub-ffprobe.infinite.loop.txt
The pgssub-ffprobe.infinite.loop.m2ts file is a 10 second clip extracted
via dd. The pgssub-ffprobe.infinite.loop.mpg file, was reencoded from the
.m2ts file.
------------------------------------------------------------------------
$ ffprobe -analyzeduration 100M -probesize 100M -i pgssub-ffprobe.infinite.loop.m2ts -select_streams s:0 -show_frames -print_format flat | grep pts_time | head
ffprobe version N-79081-g7af3f27 Copyright (c) 2007-2016 the FFmpeg developers
built with gcc 4.9.2 (GCC) 20150212 (Red Hat 4.9.2-6)
configuration: --enable-gpl --enable-version3 --enable-nonfree --disable-static --enable-shared --disable-debug --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-x11grab --disable-ffplay --disable-ffserver
libavutil 55. 19.100 / 55. 19.100
libavcodec 57. 28.103 / 57. 28.103
libavformat 57. 28.102 / 57. 28.102
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 39.102 / 6. 39.102
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
[h264 @ 0xde02e0] non-existing PPS 0 referenced
[h264 @ 0xde02e0] decode_slice_header error
NOTE: These error messages don't appear in the original source file. They are
a result of "dd" being used to extract pgssub-ffprobe.infinite.loop.m2ts.
[h264 @ 0xde02e0] non-existing PPS 0 referenced
[h264 @ 0xde02e0] decode_slice_header error
[h264 @ 0xde02e0] no frame!
[mpegts @ 0xddbd20] DTS discontinuity in stream 10: packet 15 with DTS 3084820, packet 16 with DTS 3210667
[mpegts @ 0xddbd20] DTS discontinuity in stream 5: packet 15 with DTS 3084818, packet 16 with DTS 3210669
[mpegts @ 0xddbd20] DTS discontinuity in stream 7: packet 15 with DTS 3084816, packet 16 with DTS 3210671
[mpegts @ 0xddbd20] DTS discontinuity in stream 8: packet 15 with DTS 3084812, packet 16 with DTS 3210674
[mpegts @ 0xddbd20] DTS discontinuity in stream 7: packet 31 with DTS 3509022, packet 32 with DTS 3676103
[mpegts @ 0xddbd20] DTS discontinuity in stream 6: packet 31 with DTS 3509016, packet 32 with DTS 3676109
[mpegts @ 0xddbd20] DTS discontinuity in stream 5: packet 31 with DTS 3512752, packet 32 with DTS 3676127
[mpegts @ 0xddbd20] DTS discontinuity in stream 8: packet 31 with DTS 3508990, packet 32 with DTS 3676135
[mpegts @ 0xddbd20] DTS discontinuity in stream 10: packet 31 with DTS 3508981, packet 32 with DTS 3676144
[mpegts @ 0xddbd20] PES packet size mismatch
Last message repeated 3 times
[NULL @ 0xe06c20] start time for stream 17 is not set in estimate_timings_from_pts
[NULL @ 0xe077e0] start time for stream 18 is not set in estimate_timings_from_pts
[mpegts @ 0xddbd20] PES packet size mismatch
Last message repeated 3 times
[mpegts @ 0xddbd20] Could not find codec parameters for stream 17 (Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0xddbd20] Could not find codec parameters for stream 18 (Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from 'pgssub-ffprobe.infinite.loop.m2ts':
Duration: 00:00:10.53, start: 30.861333, bitrate: 33467 kb/s
Program 1
Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
Stream #0:1[0x1100]: Audio: dts (DTS-HD HRA) ([133][0][0][0] / 0x0085), 48000 Hz, 7.1, fltp
Stream #0:2[0x1101]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 640 kb/s
Stream #0:3[0x1102]: Audio: dts (DTS) ([130][0][0][0] / 0x0082), 48000 Hz, 5.1(side), fltp, 1536 kb/s
Stream #0:4[0x1103]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s
Stream #0:5[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
Stream #0:6[0x1201]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
Stream #0:7[0x1202]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
Stream #0:8[0x1203]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
Stream #0:9[0x1204]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
Stream #0:10[0x1205]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
Stream #0:11[0x1206]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
Stream #0:12[0x1207]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
Stream #0:13[0x1208]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
Stream #0:14[0x1209]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
Stream #0:15[0x120a]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
Stream #0:16[0x120b]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
Stream #0:17[0x120c]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
Stream #0:18[0x120d]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
[pgssub @ 0xde3de0] Unknown subtitle segment type 0x0, length 0
frames.subtitle.0.pts_time="32.629956"
frames.subtitle.1.pts_time="33.005333"
frames.subtitle.2.pts_time="32.942278"
frames.subtitle.3.pts_time="32.942278"
frames.subtitle.4.pts_time="32.942278"
frames.subtitle.5.pts_time="32.942278"
frames.subtitle.6.pts_time="32.942278"
frames.subtitle.7.pts_time="32.942278"
frames.subtitle.8.pts_time="32.942278"
frames.subtitle.9.pts_time="32.942278"
More information about the ffmpeg-user
mailing list