gaspard7/wiki_gpac huggingface dataset:
FFmpeg BitStream filter  {:data-level="all"}

Register name used to load filter: __ffbsf__  
This filter is not checked during graph resolution and needs explicit loading.  
  
This filter provides bitstream filters (BSF) for compressed audio and video formats.  
See FFmpeg documentation (https://ffmpeg.org/documentation.html) for more details  
To list all supported bitstream filters for your GPAC build, use `gpac -h ffbsf:*`.  
  
Several BSF may be specified in [f](#f) for different coding types. BSF not matching the coding type are silently ignored.  
When no BSF matches the input coding type, or when [f](#f) is empty, the filter acts as a passthrough filter.  
  
Options are specified after the desired filters:  

- `ffbsf:f=h264_metadata:video_full_range_flag=0`  
- `ffbsf:f=h264_metadata,av1_metadata:video_full_range_flag=0:color_range=tv`  

  
_Note: Using BSFs on some media types (e.g. avc, hevc) may trigger creation of a reframer filter (e.g. rfnalu)_
Video output

Register name used to load filter: __vout__  
This filter may be automatically loaded during graph resolution.  
  
This filter displays a single visual input PID in a window.  
The window is created unless a window handle (HWND, xWindow, etc) is indicated in the config file ( [Temp]OSWnd=ptr).  
The output uses GPAC video output module indicated in [drv](#drv) option or in the config file (see GPAC core help).  
The video output module can be further configured (see GPAC core help).  
The filter can use OpenGL or 2D blit of the graphics card, depending on the OS support.  
The filter can be used do dump frames as written by the graphics card (GPU read-back) using [dumpframes](#dumpframes).  
In this case, the window is not visible and only the listed frames are drawn to the GPU.  
The pixel format of the dumped frame is always RGB in OpenGL and matches the video backbuffer format in 2D mode.
HEVC tile bitstream splitter

Register name used to load filter: __tilesplit__  
This filter is not checked during graph resolution and needs explicit loading.  
  
This filter splits an HEVC tiled stream into tiled HEVC streams (`hvt1` or `hvt2` in ISOBMFF).  
The filter will move to passthrough mode if the bitstream is not tiled.  
If the `Bitrate` property is set on the input PID, the output tile PIDs will have a bitrate set to `(Bitrate - 10k)/nb_opids`, 10 kbps being reserved for the base.  
  
Each tile PID will be assigned the following properties:  

- `ID`: equal to the base PID ID (same as input) plus the 1-based index of the tile in raster scan order.  
- `TileID`: equal to the 1-based index of the tile in raster scan order.  

  
__Warning: The filter does not check if tiles are independently-coded (MCTS) !__  
  
__Warning: Support for dynamic changes of tiling grid has not been tested !__
AV Counter Generator

Register name used to load filter: __avgen__  
This is a JavaScript filter. It is not checked during graph resolution and needs explicit loading.  
Author: GPAC Team  
  
This filter generates AV streams representing a counter. Streams can be enabled or disabled using [type](#type).  
The filter is software-based and does not use GPU.  
  
When [adjust](#adjust) is set, the first video frame is adjusted such that a full circle happens at each exact second according to the system UTC clock.  
By default, video UTC and date are computed at each frame generation from current clock and not from frame number.  
This will result in broken UTC timing text when playing at speeds other than 1.0.  
This can be changed using [lock](#lock).  
  
Audio beep is generated every second, with octave (2xfreq) of even beep used every 10 seconds.  
When video is generated, beep is synchronized to video at each exact second.  
  
If NTP injection is used, each video packet (but not audio ones) has a `SenderNTP` property set; if video is not used, each audio packet has a `SenderNTP` property set.
Multiple output stream generation

More than one output size can be specified. This will result in multiple sources being generated, one per size.  
A size can be specified more than once, resulting in packet references when [copy](#copy) is not set, or full copies otherwise.  
Target encoding bitrates can be assigned to each output using [rates](#rates). This can be useful when generating dash:  
Example
```
gpac avgen:sizes=1280x720,1920x1080:rates=2M,5M c=aac:FID=1 c=264:FID=2:clone -o live.mpd:SID=1,2
```
Multiview generation

In multiview mode, only the animated counter will move in depth backward and forward, as indicated by the [disparity](#disparity) value.  
When [pack](#pack) is set, a packed stereo couple is generated for each video packet.  
Otherwise, when [views](#views) is greater than 2, each view is generated on a dedicated output PID with the property `ViewIdx` set in [1, views].  
Multi-view output forces usage of [copy](#copy) mode.
PID Naming

The audio PID is assigned the name `audio` and ID `1`.  
If a single video PID is produced, it is assigned the name `video` and ID `2`.  
If multiple video PIDs are produced, they are assigned the names `videoN` and ID `N+1`, N in [1, sizes].  
If multiple [views](#views) are generated, they are assigned the names `videoN_vK` and ID `N*views+K-1`, N in [1, sizes], K in [1, views].
Options  {.no-collapse}

<div markdown class="option">  
<a id="dctmode">__dctmode__</a> (enum, default: _fast_): type of DCT used  

- slow: precise but slow integer DCT  
- fast: less precise but faster integer DCT  
- float: float DCT  
</div>  
  
<div markdown class="option">  
<a id="quality" data-level="basic">__quality__</a> (uint, default: _100_, minmax: 0-100, updatable): compression quality  
</div>
Audio output

Register name used to load filter: __aout__  
This filter may be automatically loaded during graph resolution.  
  
This filter writes a single PCM (uncompressed) audio input PID to a sound card or other audio output device.  
  
The longer the audio buffering [bdur](#bdur) is, the longer the audio latency will be (pause/resume). The quality of fast forward audio playback will also be degraded when using large audio buffers.  
  
If [clock](#clock) is set, the filter will report system time (in us) and corresponding packet CTS for other filters to use for AV sync.
Options  {.no-collapse}

<div markdown class="option">  
<a id="drv" data-level="basic">__drv__</a> (cstr): audio driver name  
</div>  
<div markdown class="option">  
<a id="bnum" data-level="basic">__bnum__</a> (uint, default: _2_): number of audio buffers (0 for auto)  
</div>  
<div markdown class="option">  
<a id="bdur" data-level="basic">__bdur__</a> (uint, default: _100_): total duration of all buffers in ms (0 for auto)  
</div>  
<div markdown class="option">  
<a id="threaded">__threaded__</a> (bool, default: _true_): force dedicated thread creation if sound card driver is not threaded  
</div>  
<div markdown class="option">  
<a id="dur">__dur__</a> (frac, default: _0_): only play the specified duration  
</div>  
<div markdown class="option">  
<a id="clock">__clock__</a> (bool, default: _true_): hint audio clock for this stream  
</div>  
<div markdown class="option">  
<a id="speed" data-level="basic">__speed__</a> (dbl, default: _1.0_, updatable): set playback speed. If speed is negative and start is 0, start is set to -1  
</div>  
<div markdown class="option">  
<a id="start" data-level="basic">__start__</a> (dbl, default: _0.0_, updatable): set playback start offset. A negative value means percent of media duration with -1 equal to duration  
</div>  
<div markdown class="option">  
<a id="vol" data-level="basic">__vol__</a> (uint, default: _100_, minmax: 0-100, updatable): set default audio volume, as a percentage between 0 and 100  
</div>  
<div markdown class="option">  
<a id="pan" data-level="basic">__pan__</a> (uint, default: _50_, minmax: 0-100, updatable): set stereo pan, as a percentage between 0 and 100, 50 being centered  
</div>  
<div markdown class="option">  
<a id="buffer" data-level="basic">__buffer__</a> (uint, default: _200_): set playout buffer in ms  
</div>  
<div markdown class="option">  
<a id="mbuffer" data-level="basic">__mbuffer__</a> (uint, default: _0_): set max buffer occupancy in ms. If less than buffer, use buffer  
</div>  
<div markdown class="option">  
<a id="rbuffer" data-level="basic">__rbuffer__</a> (uint, default: _0_, updatable): rebuffer trigger in ms. If 0 or more than buffer, disable rebuffering  
</div>  
<div markdown class="option">  
<a id="adelay">__adelay__</a> (frac, default: _0_, updatable): set audio delay in sec  
</div>  
<div markdown class="option">  
<a id="buffer_done">__buffer_done__</a> (bool): buffer done indication (readonly, for user app)  
</div>  
<div markdown class="option">  
<a id="rebuffer">__rebuffer__</a> (luint): system time in us at which last rebuffer started, 0 if not rebuffering (readonly, for user app)  
</div>  
<div markdown class="option">  
<a id="media_offset">__media_offset__</a> (dbl, default: _0_): media offset (substract this value to CTS to get media time - readonly)  
</div>
Options  {.no-collapse}

<div markdown class="option">  
<a id="index" data-level="basic">__index__</a> (dbl, default: _1.0_): indexing window length  
</div>  
<div markdown class="option">  
<a id="auxac3" data-level="basic">__auxac3__</a> (bool, default: _false_): expose auxiliary AC-3 stream if present  
</div>
HTTP Server

Register name used to load filter: __httpout__  
This filter may be automatically loaded during graph resolution.  
  
The HTTP output filter can act as:  

- a simple HTTP server  
- an HTTP server sink  
- an HTTP server file sink  
- an HTTP _client_ sink  
- an HTTP server _source_  

    
The server currently handles GET, HEAD, PUT, POST, DELETE methods, and basic OPTIONS support.  
Single or multiple byte ranges are supported for both GET and PUT/POST methods, in all server modes.  

- for GET, the resulting body is a single-part body formed by the concatenated byte ranges as requested (no overlap checking).  
- for PUT/POST, the received data is pushed to the target file according to the byte ranges specified in the client request.  

    

__Warning: the partial PUT request is RFC2616 compliant but not compliant with RFC7230. PATCH method is not yet implemented in GPAC.__  
  
    
When a single read directory is specified, the server root `/` is the content of this directory.  
When multiple read directories are specified, the server root `/` contains the list of the mount points with their directory names.  
When a write directory is specified, the upload resource name identifies a file in this directory (the write directory name is not present in the URL).  
    
A directory rule file (cf `gpac -h creds`) can be specified in [rdirs](#rdirs) but NOT in [wdir](#wdir). When rules are used:  

- if a directory has a `name` rule, it will be used in the URL  
- otherwise, the directory is directly available under server root `/`  
- read and write access rights are checked  

Example
```
[foodir]  
name=bar
```
  
Content `RES` of this directory is exposed as `http://SERVER/bar/RES`.  
    
Listing can be enabled on server using [dlist](#dlist).  
When disabled, a GET on a directory will fail.  
When enabled, a GET on a directory will return a simple HTML listing of the content inspired from Apache.  
    
Custom headers can be specified using [hdrs](#hdrs), they apply to all requests. For more advanced control on requests, use a javascript binding (see [js](#js) and howtos).  
    
Text files are compressed using gzip or deflate if the client accepts these encodings, unless [no_z](#no_z) is set.
Simple HTTP server

In this mode, the filter does not need any input connection and exposes all files in the directories given by [rdirs](#rdirs).  
PUT and POST methods are only supported if a write directory is specified by [wdir](#wdir) option.  
Example
```
gpac httpout:rdirs=outcoming
```
  
This sets up a read-only server.  
    
Example
```
gpac httpout:wdir=incoming
```
  
This sets up a write-only server.  
    
Example
```
gpac httpout:rdirs=outcoming:wdir=incoming:port=8080
```
  
This sets up a read-write server running on [port](#port) 8080.
HTTP server sink

In this mode, the filter will forward input PIDs to connected clients, trashing the data if no client is connected unless [hold](#hold) is specified.  
The filter does not use any read directory in this mode.  
This mode is mostly useful to setup live HTTP streaming of media sessions such as MP3, MPEG-2 TS or other multiplexed representations:  
Example
```
gpac -i MP3_SOURCE -o http://localhost/live.mp3 --hold
```
  
In this example, the server waits for client requests on `/live.mp3` and will then push each input packet to all connected clients.  
If the source is not real-time, you can inject a reframer filter performing realtime regulation.  
Example
```
gpac -i MP3_SOURCE reframer:rt=on -o http://localhost/live.mp3
```
  
In this example, the server will push each input packet to all connected clients, or trash the packet if no connected clients.  
    
In this mode, ICECast meta-data can be inserted using [ice](#ice). The default inserted values are `ice-audio-info`, `icy-br`, `icy-pub` (set to 1) and `icy-name` if input `ServiceName` property is set.  
The server will also look for any property called `ice-*` on the input PID and inject them.  
Example
```
gpac -i source.mp3:#ice-Genre=CoolRock -o http://IP/live.mp3 --ice
```
  
This will inject the header `ice-Genre: CoolRock` in the response.    
Once one complete input file is sent, it is no longer available for download unless [reopen](#reopen) is set and input PID is not over.  
    
This mode should not be used with multiple files muxers such as DASH or HLS.
HTTP server file sink

In this mode, the filter will write input PIDs to files in the first read directory specified, acting as a file output sink.  
The filter uses a read directory in this mode, which must be writable.  
Upon client GET request, the server will check if the requested URL matches the name of a file currently being written by the server.  

- If so, the server will:  

    - send the content using HTTP chunk transfer mode, starting with what is already written on disk  
    - push remaining data to the client as soon as received while writing it to disk, until source file is done  

- If not so, the server will simply send the file from the disk as a regular HTTP session, without chunk transfer.  

    
This mode is typically used for origin server in HAS sessions where clients may request files while they are being produced (low latency DASH).  
Example
```
gpac -i SOURCE reframer:rt=on -o http://localhost:8080/live.mpd --rdirs=temp --dmode=dynamic --cdur=0.1
```
  
In this example, a real-time dynamic DASH session with chunks of 100ms is created, writing files to `temp`. A client connecting to the live edge will receive segments as they are produced using HTTP chunk transfer.  
    
The server can store incoming files to memory mode by setting the read directory to `gmem`.  
In this mode, [max_cache_segs](#max_cache_segs) is always at least 1.  
    
If [max_cache_segs](#max_cache_segs) value `N` is not 0, each incoming PID will store at most:  

- `MIN(N, time-shift depth)` files if stored in memory  
- `-N` files if stored locally and `N` is negative  
- `MAX(N, time-shift depth)` files if stored locally and `N` is positive  
- unlimited otherwise (files stored locally, `N` is positive and no time-shift info)
HTTP client sink

In this mode, the filter will upload input PIDs data to remote server using PUT (or POST if [post](#post) is set).  
This mode must be explicitly activated using [hmode](#hmode).  
The filter uses no read or write directories in this mode.  
Example
```
gpac -i SOURCE -o http://targethost:8080/live.mpd:gpac:hmode=push
```
  
In this example, the filter will send PUT methods to the server running on [port](#port) 8080 at `targethost` location (IP address or name).
HTTP server source

In this mode, the server acts as a source rather than a sink. It declares incoming PUT or POST methods as output PIDs  
This mode must be explicitly activated using [hmode](#hmode).  
The filter uses no read or write directories in this mode, and uploaded data is NOT stored by the server.  
Example
```
gpac httpout:hmode=source vout aout
```
  
In this example, the filter will try to play uploaded files through video and audio output.
HTTPS server

The server can run over TLS (https) for all the server modes. TLS is enabled by specifying [cert](#cert) and [pkey](#pkey) options.  
Both certificate and key must be in PEM format.  
The server currently only operates in either HTTPS or HTTP mode and cannot run both modes at the same time. You will need to use two httpout filters for this, one operating in HTTPS and one operating in HTTP.
Multiple destinations on single server

When running in server mode, multiple HTTP outputs with same URL/port may be used:  

- the first loaded HTTP output filter with same URL/port will be reused  
- all httpout options of subsequent httpout filters, except [dst](#dst) will be ignored, other options will be inherited as usual  

  
Example
```
gpac -i dash.mpd dashin:forward=file:FID=D1 dashin:forward=segb:FID=D2 -o http://localhost:80/live.mpd:SID=D1:rdirs=dash -o http://localhost:80/live_rw.mpd:SID=D2:sigfrag
```
  
This will:  

- load the HTTP server and forward (through `D1`) the dash session to this server using `live.mpd` as manifest name  
- reuse the HTTP server and regenerate the manifest (through `D2` and `sigfrag` option), using `live_rw.mpd` as manifest name
Options

<a id="threading">__threading__</a> (enum, default: _frame_): set threading mode  

- frameslice: parallel decoding of both frames and slices  
- frame: parallel decoding of frames  
- slice: parallel decoding of slices  
  
<a id="nb_threads">__nb_threads__</a> (uint, default: _0_): set number of threads (if 0, uses number of cores minus one)  
<a id="no_copy">__no_copy__</a> (bool, default: _false_): directly dispatch internal decoded frame without copy  
<a id="pack_hfr">__pack_hfr__</a> (bool, default: _false_): pack 4 consecutive frames in a single output  
<a id="seek_reset">__seek_reset__</a> (bool, default: _false_): reset decoder when seeking  
<a id="force_stereo">__force_stereo__</a> (bool, default: _true_): use stereo output for multiview (top-bottom only)  
<a id="reset_switch">__reset_switch__</a> (bool, default: _false_): reset decoder at config change
Configuration file

GPAC uses a configuration file to modify default options of libgpac and filters. This file is called `GPAC.cfg` and is located:  

- on Windows platforms, in `C:\Users\FOO\AppData\Roaming\GPAC` or in `C:\Program Files\GPAC`.  
- on iOS platforms, in a .gpac folder in the app storage directory.  
- on Android platforms, in `/sdcard/GPAC/` if this directory exists, otherwise in `/data/data/io.gpac.gpac/GPAC`.  
- on other platforms, in a `$HOME/.gpac/`.  

  
Applications in GPAC can also specify a different configuration file through the [-p](gpac_general/#p) profile option. EX gpac -p=foo []  
This will load configuration from $HOME/.gpac/foo/GPAC.cfg, creating it if needed.  
The reserved name `0` is used to disable configuration file writing.  
  
The configuration file is structured in sections, each made of one or more keys:  

- section `foo` is declared as `[foo]\n`  
- key `bar` with value `N` is declared as `bar=N\n`. The key value `N` is not interpreted and always handled as ASCII text.  

  
By default the configuration file only holds a few system specific options and directories. It is possible to serialize the entire set of options to the configuration file, using [-wc](gpac_general/#wc) [-wf](gpac_general/#wf).  
This should be avoided as the resulting configuration file size will be quite large, hence larger memory usage for the applications.  
The options specified in the configuration file may be overridden by the values in _restrict.cfg_ file located in GPAC share system directory (e.g. `/usr/share/gpac` or `C:\Program Files\GPAC`), if present; this allows enforcing system-wide configuration values.  
_Note: The methods describe in this section apply to any application in GPAC transferring their arguments to libgpac. This is the case for _gpac_ and _MP4Box_._
Filter options in configuration

It is possible to alter the default value of a filter option by modifying the configuration file. Filter _foo_ options are stored in section `[filter@foo]`, using option name and value as key-value pair. Options specified through the configuration file do not take precedence over options specified at prompt or through alias.  
Example
```
[filter@rtpin]  
interleave=yes
```
  
This will force the rtp input filter to always request RTP over RTSP by default.  
To generate a configuration file with all filters options serialized, use [-wf](gpac_general/#wf).
Global filter options

It is possible to specify options global to multiple filters using `--OPTNAME=VAL`. Global options do not override filter options but take precedence over options loaded from configuration file.  
This will set option `OPTNAME`, when present, to `VAL` in any loaded filter.  
Example
```
--buffer=100 -i file vout aout
```
  
This is equivalent to specifying `vout:buffer=100 aout:buffer=100`.  
Example
```
--buffer=100 -i file vout aout:buffer=10
```
  
This is equivalent to specifying `vout:buffer=100 aout:buffer=10`.  

__Warning: This syntax only applies to regular filter options. It cannot be used with builtin shortcuts (gfreg, enc, ...).__  
  
Meta-filter options can be set in the same way using the syntax `--OPT_NAME=VAL`.  
Example
```
--profile=Baseline -i file.cmp -o dump.264
```
  
This is equivalent to specifying `-o dump.264:profile=Baseline`.  
    
For both syntaxes, it is possible to specify the filter registry name of the option, using `--FNAME:OPTNAME=VAL` or `--FNAME@OPTNAME=VAL`.  
In this case the option will only be set for filters which are instances of registry FNAME. This is used when several registries use same option names.  
Example
```
--flist@timescale=100 -i plist1 -i plist2 -o live.mpd
```
  
This will set the timescale option on the playlists filters but not on the dasher filter.
Options  {.no-collapse}

<div markdown class="option">  
<a id="exporter">__exporter__</a> (bool, default: _false_): compatibility with old exporter, displays export results  
</div>  
<div markdown class="option">  
<a id="dims">__dims__</a> (bool, default: _false_): use DIMS mode  
</div>  
<div markdown class="option">  
<a id="name" data-level="basic">__name__</a> (str): set output name of media and info files produced  
</div>  
<div markdown class="option">  
<a id="nhmlonly">__nhmlonly__</a> (bool, default: _false_): only dump NHML info, not media  
</div>  
<div markdown class="option">  
<a id="pckp">__pckp__</a> (bool, default: _false_): full NHML dump  
</div>  
<div markdown class="option">  
<a id="chksum">__chksum__</a> (enum, default: _none_): insert frame checksum  

- none: no checksum  
- crc: CRC32 checksum  
- sha1: SHA1 checksum  
</div>
WebVTT to TX3G

Register name used to load filter: __vtt2tx3g__  
This filter may be automatically loaded during graph resolution.  
  
This filter rewrites unframed WebVTT to TX3G / QT Timed Text (binary format)  
  
Unframed WebVTT packets consist in single cues:  

- cue payload as packet payload  
- prefix as packet string property `vtt_pre`  
- cue ID as packet string property `vtt_cueid`  
- cue settings as packet string property `vtt_settings`  
- packet timing contains the cue timing (start and duration)