#11190(avcodec:new): H.264 video stops playing without errors
#11190: H.264 video stops playing without errors ----------------------------------+--------------------------------------- Reporter: kevmo314 | Type: defect Status: new | Priority: normal Component: avcodec | Version: unspecified Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ----------------------------------+--------------------------------------- Summary of the bug: The attached video does not play correctly with `ffplay ffmpeg_stops_playing.ts` but plays correctly if I open the file with Windows Media Player How to reproduce: Play the attached file {{{ $ ffplay -loglevel debug media_w254585029_503.ts ffplay version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2003-2021 the FFmpeg developers built with gcc 11 (Ubuntu 11.2.0-19ubuntu1) }}} There don't appear to be any warnings or errors to indicate why it stops. The total file length is 40s. I have reproduced this with ffmpeg against master as well. -- Ticket URL: <https://trac.ffmpeg.org/ticket/11190> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11190: H.264 video stops playing without errors -------------------------------------+----------------------------------- Reporter: kevmo314 | Owner: (none) Type: defect | Status: new Priority: normal | Component: avcodec Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Changes (by kevmo314): * Attachment "ffplay_stops_playing.ts" added. -- Ticket URL: <https://trac.ffmpeg.org/ticket/11190> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11190: H.264 video stops playing without errors -------------------------------------+----------------------------------- Reporter: kevmo314 | Owner: (none) Type: defect | Status: new Priority: normal | Component: avcodec Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by kevmo314): Digging into this, it looks like the POC is out of sequence. Specifically, ffmpeg receives a picture with order 65658 and the next picture has order 65538 which triggers ffmpeg to believe the frame is out of sequence. There is a frame number gap going from 13 -> 1 (instead of 13, 14, 15, 0, 1) however the h264 decoder doesn't seem to correctly detect this and instead ends up in a stuck state. -- Ticket URL: <https://trac.ffmpeg.org/ticket/11190#comment:1> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11190: H.264 video stops playing without errors -------------------------------------+----------------------------------- Reporter: kevmo314 | Owner: (none) Type: defect | Status: new Priority: normal | Component: avcodec Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by kevmo314): A little more context, it looks like this file's SPS indicates that the max POC is 8192 but the POC goes from 122 to 2 reading the slice headers. It appears that FFmpeg isn't doing anything wrong then, but is there a way to ignore the POC? I know this is used for B-frames and such, so not sure how feasible that would be. Patching this line: out_of_order = out->poc < h->next_outputed_poc; and replacing it with: out_of_order = 0; fixes playback. In other words, ignoring the out-of-order-ness of the file. -- Ticket URL: <https://trac.ffmpeg.org/ticket/11190#comment:2> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11190: H.264 video stops playing without errors -------------------------------------+----------------------------------- Reporter: kevmo314 | Owner: (none) Type: defect | Status: new Priority: normal | Component: avcodec Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by Balling): You can use ffplay -vcodec h264_cuvid ffplay_stops_playing.ts if you have nvidia -- Ticket URL: <https://trac.ffmpeg.org/ticket/11190#comment:3> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11190: H.264 video stops playing without errors -------------------------------------+----------------------------------- Reporter: kevmo314 | Owner: (none) Type: defect | Status: new Priority: normal | Component: avcodec Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by kevmo314): Unfortunately we do not have the nvidia decoder and we must use the software decoder. I've submitted a proposed patch here to allow playback of these frames if specific flags are set: https://ffmpeg.org/pipermail /ffmpeg-devel/2024-September/333451.html -- Ticket URL: <https://trac.ffmpeg.org/ticket/11190#comment:4> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11190: H.264 video stops playing without errors -------------------------------------+----------------------------------- Reporter: kevmo314 | Owner: (none) Type: defect | Status: new Priority: normal | Component: avcodec Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by Balling): Your patch was not applied https://patchwork.ffmpeg.org/project/ffmpeg/patch/CAGB5vbEx1eyHtfssYy-f-QO5A... you need to use send-email in git -- Ticket URL: <https://trac.ffmpeg.org/ticket/11190#comment:5> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11190: H.264 video stops playing without errors -------------------------------------+----------------------------------- Reporter: kevmo314 | Owner: (none) Type: defect | Status: new Priority: normal | Component: avcodec Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Changes (by MasterQuestionable): * cc: MasterQuestionable (added) Comment: ͏ Up: https://trac.ffmpeg.org/ticket/11134#comment:7 ͏ Would you kindly instruct how to properly make commits on this project? ͏ Seriously, via email..? ͏ Thanks in advance. -- Ticket URL: <https://trac.ffmpeg.org/ticket/11190#comment:6> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11190: H.264 video stops playing without errors -------------------------------------+----------------------------------- Reporter: kevmo314 | Owner: (none) Type: defect | Status: new Priority: normal | Component: avcodec Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by kevmo314): Replying to [comment:5 Balling]:
Your patch was not applied https://patchwork.ffmpeg.org/project/ffmpeg/patch/CAGB5vbEx1eyHtfssYy-f-QO5A...
you need to use send-email in git
I did use `git send-email` to send that patch. Could you share what is missing in that email/why `git send-email` sent an incorrectly-formatted email? -- Ticket URL: <https://trac.ffmpeg.org/ticket/11190#comment:7> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11190: H.264 video stops playing without errors -------------------------------------+----------------------------------- Reporter: kevmo314 | Owner: (none) Type: defect | Status: new Priority: normal | Component: avcodec Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by Gyan): It may be your repo tree wasn't clean, or fast-forwardable on top of master. -- Ticket URL: <https://trac.ffmpeg.org/ticket/11190#comment:8> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg