Skip to content

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.

2 participants