Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Register name used to load filter: gsfmx
This filter provides GSF (GPAC Super/Simple/Serialized/Stream/State Format) multiplexing.
It serializes the stream states (config/reconfig/info update/remove/eos) and packets of input PIDs. This allows either saving to file a session, or forwarding the state/data of streams to another instance of GPAC using either pipes or sockets. Upstream events are not serialized.
The default behaviour does not insert sequence numbers. When running over general protocols not ensuring packet order, this should be inserted.
The serializer sends tune-in packets (global and per pid) at the requested carousel rate - if 0, no carousel. These packets are marked as redundant so that they can be discarded by output filters if needed.
The stream format can be encrypted in AES 128 CBC mode. For all packets, the packet header (header, size, frame size/block offset and optional seq num) are in the clear and the followings byte until the last byte of the last multiple of block size (16) fitting in the payload are encrypted.
For data packets, each fragment is encrypted individually to avoid error propagation in case of losses.
For other packets, the entire packet is encrypted before fragmentation (fragments cannot be processed individually).
For header/tunein packets, the first 25 bytes after the header are in the clear (signature,version,IV and pattern).
The IV is constant to avoid packet overhead, randomly generated if not set and sent in the initial stream header. Pattern mode can be used (cf CENC cbcs) to encrypt K block and leave N blocks in the clear.
The header/tunein packet may get quite big when all pid properties are kept. In order to help reduce its size, the minp option can be used: this will remove all built-in properties marked as dropable (cf property help) as well as all non built-in properties.
The skp option may also be used to specify which property to drop:
This will remove properties of type 4CC1 and properties (built-in or not) of name Name2.
sigsn (boolean, default: false): signal packet sequence number after header field and before size field. Sequence number is per PID, encoded on 16 bits. Header packet does not have a SN
sigdur (boolean, default: true): signal duration
sigbo (boolean, default: false): signal byte offset
sigdts (boolean, default: true): signal decoding timestamp
dbg (enum, default: no): set debug mode
- no: disable debug
- nodata: force packet size to 0
- nopck: skip packet
key (data): encrypt packets using given key - see filter helps
IV (data): set IV for encryption - a constant IV is used to keep packet overhead small (cbcs-like)
pattern (fraction, default: 1/0): set nb crypt / nb_skip block pattern. default is all encrypted
mpck (unsigned int, default: 0): set max packet size. 0 means no fragmentation (each AU is sent in one packet)
magic (string): magic string to append in setup packet
skp (string): comma separated list of pid property names to skip - see filter help
minp (boolean, default: false): include only the minimum set of properties required for stream processing - see filter help
crate (number, default: 0): carousel period for tune-in info in seconds - see filter help