Distorted video on H6 playback

  • Hi,

    this file does not play cleanly for me on OrangePi 3 with latest LibreELEC nightly:

    cedrus_broken.ts - Google Drive

    It is a recorded live stream, the issue appears at second 35.

    MPV player on Linux with i965 graphics reports this in error log, but continues to play cleanly:

    [ffmpeg/video] h264: reference picture missing during reorder

    [ffmpeg/video] h264: Missing reference picture, default is 65475

    On Cedrus the engine seems to never recover, if you continue to play the stream even for hours it remains distorted (tested on the live stream). At least for me.

    Can someone confirm if this is happening for them as well?

  • Thanks, I'll take a look but not promises when. I thought I fixed all such issues, but I guess I missed a spot.

  • I spend few hours on this problem and I couldn't find any solution (but that doesn't mean it doesn't exist). Just to be clear, video stream is broken - it's missing reference for at least one frame. Given that this is live stream, workaround would be to stop playback and start it again. Let me know if that helps.

  • Hmmm, that is not exactly going to fly, as these are supposed to be remote automated devices just playing live video streams without local intervention :/ . Where would be the right place to fix this? FFMPEG, V4L-Requests kernel module or Cedrus driver?

  • Either in Cedrus driver or V4L2 requests H264 codec in ffmpeg. Note that this is somewhat HW specific - position of reference frames must be constant in frame list in HW. However, because there is missing reference, you don't know where to put that new reference and order breaks. That's why even if all following frames are good, there is still issue. I also tried to put frames on new positions, but that also didn't really work. Additional problem is that video is interlaced. For decoding such videos additional rules need to be considered for proper decoding.

    Anyway, stream is broken, which puts it on low priority.