Giter Site home page Giter Site logo

membrane_h265_plugin's Introduction

Membrane H265 Plugin

Hex.pm API Docs

Membrane H265 parser. It is the Membrane element responsible for parsing the incoming h265 stream. The parsing is done as a sequence of the following steps:

  • Splitting the h265 stream into stream NAL units, based on the "Annex B" of the "ITU-T Rec. H.265 (08/2021)"
  • Parsing the NAL unit headers, so that to read the type of the NAL unit
  • Parsing the NAL unit body with the appropriate scheme, based on the NAL unit type read in the step before
  • Aggregating the NAL units into a stream of access units

The output of the element is the incoming binary payload, enriched with the metadata describing the division of the payload into access units.

Installation

The package can be installed by adding membrane_h265_plugin to your list of dependencies in mix.exs:

def deps do
  [
    {:membrane_h265_plugin, "~> 0.3.1"}
  ]
end

Usage

The following pipeline takes H265 file, parses it, and then decodes it to the raw video.

defmodule Decoding.Pipeline do
  use Membrane.Pipeline

  alias Membrane.{File, H265}

  @impl true
  def handle_init(_ctx, _opts) do
    structure =
      child(:source, %File.Source{location: "test/fixtures/input-10-1920x1080.h265"})
      |> child(:parser, H265.Parser)
      |> child(:decoder, H265.FFmpeg.Decoder)
      |> child(:sink, %File.Sink{location: "output.raw"})

    {[spec: structure], nil}
  end

  @impl true
  def handle_element_end_of_stream(:sink, _ctx_, state) do
    {[terminate: :normal], state}
  end
end

membrane_h265_plugin's People

Contributors

gbillal avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.