Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

obs-outputs: Adjust HEVCDecoderConfigurationRecord for hvc1 tag #10672

Merged
merged 1 commit into from May 18, 2024

Conversation

derrod
Copy link
Member

@derrod derrod commented May 13, 2024

Description

Sets ps_array_completeness when creating the HEVC Decoder Configuration Record to 1.

Motivation and Context

The hvc1 tag is used in Enhanced FLV/RTMP and the native MP4 muxer (#10608) because Apple for some reason does not support the more permissive hev1 tag, and one of the requirements laid out in the specification (ISO/IEC 14496-15) is that for hvc1 the array_completeness value for parameter sets needs to be 1.

FFmpeg also just sets this to 1 if the tag is hvc1 without any additional checks for bitstream modification and I checked playback of these files on Windows and macOS with various players and browsers so it's probably fine.

As far as I can tell this really just means that all SPS/VPS/PPS need to be inside the HEVCDecoderConfigurationRecord present in the moov atom, which is what we do anyways.

How Has This Been Tested?

Tested as part of #10608.

Types of changes

  • Tweak (non-breaking change to improve existing functionality)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

We mux HEVC with the hvc1 tag, which requires the parameter sets'
array_completeness to be set to 1.
@derrod derrod changed the title obs-outputs: Set ps_array_completeness correctly obs-outputs: Adjust HEVCDecoderConfigurationRecord for hvc1 tag May 13, 2024
Copy link
Member

@RytoEX RytoEX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At a glance, this seems fine. Would appreciate someone else giving it a sanity check.

@WizardCM WizardCM added the Enhancement Improvement to existing functionality label May 17, 2024
@Lain-B Lain-B merged commit 7cd7278 into obsproject:master May 18, 2024
14 checks passed
@RytoEX RytoEX added this to the OBS Studio (Next Version) milestone May 18, 2024
@derrod derrod deleted the set-hevc-array-completeness branch May 18, 2024 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improvement to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants