[x86-64] Intermittent Green Image on HDR Files where HDR Metadata changes with VAAPI HW Decoding on

  • This issue is a difficult one...

    As the title says, I´m experiencing intermittent green images on HDR files where HDR metadata changes with vaapi hw decoding on. This is on a system with an AMD RX6600 and LE13 nightly.

    This happens on UHD BD rips that come from multi branch/seamless branching discs. The problem is that not every seamless branching disc rip exhibits this issue on LE. For example, the 4K disc of Alita Battle Angel is a seamless branching title (the movie has different opening titles in different languages; these are different segments) with changing metadata; this disc does NOT exhibit an intermittent green image on the merging spot.

    The new Arrow Video box set of Stranger Things is a seamless branching release. They have a Netflix intro and outro that are added to every episode. The problem is, they have different HDR metadata, so whenever an episode is played, playback starts - the intro plays, and briefly before the actual episode plays, I get a green image...



    About the HDMI output... I checked with my HDFury Arcana what happens with the metadata - if it changes or so. It stays with the metadata of the intro until playback stops. This is identical to the behavior of my bluray player. The question is: Is this the preferred way of playing back such media? (In my opinion, such media is wrongly mastered, as we don´t have any chance of changing this; this is probably fine, although not ideal... different problem)

    For example, this issue gets worse when looking at other platforms. On Windows, dynamic HDR metadata changes are working, and with Kodi this triggers a complete resync of the display signal when such a merging spot is being played... An absolutely unwatchable experience; that was actually a reason why I have switched over to LE... (Similar issue https://github.com/mpv-player/mpv/issues/11538) I have no idea what would happen when LE/linux would be able of dynamic HDR metadata changes on playback... I guess this would introduce many more regressions...

    As for 4K rips from seamless branching discs, where every segment has the same HDR metadata, those play just fine. (on all platforms)


    Anyway, back to the issue with the green image - is it possible to avoid this (without transcoding all files)? In my understanding, it's the decoder that doesn´t like it; however, sometimes it's okay? (Is this an I, P, and B-frame mismatch?) Or is it possible to make this green image just black?


    If needed, I can upload some debug logs or probably DM someone a small sample.