#3705(ffplay:new): FFPlay cannot seek H264 file
#3705: FFPlay cannot seek H264 file -------------------------------------+------------------------------------- Reporter: | Type: defect Aleksoid1978 | Priority: normal Status: new | Version: Component: ffplay | unspecified Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Summary of the bug: Sample: http://aleksoid.voserver.net/Sample/H264/no_recovery_ffmpeg.m2ts Ticket #3652 fixed(decoding is good), but seek is not working How to reproduce: {{{ % ffplay.exe no_recovery_ffmpeg.m2ts ffplay version N-63843-g6d40849 Copyright (c) 2003-2014 the FFmpeg developers built on Jun 8 2014 22:02:04 with gcc 4.8.2 (GCC) configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-li bass --enable-libbluray --enable-libcaca --enable-libfreetype --enable- libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable- libmp3lame --enable-libopencore-amrnb -- enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable- librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame - -enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable- libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable- libx264 --enable-libx265 --enable- libxavs --enable-libxvid --enable-decklink --enable-zlib libavutil 52. 89.100 / 52. 89.100 libavcodec 55. 66.100 / 55. 66.100 libavformat 55. 42.101 / 55. 42.101 libavdevice 55. 13.101 / 55. 13.101 libavfilter 4. 6.100 / 4. 6.100 libswscale 2. 6.100 / 2. 6.100 libswresample 0. 19.100 / 0. 19.100 libpostproc 52. 3.100 / 52. 3.100 Input #0, mpegts, from 'no_recovery_ffmpeg.m2ts': sq= 0B f=0/0 Duration: 00:01:58.20, start: 4328.545078, bitrate: 13543 kb/s Program 1 Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc [h264 @ 0464ce20] mmco: unref short failure 49KB sq= 0B f=0/0 Last message repeated 1 times [h264 @ 0464c600] mmco: unref short failure 0KB sq= 0B f=0/0 [h264 @ 0464c600] number of reference frames (0+4) exceeds max (3; probably corrupt input), discarding one [h264 @ 0464dc60] reference picture missing during reorder [h264 @ 0464dc60] Missing reference picture, default is 65512 [h264 @ 045677c0] mmco: unref short failure [h264 @ 045677c0] number of reference frames (0+4) exceeds max (3; probably corrupt input), discarding one [h264 @ 0464dc60] reference picture missing during reorder [h264 @ 0464dc60] Missing reference picture, default is 65512 [h264 @ 0464dc60] reference picture missing during reorderB f=0/0 [h264 @ 0464dc60] Missing reference picture, default is 65512 [h264 @ 0464dc60] reference picture missing during reorder [h264 @ 0464dc60] Missing reference picture, default is 65512 [h264 @ 0464ce20] mmco: unref short failure 433KB sq= 0B f=0/0 [h264 @ 0464ce20] number of reference frames (0+4) exceeds max (3; probably corrupt input), discarding one [h264 @ 04566700] mmco: unref short failure [h264 @ 04566700] number of reference frames (0+4) exceeds max (3; probably corrupt input), discarding one [h264 @ 05540a80] Missing reference picture, default is 00B f=0/0 [h264 @ 0464c600] reference picture missing during reorder Last message repeated 1 times [h264 @ 0464c600] Missing reference picture, default is 0 Last message repeated 1 times [h264 @ 05540a80] Missing reference picture, default is 0 [h264 @ 0464dc60] mmco: unref short failure [h264 @ 0464c600] reference picture missing during reorder Last message repeated 1 times [h264 @ 0464c600] Missing reference picture, default is 0 Last message repeated 1 times [h264 @ 04566d00] reference picture missing during reorder [h264 @ 04566d00] Missing reference picture, default is 65540 [h264 @ 05540a80] Missing reference picture, default is 0 [h264 @ 0464c600] reference picture missing during reorderB f=0/0 Last message repeated 1 times [h264 @ 0464c600] Missing reference picture, default is 0 Last message repeated 1 times [h264 @ 04566d00] reference picture missing during reorder [h264 @ 04566d00] Missing reference picture, default is 65540 [h264 @ 05540a80] Missing reference picture, default is 00B f=0/0 [h264 @ 0464c600] reference picture missing during reorder Last message repeated 1 times [h264 @ 0464c600] Missing reference picture, default is 0 Last message repeated 1 times [h264 @ 04566d00] reference picture missing during reorder [h264 @ 04566d00] Missing reference picture, default is 65540 [h264 @ 04566d00] reference picture missing during reorder [h264 @ 04566d00] Missing reference picture, default is 65540 [h264 @ 0464c600] mmco: unref short failure 0KB sq= 0B f=0/0 [h264 @ 0464c600] number of reference frames (0+4) exceeds max (3; probably corrupt input), discarding one [h264 @ 0464dc60] mmco: unref short failure [h264 @ 0464dc60] number of reference frames (0+4) exceeds max (3; probably corrupt input), discarding one [h264 @ 0464c600] mmco: unref short failure 424KB sq= 0B f=0/0 [h264 @ 0464ce20] mmco: unref short failure 29KB sq= 0B f=0/0 [h264 @ 045677c0] reference picture missing during reorder [h264 @ 045677c0] Missing reference picture, default is 65542 [h264 @ 04567fe0] mmco: unref short failure [h264 @ 045677c0] reference picture missing during reorder [h264 @ 045677c0] Missing reference picture, default is 65542 [h264 @ 045677c0] reference picture missing during reorder [h264 @ 045677c0] Missing reference picture, default is 65542 [h264 @ 045677c0] reference picture missing during reorderB f=0/0 [h264 @ 045677c0] Missing reference picture, default is 65542 }}} After pressing RIGHT/LEFT key - picture freezes. -- Ticket URL: <https://trac.ffmpeg.org/ticket/3705> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#3705: Seeking fails for H264 file -------------------------------------+------------------------------------- Reporter: | Owner: Aleksoid1978 | Status: open Type: defect | Component: Priority: normal | undetermined Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by cehoyos): * status: new => open * version: unspecified => git-master * component: ffplay => undetermined * reproduced: 0 => 1 Comment: {{{ $ ffmpeg -ss 0.1 -i no_recovery_ffmpeg_cut.h264 out.avi ffmpeg version N-63852-gf341340 Copyright (c) 2000-2014 the FFmpeg developers built on Jun 9 2014 16:59:00 with gcc 4.7 (SUSE Linux) configuration: --enable-gpl libavutil 52. 89.100 / 52. 89.100 libavcodec 55. 66.100 / 55. 66.100 libavformat 55. 42.101 / 55. 42.101 libavdevice 55. 13.101 / 55. 13.101 libavfilter 4. 7.100 / 4. 7.100 libswscale 2. 6.100 / 2. 6.100 libswresample 0. 19.100 / 0. 19.100 libpostproc 52. 3.100 / 52. 3.100 no_recovery_ffmpeg_cut.h264: could not seek to position 0.100 Input #0, h264, from 'no_recovery_ffmpeg_cut.h264': Duration: N/A, bitrate: N/A Stream #0:0: Video: h264 (High), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1200k tbn, 47.95 tbc Output #0, avi, to 'out.avi': Metadata: ISFT : Lavf55.42.101 Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 23.98 fps, 23.98 tbn, 23.98 tbc Metadata: encoder : Lavc55.66.100 mpeg4 Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> mpeg4 (mpeg4)) Press [q] to stop, [?] for help frame= 0 fps=0.0 q=0.0 Lsize= 6kB time=00:00:00.00 bitrate=N/A video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used) }}} -- Ticket URL: <https://trac.ffmpeg.org/ticket/3705#comment:1> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#3705: Seeking fails for H264 file -------------------------------------+------------------------------------- Reporter: | Owner: Aleksoid1978 | Status: open Type: defect | Component: Priority: normal | undetermined Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by Aleksoid1978): There is progress on this issue ?? -- Ticket URL: <https://trac.ffmpeg.org/ticket/3705#comment:2> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#3705: Seeking fails for H264 file -------------------------------------+------------------------------------- Reporter: | Owner: Aleksoid1978 | Status: open Type: defect | Component: Priority: normal | undetermined Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by Aleksoid1978): There is progress on this issue ?? -- Ticket URL: <https://trac.ffmpeg.org/ticket/3705#comment:3> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#3705: Seeking fails for H264 file -------------------------------------+------------------------------------- Reporter: | Owner: Aleksoid1978 | Status: open Type: defect | Component: Priority: normal | undetermined Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by Aleksoid1978): There is progress on this issue ?? -- Ticket URL: <https://trac.ffmpeg.org/ticket/3705#comment:4> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#3705: Seeking fails for H264 file -------------------------------------+------------------------------------- Reporter: | Owner: Aleksoid1978 | Status: open Type: defect | Component: Priority: normal | undetermined Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by Aleksoid1978): Old link is dead. New link - https://yadi.sk/i/jteUfal9hY7QR -- Ticket URL: <https://trac.ffmpeg.org/ticket/3705#comment:5> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#3705: Seeking fails for H264 file -------------------------------------+------------------------------------- Reporter: | Owner: Aleksoid1978 | Status: open Type: defect | Component: Priority: normal | undetermined Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by Aleksoid1978): There is progress on this issue ?? -- Ticket URL: <https://trac.ffmpeg.org/ticket/3705#comment:6> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#3705: Seeking fails for H264 file -------------------------------------+------------------------------------- Reporter: | Owner: Aleksoid1978 | Status: open Type: defect | Component: Priority: normal | undetermined Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by cehoyos): Workaround is to use {{{-flags2 +showall}}} -- Ticket URL: <https://trac.ffmpeg.org/ticket/3705#comment:7> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#3705: Seeking fails for H264 file -------------------------------------+------------------------------------- Reporter: | Owner: Aleksoid1978 | Status: open Type: defect | Component: Priority: normal | undetermined Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by Aleksoid1978): It's can give an artifact after seeking, but PotPlayer & Microsoft DTV-DVD Video decoder seeking normal. -- Ticket URL: <https://trac.ffmpeg.org/ticket/3705#comment:8> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#3705: Seeking fails for H264 file -------------------------------------+------------------------------------- Reporter: | Owner: Aleksoid1978 | Status: open Type: defect | Component: Priority: normal | undetermined Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by v0lt): Another sample - https://yadi.sk/i/JZeFZiDFfXlmRg Rough patch - https://pastebin.com/kZiRU1uQ -- Ticket URL: <https://trac.ffmpeg.org/ticket/3705#comment:9> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#3705: Seeking fails for H264 file -------------------------------------+------------------------------------- Reporter: | Owner: Aleksoid1978 | Status: open Type: defect | Component: Priority: normal | undetermined Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by v0lt): After searching, I get this log {{{ Reinit context to 1920x1088, pix_fmt: dxva2_vld [h264 @ 000000000f00e0c0] co located POCs unavailable [h264 @ 000000000f00e0c0] co located POCs unavailable [h264 @ 000000000f00e0c0] co located POCs unavailable [h264 @ 000000000f00e0c0] co located POCs unavailable [h264 @ 000000000f00e0c0] mmco: unref short failure [h264 @ 000000000f00e0c0] number of reference frames (0+4) exceeds max (3; probably corrupt input), discarding one [h264 @ 000000000f00e0c0] reference picture missing during reorder [h264 @ 000000000f00e0c0] Missing reference picture, default is 65534 [h264 @ 000000000f00e0c0] reference picture missing during reorder [h264 @ 000000000f00e0c0] Missing reference picture, default is 65534 [h264 @ 000000000f00e0c0] reference picture missing during reorder [h264 @ 000000000f00e0c0] Missing reference picture, default is 65534 [h264 @ 000000000f00e0c0] reference picture missing during reorder [h264 @ 000000000f00e0c0] Missing reference picture, default is 65534 [h264 @ 000000000f00e0c0] mmco: unref short failure [h264 @ 000000000f00e0c0] number of reference frames (0+4) exceeds max (3; probably corrupt input), discarding one [h264 @ 000000000f00e0c0] mmco: unref short failure }}} On line ''h->cur_pic_ptr->recovered |= 1;'' I get the following data. {{{ err == 0 h->short_ref_count == 3 pps_ref_count[0] == 4 pps_ref_count[1] == 1 h->avctx->has_b_frames == 2 h->picture_structure == PICT_FRAME h->has_recovery_point == 0 }}} I see two ways to change the check. {{{ h->short_ref_count<=3 }}} or {{{ pps_ref_count[0] <= 4 && pps_ref_count[1] <= 1 && h->avctx->has_b_frames }}} But I do not know which one is more correct. -- Ticket URL: <https://trac.ffmpeg.org/ticket/3705#comment:10> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#3705: Seeking fails for H264 file --------------------------------------+----------------------------------- Reporter: Aleksoid1978 | Owner: Type: defect | Status: open Priority: normal | Component: avcodec Version: git-master | Resolution: Keywords: h264 | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | --------------------------------------+----------------------------------- Changes (by cehoyos): * keywords: => h264 * component: undetermined => avcodec -- Ticket URL: <https://trac.ffmpeg.org/ticket/3705#comment:11> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#3705: Seeking fails for H264 file --------------------------------------+----------------------------------- Reporter: Aleksoid1978 | Owner: Type: defect | Status: open Priority: normal | Component: avcodec Version: git-master | Resolution: Keywords: h264 | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | --------------------------------------+----------------------------------- Comment (by v0lt): Another more radical patch - https://sourceforge.net/p/mpcbe/code/4315/ We haven't found any problems with it yet. If anyone has information, why not do this, please write here. -- Ticket URL: <https://trac.ffmpeg.org/ticket/3705#comment:12> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#3705: Seeking fails for H264 file --------------------------------------+----------------------------------- Reporter: Aleksoid1978 | Owner: Type: defect | Status: open Priority: normal | Component: avcodec Version: git-master | Resolution: Keywords: h264 | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | --------------------------------------+----------------------------------- Comment (by cehoyos): Not every H.264 I-frame is a recovery point. Please understand that patches - made with `git format-patch` - can only be discussed on the development mailing list. -- Ticket URL: <https://trac.ffmpeg.org/ticket/3705#comment:13> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#3705: Seeking fails for H264 file --------------------------------------+----------------------------------- Reporter: Aleksoid1978 | Owner: Type: defect | Status: open Priority: normal | Component: avcodec Version: git-master | Resolution: Keywords: h264 | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | --------------------------------------+----------------------------------- Comment (by v0lt): Yes. You are right all three patches do not work on NVIDIA GeForce 9500 GS (PureVideo Feature Set A (VP2)). But on new cards (like the NVIDIA GTX 950), all three patches work well. -- Ticket URL: <https://trac.ffmpeg.org/ticket/3705#comment:14> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#3705: Seeking fails for H264 file --------------------------------------+----------------------------------- Reporter: Aleksoid1978 | Owner: Type: defect | Status: open Priority: normal | Component: avcodec Version: git-master | Resolution: Keywords: h264 | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | --------------------------------------+----------------------------------- Comment (by Aleksoid1978): Moment - not working with DXVA2 decoder on NVIDIA GeForce? 9500 GS, after seeking artefact on screen. -- Ticket URL: <https://trac.ffmpeg.org/ticket/3705#comment:15> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#3705: Seeking fails for H264 file --------------------------------------+----------------------------------- Reporter: Aleksoid1978 | Owner: (none) Type: defect | Status: open Priority: normal | Component: avcodec Version: git-master | Resolution: Keywords: h264 | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | --------------------------------------+----------------------------------- Comment (by Balling): There are no IDR frames in this file, and only recovery on some non-IDR frames. First of all this is not valid bistream: per the ITU-T H.264 specs 7.4.1.2.2 "A bitstream conforming to this Recommendation | International Standard consists of one or more coded video sequences. The first access unit of each coded video sequence is an IDR access unit." To clarify that the above applies to decoding order, not display order: 3.64 "The first picture of each coded video sequence in decoding order is an IDR picture" mmco: unref short failure is evidense of that. If you need to decode this file you must actually at least insert recovery points SEIs anywhere they are needed. Yet the file has no recovery points. -- Ticket URL: <https://trac.ffmpeg.org/ticket/3705#comment:16> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#3705: Seeking fails for H264 file --------------------------------------+----------------------------------- Reporter: Aleksoid1978 | Owner: (none) Type: defect | Status: open Priority: normal | Component: avcodec Version: git-master | Resolution: Keywords: h264 | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | --------------------------------------+----------------------------------- Comment (by Balling): Invalid file and invalid fix. You cannot mark each I frame as key frame because sometimes frames after I frame will need frames before, which means you cannot cleanly recover. Powerdvd just decodes all frames starting the first frame. So it is just a dup with #5309 -- Ticket URL: <https://trac.ffmpeg.org/ticket/3705#comment:17> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg