Skip to content

Commit 91c3f66

Browse files
committed
update from GPAC master
1 parent f2f3a35 commit 91c3f66

36 files changed

+195
-128
lines changed

docs/Filters/avmix.md

+58-42
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,22 @@ When reloading the playlist:
192192

193193
### Notes
194194

195+
The special URL scheme `ipid://` can be used to locate an input pid by link directives.
196+
Example
197+
```
198+
in=ipid://#foo=bar
199+
```
200+
This will use pids having property `foo` with value `bar`, regardless of source filter ID.
201+
202+
Example
203+
```
204+
in=ipid://TEST#foo=bar
205+
```
206+
This will use pids having property `foo` with value `bar` coming from filter with ID `TEST`.
207+
208+
When using the `ipid://` scheme, filter chains cannot be specified (in accepts a single argument) and `port` is ignored.
209+
The syntax for link directive is the same as in gpac. However, if a listed property is not found on the input pid, the matching will fail.
210+
195211
When launching a child process, the input filter is created first and the child process launched afterwards.
196212

197213
__Warning: When launching a child process directly (e.g. `in="ffmpeg ..."`), any relative URL used in `in` must be relative to the current working directory.__
@@ -624,45 +640,6 @@ Example
624640

625641
# Scene modules
626642

627-
## Scene `mask`
628-
This scene sets the canvas alpha mask mode.
629-
630-
The canvas alpha mask is always full screen.
631-
632-
In software mode, combining mask effect in record mode and reverse group drawing allows drawing front to back while writing pixels only once.
633-
634-
Options:
635-
* mode ('off'): if set, reset clipper otherwise set it to scene position and size
636-
* off: mask is disabled
637-
* on: mask is enabled and cleared, further draw operations will take place on mask
638-
* onkeep: mask is enabled but not cleared, further draw operations will take place on mask
639-
* use: mask is enabled, further draw operations will be filtered by mask
640-
* use_inv: mask is enabled, further draw operations will be filtered by 1-mask
641-
* rec: mask is in record mode, further draw operations will be drawn on output and will set mask value to 0
642-
643-
644-
## Scene `clear`
645-
This scene clears the canvas area covered by the scene with a given color.
646-
647-
The default clear color of the mixer is `black`.
648-
649-
The clear area is always axis-aligned in output frame, so when skew/rotation are present, the axis-aligned bounding box of the transformed scene area will be cleared.
650-
651-
Options:
652-
* color ('none'): clear color
653-
654-
## Scene `clip`
655-
This scene resets the canvas clipper or sets the canvas clipper to the scene area.
656-
657-
The clipper is always axis-aligned in output frame, so when skew/rotation are present, the axis-aligned bounding box of the transformed clipper will be used.
658-
659-
Clippers are handled through a stack, resetting the clipper pops the stack and restores previous clipper.
660-
If a clipper is already defined when setting the clipper, the clipper set is the intersection of the two clippers.
661-
662-
Options:
663-
* reset (false): if set, reset clipper otherwise set it to scene position and size
664-
* stack (true): if false, clipper is set/reset independently of the clipper stack (no intersection, no push/pop of the stack)
665-
666643
## Scene `shape`
667644
This scene can be used to setup a shape, its outline and specify the fill and strike modes.
668645
Supported shapes include:
@@ -848,13 +825,55 @@ Options:
848825
* rs_rep (false): same as `rs` for local image in replace mode
849826
* rt_rep (false): same as `rt` for local image in replace mode
850827

828+
## Scene `mask`
829+
This scene sets the canvas alpha mask mode.
830+
831+
The canvas alpha mask is always full screen.
832+
833+
In software mode, combining mask effect in record mode and reverse group drawing allows drawing front to back while writing pixels only once.
834+
835+
Options:
836+
* mode ('off'): if set, reset clipper otherwise set it to scene position and size
837+
* off: mask is disabled
838+
* on: mask is enabled and cleared, further draw operations will take place on mask
839+
* onkeep: mask is enabled but not cleared, further draw operations will take place on mask
840+
* use: mask is enabled, further draw operations will be filtered by mask
841+
* use_inv: mask is enabled, further draw operations will be filtered by 1-mask
842+
* rec: mask is in record mode, further draw operations will be drawn on output and will set mask value to 0
843+
844+
845+
## Scene `clear`
846+
This scene clears the canvas area covered by the scene with a given color.
847+
848+
The default clear color of the mixer is `black`.
849+
850+
The clear area is always axis-aligned in output frame, so when skew/rotation are present, the axis-aligned bounding box of the transformed scene area will be cleared.
851+
852+
Options:
853+
* color ('none'): clear color
854+
855+
## Scene `clip`
856+
This scene resets the canvas clipper or sets the canvas clipper to the scene area.
857+
858+
The clipper is always axis-aligned in output frame, so when skew/rotation are present, the axis-aligned bounding box of the transformed clipper will be used.
859+
860+
Clippers are handled through a stack, resetting the clipper pops the stack and restores previous clipper.
861+
If a clipper is already defined when setting the clipper, the clipper set is the intersection of the two clippers.
862+
863+
Options:
864+
* reset (false): if set, reset clipper otherwise set it to scene position and size
865+
* stack (true): if false, clipper is set/reset independently of the clipper stack (no intersection, no push/pop of the stack)
866+
851867
# Transition modules
852868

853869
## Transition `gltrans` - GPU only
854870
This transition module wraps gl-transitions, see https://gl-transitions.com/ and `gpac -h avmix:gltrans` for builtin transitions
855871
Options:
856872
* fx (''): effect name for built-in effects, or path to gl-transition GLSL file
857873

874+
## Transition `mix` - software/GPU
875+
This transition performs cross-fade of source videos
876+
858877
## Transition `swipe` - software/GPU
859878
This transition performs simple 2D affine transformations for source videos transitions, with configurable effect origin
860879
Options:
@@ -875,9 +894,6 @@ Options:
875894
* grow: video 2 size increases, video 1 not modified
876895
* swap: video 2 size increases, video 1 size decreases
877896

878-
## Transition `mix` - software/GPU
879-
This transition performs cross-fade of source videos
880-
881897
## Transition `fade` - software/GPU
882898
This transition performs fade to/from color of source videos
883899
Options:

docs/Filters/bsrw.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,12 @@ The filter will work in passthrough mode for all other codecs and media types.
3232

3333
# Options
3434

35-
<a id="cprim">__cprim__</a> (cprm, default: _-1_, minmax: reserved0,BT709,undef,reserved3,BT470M,BT470G,SMPTE170,SMPTE240,FILM,BT2020,SMPTE428,SMPTE431,SMPTE432,EBU3213, updatable): color primaries according to ISO/IEC 23001-8 / 23091-2
36-
<a id="ctfc">__ctfc__</a> (ctfc, default: _-1_, minmax: reserved0,BT709,undef,reserved3,BT470M,BT470BG,SMPTE170,SMPTE249,Linear,Log100,Log316,IEC61966,BT1361,sRGB,BT2020_10,BT2020_12,SMPTE2084,SMPTE428,STDB67, updatable): color transfer characteristics according to ISO/IEC 23001-8 / 23091-2
37-
<a id="cmx">__cmx__</a> (cmxc, default: _-1_, minmax: GBR,BT709,undef,FCC,BT601,SMPTE170,SMPTE240,YCgCo,BT2020,BT2020cl,YDzDx, updatable): color matrix coeficients according to ISO/IEC 23001-8 / 23091-2
35+
<a id="cprim">__cprim__</a> (cprm, default: _-1_, Enum: reserved0|BT709|undef|reserved3|BT470M|BT470G|SMPTE170|SMPTE240|FILM|BT2020|SMPTE428|SMPTE431|SMPTE432|EBU3213, updatable): color primaries according to ISO/IEC 23001-8 / 23091-2
36+
37+
<a id="ctfc">__ctfc__</a> (ctfc, default: _-1_, Enum: reserved0|BT709|undef|reserved3|BT470M|BT470BG|SMPTE170|SMPTE249|Linear|Log100|Log316|IEC61966|BT1361|sRGB|BT2020_10|BT2020_12|SMPTE2084|SMPTE428|STDB67, updatable): color transfer characteristics according to ISO/IEC 23001-8 / 23091-2
38+
39+
<a id="cmx">__cmx__</a> (cmxc, default: _-1_, Enum: GBR|BT709|undef|FCC|BT601|SMPTE170|SMPTE240|YCgCo|BT2020|BT2020cl|YDzDx, updatable): color matrix coeficients according to ISO/IEC 23001-8 / 23091-2
40+
3841
<a id="sar">__sar__</a> (frac, default: _-1/-1_, updatable): aspect ratio to rewrite
3942
<a id="m4vpl">__m4vpl__</a> (sint, default: _-1_, updatable): set ProfileLevel for MPEG-4 video part two
4043
<a id="fullrange">__fullrange__</a> (bool, default: _false_, updatable): video full range flag

docs/Filters/cdcrypt.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,22 @@ The CENC decryptor supports decrypting CENC, ISMA, HLS Sample-AES (MPEG2 ts) and
99

1010
For HLS, key is retrieved according to the key URI in the manifest.
1111
Otherwise, the filter uses a configuration file.
12-
The syntax is available at https://wiki.gpac.io/Common-Encryption
12+
The syntax is available at https://wiki.gpac.io/xmlformats/Common-Encryption
1313
The DRM config file can be set per PID using the property `DecryptInfo` (highest priority), `CryptInfo` (lower priority) or set at the filter level using [cfile](#cfile) (lowest priority).
1414
When the file is set per PID, the first `CryptInfo` with the same ID is used, otherwise the first `CryptInfo` is used.When the file is set globally (not per PID), the first `CrypTrack` in the DRM config file with the same ID is used, otherwise the first `CrypTrack` with ID 0 or not set is used.
1515

1616

1717
# Options
1818

1919
<a id="cfile">__cfile__</a> (str): crypt file location
20-
<a id="decrypt">__decrypt__</a> (enum, default: _full_): decrypt mode (CENC only)
21-
20+
<a id="decrypt">__decrypt__</a> (enum, default: _full_): decrypt mode (CENC only)
2221
* full: decrypt everything, throwing error if keys are not found
2322
* nokey: decrypt everything for which a key is found, skip decryption otherwise
2423
* skip: decrypt nothing
2524
* pad0: decrypt nothing and replace all crypted bits with 0
2625
* pad1: decrypt nothing and replace all crypted bits with 1
27-
* padsc: decrypt nothing and replace all crypted bytes with start codes
28-
26+
* padsc: decrypt nothing and replace all crypted bytes with start codes
27+
2928
<a id="drop_keys">__drop_keys__</a> (uintl): consider keys with given 1-based indexes as not available (multi-key debug)
3029
<a id="kids">__kids__</a> (strl): define KIDs. If `keys` is empty, consider keys with given KID (as hex string) as not available (debug)
3130
<a id="keys">__keys__</a> (strl): define key values for each of the specified KID

docs/Filters/cecrypt.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Register name used to load filter: __cecrypt__
66
This filter is not checked during graph resolution and needs explicit loading.
77

88
The CENC encryptor supports CENC, ISMA and Adobe encryption. It uses a DRM config file for declaring keys.
9-
The syntax is available at https://wiki.gpac.io/Common-Encryption
9+
The syntax is available at https://wiki.gpac.io/xmlformats/Common-Encryption
1010
The DRM config file can be set per PID using the property `CryptInfo`, or set at the filter level using [cfile](#cfile).
1111
When the DRM config file is set per PID, the first `CrypTrack` in the DRM config file with the same ID is used, otherwise the first `CrypTrack` is used (regardless of the `CrypTrack` ID).
1212
When the DRM config file is set globally (not per PID), the first `CrypTrack` in the DRM config file with the same ID is used, otherwise the first `CrypTrack` with ID 0 or not set is used.
@@ -17,4 +17,5 @@ If no DRM config file is defined for a given PID, this PID will not be encrypted
1717

1818
<a id="cfile">__cfile__</a> (str): crypt file location
1919
<a id="allc">__allc__</a> (bool): throw error if no DRM config file is found for a PID
20+
<a id="bk_stats">__bk_stats__</a> (bool): print number of encrypted blocks to stdout upon exit
2021

docs/Filters/compositor.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ Whether the setting is applied or not depends on the graphics module and player
112112
<a id="asr">__asr__</a> (uint, default: _0_): force output sample rate (0 for auto)
113113
<a id="ach">__ach__</a> (uint, default: _0_): force output channels (0 for auto)
114114
<a id="alayout">__alayout__</a> (uint, default: _0_): force output channel layout (0 for auto)
115-
<a id="afmt">__afmt__</a> (afmt, default: _s16_, minmax: none,u8,s16,s16b,s24,s24b,s32,s32b,flt,fltb,dbl,dblb,u8p,s16p,s24p,s32p,fltp,dblp): force output channel format (0 for auto)
115+
<a id="afmt">__afmt__</a> (afmt, default: _s16_, Enum: none|u8|s16|s16b|s24|s24b|s32|s32b|flt|fltb|dbl|dblb|u8p|s16p|s24p|s32p|fltp|dblp): force output channel format (0 for auto)
116+
116117
<a id="asize">__asize__</a> (uint, default: _1024_): audio output packet size in samples
117118
<a id="abuf">__abuf__</a> (uint, default: _100_): audio output buffer duration in ms - the audio renderer fills the output PID up to this value. A too low value will lower latency but can have real-time playback issues
118119
<a id="avol">__avol__</a> (uint, default: _100_, updatable): audio volume in percent
@@ -225,7 +226,8 @@ Whether the setting is applied or not depends on the graphics module and player
225226
* gui: player mode with GUI auto-start
226227

227228
<a id="noaudio">__noaudio__</a> (bool, default: _false_): disable audio output
228-
<a id="opfmt">__opfmt__</a> (pfmt, default: _none_, minmax: none,yuv420,yvu420,yuv420_10,yuv422,yuv422_10,yuv444,yuv444_10,uyvy,vyuy,yuyv,yvyu,uyvl,vyul,yuyl,yvyl,nv12,nv21,nv1l,nv2l,yuva,yuvd,yuv444a,yuv444p,v308,yuv444ap,v408,v410,v210,grey,algr,gral,rgb4,rgb5,rgb6,rgba,argb,bgra,abgr,rgb,bgr,xrgb,rgbx,xbgr,bgrx,rgbd,rgbds,uncv): pixel format to use for output. Ignored in [player](#player) mode
229+
<a id="opfmt">__opfmt__</a> (pfmt, default: _none_, Enum: none|yuv420|yvu420|yuv420_10|yuv422|yuv422_10|yuv444|yuv444_10|uyvy|vyuy|yuyv|yvyu|uyvl|vyul|yuyl|yvyl|nv12|nv21|nv1l|nv2l|yuva|yuvd|yuv444a|yuv444p|v308|yuv444ap|v408|v410|v210|grey|algr|gral|rgb4|rgb5|rgb6|rgba|argb|bgra|abgr|rgb|bgr|xrgb|rgbx|xbgr|bgrx|rgbd|rgbds|uncv): pixel format to use for output. Ignored in [player](#player) mode
230+
229231
<a id="drv">__drv__</a> (enum, default: _auto_): indicate if graphics driver should be used
230232
* no: never loads a graphics driver, software blit is used, no 3D possible (in player mode, disables OpenGL)
231233
* yes: always loads a graphics driver, output pixel format will be RGB (in player mode, same as `auto`)

docs/Filters/core_options.md

+13-14
Original file line numberDiff line numberDiff line change
@@ -37,23 +37,25 @@
3737
<a id="no-fd">__-no-fd__</a>: use buffered IO instead of file descriptor for read/write - this can speed up operations on small files
3838

3939
<a id="no-mx">__-no-mx__</a>: disable all mutexes, threads and semaphores (do not use if unsure about threading used)
40+
<a id="xml-max-csize">__-xml-max-csize__</a> (int, default: __100k__): maximum XML content or attribute size
4041
<a id="netcap">__-netcap__</a> (string): set packet capture and filtering rules formatted as [CFG][RULES]. Each `-netcap` argument will define a configuration
4142
[CFG] is an optional comma-separated list of:
4243
* id=ID: ID (string) for this configuration. If NULL, configuration will apply to all sockets not specifying a netcap ID
4344
* src=F: read packets from `F`, as produced by GPAC or a pcap or pcapng file
44-
* dst=F: output packets to `F` (no pcap/pcapng support), cannot be set if src is set
45+
* dst=F: output packets to `F` (GPAC or pcap/pcapng file), cannot be set if src is set
4546
* loop[=N]: loop capture file N times, or forever if N is not set or negative
4647
* nrt: disable real-time playback
4748
[RULES] is an optional list of `[OPT,OPT2...]` with OPT in:
48-
* m=N: set rule mode - `N` can be `r` for reception only (default), `w` for send only or `rw` for both
49-
* s=N: set packet start range to `N`
50-
* e=N: set packet end range to `N` (only used for `r` and `f` rules)
51-
* n=N: set number of packets to drop to `N` - not set, 0 or 1 means single packet
52-
* r=N: random drop one packet every `N`
53-
* f=N: drop first packet every `N`
54-
* p=P: local port number to filter, if not set the rule applies to all packets
55-
* o=N: patch packet instead of droping (always true for TCP), replacing byte at offset `N` (0 is first byte, <0 for random)
56-
* v=N: set patch byte value to `N` (hexa) or negative value for random (default)
49+
* m=K: set rule mode - `K` can be `r` for reception only (default), `w` for send only or `rw` for both
50+
* s=K: set packet start range to `K`
51+
* e=K: set packet end range to `K` - only used for `r` and `f` rules, 0 or not set means rule apply until end
52+
* n=K: set number of packets to drop to `K` - not set, 0 or 1 means single packet
53+
* r=K: random drop `n` packet every `K`
54+
* f=K: drop first `n` packets every `K`
55+
* d=K: reorder `n` packets after the next `K` packets, can be used with `f` or `r` rules
56+
* p=K: filter packets on port `K` only, if not set the rule applies to all packets
57+
* o=K: patch packet instead of droping (always true for TCP), replacing byte at offset `K` (0 is first byte, <0 for random)
58+
* v=K: set patch byte value to `K` (hexa) or negative value for random (default)
5759

5860
Example
5961
```
@@ -93,10 +95,7 @@ This will use regular network interface and drop packets 100 to 119 on port 1234
9395
<a id="dm-threads">__-dm-threads__</a>: force using threads for async download requests rather than session scheduler
9496
<a id="cte-rate-wnd">__-cte-rate-wnd__</a> (int, default: __20__): set window analysis length in milliseconds for chunk-transfer encoding rate estimation
9597
<a id="cred">__-cred__</a> (string): path to 128 bits key for credential storage
96-
<a id="no-h2">__-no-h2__</a>: disable HTTP2
97-
<a id="no-h2c">__-no-h2c__</a>: disable HTTP2 upgrade (i.e. over non-TLS)
98-
<a id="h2-copy">__-h2-copy__</a>: enable intermediate copy of data in nghttp2 (default is disabled but may report as broken frames in wireshark)
99-
<a id="dbg-edges">__-dbg-edges__</a>: log edges status in filter graph before dijkstra resolution (for debug). Edges are logged as edge_source(status, weight, src_cap_idx, dst_cap_idx)
98+
<a id="dbg-edges">__-dbg-edges__</a>: log edges status in filter graph before dijkstra resolution (for debug). Edges are logged as edge_source(status(disable_depth), weight, src_cap_idx -> dst_cap_idx)
10099
<a id="full-link">__-full-link__</a>: throw error if any PID in the filter graph cannot be linked
101100
<a id="no-dynf">__-no-dynf__</a>: disable dynamically loaded filters
102101
<a id="no-block">__-no-block__</a> (Enum, default: __no__): disable blocking mode of filters

0 commit comments

Comments
 (0)