MediaCodecs.H265 (MediCodecs v0.6.0)

View Source

Utilities for working with H.265 (HEVC) video codec.

Summary

Functions

Convert an Annex B formatted access unit to an elementary stream.

Convert an access unit to a list of NALUs.

Pops parameter sets from access unit.

Functions

annexb_to_elementary_stream(access_unit, nalu_prefix_size \\ 4)

@spec annexb_to_elementary_stream(
  access_unit :: binary() | [binary()],
  nalu_prefix_size :: integer()
) :: binary()

Convert an Annex B formatted access unit to an elementary stream.

The NALU prefix size can be specified, defaulting to 4 bytes.

nalus(access_unit)

@spec nalus(access_unit :: binary()) :: [binary()]

Convert an access unit to a list of NALUs.

pop_parameter_sets(access_unit)

@spec pop_parameter_sets(binary()) ::
  {{vps :: [binary()], sps :: [binary()], pps :: [binary()]},
   access_unit :: [binary()]}

Pops parameter sets from access unit.