[RPi5] H.265 TS Severe Artefacts when Skipping Backwards

  • I play different H.265 TS videos on my Raspberry Pi 5, LibreElec 12.2.1. Skipping backwards always yields very severe artefacts. It seems to me like the skip does not hit the correct frame.

    For example, this can be tested by generating a H.265 TS file using:

    wget https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/720/Big_Buck_Bunny_720_10s_2MB.mp4

    ffmpeg -i Big_Buck_Bunny_720_10s_2MB.mp4 -c:v libx265 -c:a aac -f mpegts Big_Buck_Bunny_720_10s_2MB.ts

    I only observe this effect with H.265 TS files, not with H.264 nor with non-TS files.

    Could there be a bug in the player HW/SW? Any ideas how this could be fixed?

  • TS files don't have an index of iframes, so seeking generally doesn't result in a decodable frame until the next iframe.

    The decoder has the choice to display a corrupt frame or nothing.

    Most container (e.g. mkv) do contain the index, so always seek to a decodable frame.