HDR metadata SEI not repeated for every coded video sequence

Issue #333 new
Former user created an issue

By default x265 only prefixes the SEI with the HDR metadata to the first IDR frame. Following a discussion on doom9 this seems to be wrong. Such a SEI must always be repeated for every coded video sequence.

Section D.2.28 of the HEVC spec says:

The mastering display colour volume SEI message persists in decoding order from the current access unit until the end of the coded video sequence.

So implicitly the SEI becomes void after the end of a coded video sequence.

Comments (9)

  1. Pradeep Ramachandran Account Deactivated

    x265 repeats VPS, SPS, PPS, and SEI messages (which include HDR metadata) at every IDR frame if --repeat-headers option is included in the command-line. Since the default encoder settings is for open-gop, this option is disabled by default.

    Please try enabling this and let us know if it still doesn't work.

  2. Former user Account Deleted

    Yes, it works with --repeat-headers (documentation doesn't mention SEI repeating, btw.). But that's besides the point. The SEI MUST be repeated to apply to the complete stream according to the spec. It loses its meaning once a CVS ends. This is not the case for VPS, SPS and PPS as they remain active beyond that for the base layer. VPS/SPS/PPS can also be found in the headers of MP4 or MKV, the HDR SEI cannot. So a player doesn't know it is playing HDR if it seeks into e.g. the middle of a file without playing the first IDR frame.

    Since the default encoder settings is for open-gop, this option is disabled by default.

    I don't understand.

  3. Selur

    the point is that atm. HDR isn't spec compliant the way x265 implements it, it only comes spec compliant with '--repeat-headers' enabled so either HDR signaling should only be done when '--repeat-headers' is enabled or the whole thing is broken,.. seeing that there is work on HDR10 support, this should definitely be fixed,...

  4. H0W1K2

    Just a suggestion to developers, may be add option when --uhd-bd is included in command line, apply --repeat-headers automatically just as a if option was enabled, if not enabled or included already.

  5. Former user Account Deleted

    may be add option when --uhd-bd is included in command line, apply --repeat-headers automatically

    No, since UltraHD Blu-ray does not require HDR and HDR is not limited to UltraHD Blu-ray. It would be a work-around if tied to the actual HDR options like e.g. --master-display, though.

  6. Log in to comment