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: Fix HEVC/RTMP composition time #8650

Merged
merged 1 commit into from
Apr 4, 2023

Conversation

nquah
Copy link
Contributor

@nquah nquah commented Apr 4, 2023

Fixes bug in Enhanced RTMP implementation, where HEVC streams with B-frames enabled are not adhering to the spec.

Credit to derrod

Description

Populates non-zero composition times in the FLV extended video tag header for HEVC streams.

Motivation and Context

See #8522 for context.

The Enhanced RTMP spec provides an optimization where HEVC streams without B-frames do not need to send a composition time of 3 bytes (with value 0) for every frame.

This patch fixes a bug: Composition times are just not getting set at all, instead of only when the value of the composition time is 0.

How Has This Been Tested?

We ran streams against YouTube, inspected the bitstream and confirmed that composition times are correctly set.

Types of changes

Bug fix (non-breaking change which fixes an issue)

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.

@jp9000
Copy link
Member

jp9000 commented Apr 4, 2023

Hi there! Just as a minor nitpick, please make sure to use present tense rather than past tense in PRs and commits.

@jp9000 jp9000 added the Bug Fix Non-breaking change which fixes an issue label Apr 4, 2023
Copy link
Member

@derrod derrod left a comment

Choose a reason for hiding this comment

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

Tested this locally on my MacBook and confirmed streams with b-frames now work correctly. Also made sure this still compiles/works without ENABLE_HEVC.

@jp9000 jp9000 changed the title obs-outputs: Fixes HEVC/RTMP composition time obs-outputs: Fix HEVC/RTMP composition time Apr 4, 2023
@nquah nquah force-pushed the enhanced-rtmp-hevc-fix branch from 5db749a to 34e98b4 Compare April 4, 2023 20:00
Fixes bug in Enhanced RTMP implementation. Populates non-zero
HEVC composition times in the FLV extended video tag header.
@derrod derrod force-pushed the enhanced-rtmp-hevc-fix branch from 34e98b4 to 597d74c Compare April 4, 2023 20:37
@derrod derrod merged commit eca5c51 into obsproject:master Apr 4, 2023
@RytoEX RytoEX added this to the OBS Studio 29.1 milestone Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Fix Non-breaking change which fixes an issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants