Skip to content


File input

Register name used to load filter: fin
This filter may be automatically loaded during graph resolution.

This filter dispatch raw blocks from input file into a filter chain.
Block size can be adjusted using block_size.
Content format can be forced through mime and file extension can be changed through ext.
Note: Unless disabled at session level (see -no-probe ), file extensions are usually ignored and format probing is done on the first data block.
The special file name null is used for creating a file with no data, needed by some filters such as dasher.
The special file name rand is used to generate random data.
The special file name randsc is used to generate random data with 0x000001 start-code prefix.

The filter handles both files and GF_FileIO objects as input URL.

Packet Injecting

The filter can be used to inject a single packet instead of a file using (-pck)[] option.
No specific properties are attached, except a timescale if (-ptime)[] is set.

gpac fin:pck=str@"My Sample Text":ptime=2500/100:#CodecID=stxt:#StreamType=text

This will declare the PID as WebVTT and send a single packet with payload My Sample Text and a timestamp value of 25 second.


src (cstr): location of source file
block_size (uint, default: 0): block size used to read file. 0 means 5000 if file less than 500m, 1M otherwise
range (lfrac, default: 0-0): byte range
ext (cstr): override file extension
mime (cstr): set file mime type
pck (mem): data to use instead of file
ptime (frac, default: 0/0): timing for data packet, ignored if den is 0