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

Support hvc1 box & enable simple access of hevc parameter sets #128

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

j-baker
Copy link

@j-baker j-baker commented Oct 22, 2023

I have an HEVC mp4 file of the hvc1 kind. In order to construct the decoder (using Apple VideoToolbox) I need the PPS, SPS, VPS parameter sets.

This PR does two things:

  1. It adds parsing for the hvc1 box. This appears similar to hev1 at least at the 'trak' level. In my files, there are additional inner boxes, for example a colr box. I therefore skip nested boxes.
  2. Enable hevc accessors for the vps, pps, sps properties that are required to initialise many decoders.

I should note here - I have no particular video decoding knowledge, but do have some experience with binary formats and software engineering in general - have reverse engineered what I need in order to solve my present problem by looking at output from the MP4Box tool.

I have an HEVC mp4 file of the `hvc1` kind. In order to construct
the decoder (using Apple VideoToolbox) I need the PPS, SPS, VPS
parameter sets.

This PR does two things:
1. It adds parsing for the `hvc1` box. This appears similar to `hev1`
   at least at the 'trak' level. In my files, there are additional
   inner boxes, for example a `colr` box. I therefore skip nested
   boxes.
1. Enable hevc accessors for the vps, pps, sps properties that are
   required to initialise many decoders.

I should note here - I have no _particular_ video decoding knowledge,
but do have some experience with binary formats and software engineering
in general - have reverse engineered what I need in order to solve my
present problem by looking at output from the `MP4Box` tool.
@emkman99
Copy link
Contributor

emkman99 commented Apr 1, 2024

I added a few fixes to this pull request: j-baker#2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants