GPAC Documentation

website·Indexed 34 days ago

https://wiki.gpac.io

Technical documentation for GPAC, covering its filter system, playback features, and multimedia scene description. Includes detailed specifications for built-in properties, reframers, decoders, and multiplexers, as well as API bindings for Python and NodeJS, and guides for implementing custom JavaScript-based filters.

Tokens
220.8K
Snippets
972
Records
1.5K
Agent score
61%

What's inside GPAC

  1. Overview of the flist sources concatenator filter

    The flist filter is used to play playlist files or a list of sources. It supports any source compatible with GPAC, including remote/local files and streaming sessions (TS, RTP, DASH). The filter demultiplexes inputs and recomputes timestamps into a continuous timeline. It attempts to remap input PIDs to existing output PIDs of the same type; otherwise, it declares new output PIDs. This filter requires the graph resolver to be activated.
    # Register name used to load the filter
    flist
  2. Overview of GPAC Unidirectional Transport Support

    GPAC supports sending and receiving files over unidirectional transport for broadcast/multicast delivery of OTT content (Multicast ABR or M-ABR). It provides a unified interface via the following protocol schemes:

    • route://: Generic ROUTE (Real-time Object delivery over Unidirectional Transport) implementation.
    • atsc://: ATSC 3.0 ROUTE implementation (supports both US and Korean flavors).
    • mabr://: FLUTE (File Delivery over Unidirectional Transport) implementation, tested with DVB-MABR v1.2.1 for DASH.
  3. Overview of the RTSP server filter (rtspout)

    The rtspout filter implements an RTSP 1.0 server supporting OPTIONS, DESCRIBE, SETUP, PLAY, PAUSE, and TEARDOWN. It supports both RTP over UDP and RTP interleaved over RTSP. The server runs on TCP and processes requests sequentially. If TLS is enabled via cert and pkey options, the default port changes to 322.
  4. Overview of the GPAC Compositor filter

    The compositor filter (register name: compositor) allows for the timed mixing of audio, video, text, and graphics. It can be explicitly loaded or automatically loaded during graph resolution. It operates in two primary modes: media-client mode and filter mode.
  5. Overview of the RTP Streamer (rtpout) filter

    The rtpout filter handles SDP/RTP output streaming. It can be loaded explicitly by its register name rtpout or automatically during graph resolution. It supports two primary modes of operation: SDP mode and Direct RTP mode.
  6. Overview of the GPAC httpout filter

    The httpout filter implements an HTTP server/client capable of handling GET, HEAD, PUT, POST, DELETE, and basic OPTIONS methods. It supports single or multiple byte ranges for GET and PUT/POST.

    Key behaviors include:

    • Root Directory: If one read directory is specified, it becomes the server root /. If multiple are specified, the root contains mount points named after the directories.
    • Write Directory: Uploaded resources are identified as files within the specified write directory.
    • Compression: Text files are compressed using gzip or deflate if supported by the client (unless zmax is set to 0).
    • Directory Listing: Can be enabled via the dlist option to provide an Apache-style HTML listing.
  7. Overview of the Media Reframer filter

    The reframer filter ensures that input PIDs are properly framed (1 packet = 1 Access Unit). This is typically required for remultiplexing operations when the source and destination files use the same format. This filter must be explicitly loaded as it is not checked during graph resolution. It can be connected to other filters of the same class.
    # Example of loading the reframer filter
    gpac -i input.mp4 reframer [dst]
  8. Overview of L3D DASH (Low Latency Live Delivery)

    L3D DASH implements Segment Sequence Representation (SSR) as defined in MPEG-DASH Annex G.28. It enables ultra-low latency streaming through partial segment delivery using CMAF chunks. The manifest automatically signals SSR support via the urn:mpeg:dash:ssr:2023 essential property when the #SSR property is used. There are two primary modes:

    1. Low Delay Representation (G.28.1): Requires a dedicated tune-in adaptation set with IDR frames at every partial segment boundary.
    2. Low Latency Segment Sequence Representation (G.28.2): Compatible with LL-HLS, using IDR frames only at segment boundaries.
  9. Overview of the routein filter

    The routein filter is used to receive files delivered over multicast. It supports three primary modes of operation: ATSC 3.0, generic ROUTE, and DVB-MABR FLUTE. The mode is determined by the URL scheme used in the source:

    • ATSC 3.0: atsc://
    • Generic ROUTE: route://IP:PORT
    • DVB-MABR: mabr://IP:PORT (points to the bootstrap FLUTE channel for gateway configuration).
  10. Overview of custom GPAC filters

    Custom filters are created by the application without an associated registry. Because there is no internal registry representation, the application must manually specify capabilities and behaviors using helper callback functions.

    Limitations of custom filters:

    • They do not have exposed arguments.
    • They cannot be used as a source for filters that load a source filter graph dynamically (e.g., dashin filter).
    • They cannot be used as a destination for filters that load a destination filter graph dynamically (e.g., dasher filter).
    • They cannot be cloned.
  11. Overview of the Bitstream Metadata Rewriter (bsrw) filter

    The bsrw filter rewrites metadata for various bitstream formats. It must be explicitly loaded as it is not checked during graph resolution. It operates in passthrough mode for unsupported codecs.

    Supported modifications by codec:

    • MPEG-4 Visual: Sample aspect ratio, profile, and level.
    • AVC|H264, HEVC, VVC: Sample aspect ratio, profile, level, profile compatibility, video format, video fullrange, color primaries, transfer characteristics, matrix coefficients, and timecodes (AVC/HEVC).
    • AV1: Timecode.
    • ProRes: Sample aspect ratio, color primaries, transfer characteristics, and matrix coefficients.

    Note: For HEVC and VVC, some properties (like profile IDC and profile space) are modified in the stream configuration rather than the bitstream itself. Values default to -1 (keep existing info). A sar value of 0/0 removes the sample aspect ratio if possible.