.TH gpac 1 2019 gpac GPAC . .SH NAME .LP gpac \- GPAC command-line filter session manager .SH SYNOPSIS .LP .B gpac .RI [options] FILTER [LINK] FILTER [...] .br . .SH DESCRIPTION .LP This page describes all filters usually present in GPAC To check for help on a filter not listed here, use gpac -h myfilter .SH inspect .LP .br Description: Inspect packets .br .br The inspect filter can be used to dump PID and packets. It may also be used to check parts of payload of the packets. .br .br The default options inspect only PID changes. .br If .I full is not set, .I mode=frame is forced and PID properties are formatted in human-readable form, one PID per line. .br Otherwise, all properties are dumped. .br Note: specifying .I xml, .I analyze, .I fmt or using -for-test will force .I full to true. .br .br .SH Custom property duming .LP .br The packet inspector can be configured to dump specific properties of packets using .I fmt. .br When the option is not present, all properties are dumped. Otherwise, only properties identified by $TOKEN$ are printed. You may use '$', '@' or '%' for TOKEN separator. TOKEN can be: .br * pn: packet (frame in framed mode) number .br * dts: decoding time stamp in stream timescale, N/A if not available .br * ddts: difference between current and previous packets decoding time stamp in stream timescale, N/A if not available .br * cts: composition time stamp in stream timescale, N/A if not available .br * dcts: difference between current and previous packets composition time stamp in stream timescale, N/A if not available .br * ctso: difference between composition time stamp and decoding time stamp in stream timescale, N/A if not available .br * dur: duration in stream timescale .br * frame: framing status .br * interface: complete AU, interface object (no size info). Typically a GL texture .br * frame_full: complete AU .br * frame_start: beginning of frame .br * frame_end: end of frame .br * frame_cont: frame continuation (not beginning, not end) .br * sap or rap: SAP type of the frame .br * ilace: interlacing flag (0: progressive, 1: top field, 2: bottom field) .br * corr: corrupted packet flag .br * seek: seek flag .br * bo: byte offset in source, N/A if not available .br * roll: roll info .br * crypt: crypt flag .br * vers: carousel version number .br * size: size of packet .br * csize: total size of packets received so far .br * crc: 32 bit CRC of packet .br * lf or n: insert new line .br * t: insert tab .br * data: hex dump of packet (big output!) or as string if legal UTF-8 .br * lp: leading picture flag .br * depo: depends on other packet flag .br * depf: is depended on other packet flag .br * red: redundant coding flag .br * start: packet composition time as HH:MM:SS.ms .br * startc: packet composition time as HH:MM:SS,ms .br * end: packet end time as HH:MM:SS.ms .br * endc: packet end time as HH:MM:SS,ms .br * ck: clock type used for PCR discontinuities .br * pcr: MPEG-2 TS last PCR, n/a if not available .br * pcrd: difference between last PCR and decoding time, n/a if no PCR available .br * pcrc: difference between last PCR and composition time, n/a if no PCR available .br * P4CC: 4CC of packet property .br * PropName: Name of packet property .br * pid.P4CC: 4CC of PID property .br * pid.PropName: Name of PID property .br * fn: Filter name .br .br Example .br fmt="PID $pid.ID$ packet $pn$ DTS $dts$ CTS $cts$ $lf$" .br .br This dumps packet number, cts and dts as follows: PID 1 packet 10 DTS 100 CTS 108 \n .br .br An unrecognized keyword or missing property will resolve to an empty string. .br .br Note: when dumping in interleaved mode, there is no guarantee that the packets will be dumped in their original sequence order since the inspector fetches one packet at a time on each PID. .br .br .SH Note on playback .LP .br Buffering can be enabled to check the input filter chain behaviour, e.g. check HAS adaptation logic. .br The various buffering options control when packets are consumed. Buffering events are logged using media@info for state changes and media@debug for media filling events. .br The .I speed option is only used to configure the filter chain but is ignored by the filter when consuming packets. .br If real-time consumption is required, a reframer filter must be setup before the inspect filter. .br Example .br gpac -i SRC reframer:rt=on inspect:buffer=10000:rbuffer=1000:mbuffer=30000:speed=2 .br .br This will play the session at 2x speed, using 30s of maximum buffering, consumming packets after 10s of media are ready and rebuffering if less than 1s of media. .br .br .SH Options (expert): .LP .br log (str, default: stdout, minmax: fileName, stderr, stdout, GLOG or null): set probe log filename to print number of streams, GLOG uses GPAC logs app@info(default for android) .br mode (enum, default: pck): dump mode .br * pck: dump full packet .br * blk: dump packets before reconstruction .br * frame: force reframer .br * raw: dump source packets without demultiplexing .br .br interleave (bool, default: true): dump packets as they are received on each PID. If false, logs are reported for each PID at end of session .br deep (bool, default: false, updatable): dump packets along with PID state change, implied when .I fmt is set .br props (bool, default: true, updatable): dump packet properties, ignored when .I fmt is set .br dump_data (bool, default: false, updatable): enable full data dump (very large output), ignored when .I fmt is set .br fmt (str, updatable): set packet dump format .br hdr (bool, default: true): print a header corresponding to fmt string without '$' or "pid" .br allp (bool, default: false): analyse for the entire duration, rather than stopping when all PIDs are found .br info (bool, default: false, updatable): monitor PID info changes .br full (bool, default: false, updatable): full dump of PID properties (always on if XML) .br pcr (bool, default: false, updatable): dump M2TS PCR info .br speed (dbl, default: 1.0): set playback command speed. If negative and start is 0, start is set to -1 .br start (dbl, default: 0.0): set playback start offset. A negative value means percent of media duration with -1 equal to duration .br dur (frac, default: 0/0): set inspect duration .br analyze (enum, default: off, updatable): analyze sample content (NALU, OBU) .br * off: no analyzing .br * on: simple analyzing .br * bs: log bitstream syntax (all elements read from bitstream) .br * full: log bitstream syntax and bit sizes signaled as (N) after field value, except 1-bit fields (omitted) .br .br xml (bool, default: false, updatable): use xml formatting (implied if (-analyze]() is set) and disable .I fmt .br crc (bool, default: false, updatable): dump crc of samples of subsamples (NALU or OBU) when analyzing .br fftmcd (bool, default: false, updatable): consider timecodes use ffmpeg-compatible signaling rather than QT compliant one .br dtype (bool, default: false, updatable): dump property type .br buffer (uint, default: 0): set playback buffer in ms .br mbuffer (uint, default: 0): set max buffer occupancy in ms. If less than buffer, use buffer .br rbuffer (uint, default: 0, updatable): rebuffer trigger in ms. If 0 or more than buffer, disable rebuffering .br test (enum, default: no, updatable): skip predefined set of properties, used for test mode .br * no: no properties skipped .br * noprop: all properties/info changes on PID are skipped, only packets are dumped .br * network: URL/path dump, cache state, file size properties skipped (used for hashing network results) .br * netx: same as network but skip track duration and templates (used for hashing progressive load of fmp4) .br * encode: same as network plus skip decoder config (used for hashing encoding results) .br * encx: same as encode and skip bitrates, media data size and co .br * nocrc: disable packet CRC dump .br * nobr: skip bitrate .br .br .br .SH probe .LP .br Description: Probe source .br .br The Probe filter is used by applications (typically MP4Box) to query demultiplexed PIDs (audio, video, ...) available in a source chain. .br .br The filter outputs the number of input PIDs in the file specified by .I log. .br It is up to the app developer to query input PIDs of the prober and take appropriated decisions. .br .br .SH Options (expert): .LP .br log (str, default: stdout, minmax: fileName, stderr, stdout GLOG or null): set probe log filename to print number of streams, GLOG uses GPAC logs app@info(default for android) .br .br .SH compositor .LP .br Description: Compositor .br .br The GPAC compositor allows mixing audio, video, text and graphics in a timed fashion. .br The compositor operates either in media-client or filter-only mode. .br .br .SH Media-client mode .LP .br In this mode, the compositor acts as a pseudo-sink for the video side and creates its own output window. .br The video frames are dispatched to the output video PID in the form of frame pointers requiring later GPU read if used. .br The audio part acts as a regular filter, potentially mixing and resampling the audio inputs to generate its output. .br User events are directly processed by the filter in this mode. .br .br .SH Filter mode .LP .br In this mode, the compositor acts as a regular filter generating frames based on the loaded scene. .br It will generate its outputs based on the input video frames, and will process user event sent by consuming filter(s). .br If no input video frames (e.g. pure BIFS / SVG / VRML), the filter will generate frames based on the .I fps, at constant or variable frame rate. .br It will stop generating frames as soon as all input streams are done, unless extended/reduced by .I dur. .br If audio streams are loaded, an audio output PID is created. .br .br The default output pixel format in filter mode is: .br - rgb when the filter is explicitly loaded by the application .br - rgba when the filter is loaded during a link resolution .br This can be changed by assigning the .I opfmt option. .br If either .I opfmt specifies alpha channel or .I bc is not 0 but has alpha=0, background creation in default scene will be skipped. .br .br In filter-only mode, the special URL gpid:// is used to locate PIDs in the scene description, in order to design scenes independently from source media. .br When such a PID is associated to a Background2D node in BIFS (no SVG mapping yet), the compositor operates in pass-through mode. .br In this mode, only new input frames on the pass-through PID will generate new frames, and the scene clock matches the input packet time. .br The output size and pixel format will be set to the input size and pixel format, unless specified otherwise in the filter options. .br .br If only 2D graphics are used and display driver is not forced, 2D rasterizer will happen in the output pixel format (including YUV pixel formats). .br In this case, in-place processing (rasterizing over the input frame data) will be used whenever allowed by input data. .br .br If 3D graphics are used or display driver is forced, OpenGL will be used on offscreen surface and the output packet will be an OpenGL texture. .br .br .SH Specific URL syntaxes .LP .br The compositor accepts any URL type supported by GPAC. It also accepts the following schemes for URLs: .br * views:// : creates an auto-stereo scene of N views from views://v1::.::vN .br * mosaic:// : creates a mosaic of N views from mosaic://v1::.::vN .br .br For both syntaxes, vN can be any type of URL supported by GPAC. .br For views:// syntax, the number of rendered views is set by .I nbviews: .br - If the URL gives less views than rendered, the views will be repeated .br - If the URL gives more views than rendered, the extra views will be ignored .br .br The compositor can act as a source filter when the .I src option is explicitly set, independently from the operating mode: .br Example .br gpac compositor:src=source.mp4 vout .br .br .br The compositor can act as a source filter when the source url uses one of the compositor built-in protocol schemes: .br Example .br gpac -i mosaic://URL1:URL2 vout .br .br .br .SH Options (expert): .LP .br aa (enum, default: all, updatable): set anti-aliasing mode for raster graphics; whether the setting is applied or not depends on the graphics module or graphic card .br * none: no anti-aliasing .br * text: anti-aliasing for text only .br * all: complete anti-aliasing .br .br hlfill (uint, default: 0x0, updatable): set highlight fill color (ARGB) .br hlline (uint, default: 0xFF000000, updatable): set highlight stroke color (ARGB) .br hllinew (flt, default: 1.0, updatable): set highlight stroke width .br sz (bool, default: true, updatable): enable scalable zoom. When scalable zoom is enabled, resizing the output window will also recompute all vectorial objects. Otherwise only the final buffer is stretched .br bc (uint, default: 0, updatable): default background color to use when displaying transparent images or video with no scene composition instructions .br yuvhw (bool, default: true, updatable): enable YUV hardware for 2D blit .br blitp (bool, default: true, updatable): partial hardware blit. If not set, will force more redraw .br softblt (bool, default: true): enable software blit/stretch in 2D. If disabled, vector graphics rasterizer will always be used .br stress (bool, default: false, updatable): enable stress mode of compositor (rebuild all vector graphics and texture states at each frame) .br fast (bool, default: false, updatable): enable speed optimization - whether the setting is applied or not depends on the graphics module / graphic card .br bvol (enum, default: no, updatable): draw bounding volume of objects .br * no: disable bounding box .br * box: draws a rectangle (2D) or box (3D) .br * aabb: draws axis-aligned bounding-box tree (3D) or rectangle (2D) .br .br textxt (enum, default: default, updatable): specify whether text shall be drawn to a texture and then rendered or directly rendered. Using textured text can improve text rendering in 3D and also improve text-on-video like content .br * default: use texturing for OpenGL rendering, no texture for 2D rasterizer .br * never: never uses text textures .br * always: always render text to texture before drawing .br .br out8b (bool, default: false, updatable): convert 10-bit video to 8 bit texture before GPU upload .br drop (bool, default: false, updatable): drop late frame when drawing. If not set, frames are not dropped until a desynchronization of 1 second or more is observed .br sclock (bool, default: false, updatable): force synchronizing all streams on a single clock .br sgaze (bool, default: false, updatable): simulate gaze events through mouse .br ckey (uint, default: 0, updatable): color key to use in windowless mode (0xFFRRGGBB). GPAC currently does not support true alpha blitting to desktop due to limitations in most windowing toolkit, it therefore uses color keying mechanism. The alpha part of the key is used for global transparency of the output, if supported .br timeout (uint, default: 10000, updatable): timeout in ms after which a source is considered dead (0 disable timeout) .br fps (frac, default: 30/1, updatable): simulation frame rate when animation-only sources are played (ignored when video is present) .br timescale (uint, default: 0, updatable): timescale used for output packets when no input video PID. A value of 0 means fps numerator .br autofps (bool, default: true): use video input fps for output, ignored in player mode. If no video or not set, uses .I fps .br vfr (bool, default: false): only emit frames when changes are detected. (always true in player mode and when filter is dynamically loaded) .br dur (dbl, default: 0, updatable): duration of generation. Mostly used when no video input is present. Negative values mean number of frames, positive values duration in second, 0 stops as soon as all streams are done .br fsize (bool, default: false, updatable): force the scene to resize to the biggest bitmap available if no size info is given in the BIFS configuration .br mode2d (enum, default: defer, updatable): specify whether immediate drawing should be used or not .br * immediate: the screen is completely redrawn at each frame (always on if pass-through mode is detected) .br * defer: object positioning is tracked from frame to frame and dirty rectangles info is collected in order to redraw the minimal amount of the screen buffer .br * debug: only renders changed areas, resetting other areas .br Whether the setting is applied or not depends on the graphics module and player mode .br .br amc (bool, default: true): audio multichannel support; if disabled always down-mix to stereo. Useful if the multichannel output does not work properly .br asr (uint, default: 0): force output sample rate (0 for auto) .br ach (uint, default: 0): force output channels (0 for auto) .br alayout (uint, default: 0): force output channel layout (0 for auto) .br afmt (afmt, default: s16, minmax: none,u8,s16,s16b,s24,s32,flt,dbl,u8p,s16p,s24p,s32p,fltp,dblp): force output channel format (0 for auto) .br asize (uint, default: 1024): audio output packet size in samples .br abuf (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 .br avol (uint, default: 100, updatable): audio volume in percent .br apan (uint, default: 50, updatable): audio pan in percent, 50 is no pan .br async (bool, default: true, updatable): audio resynchronization; if disabled, audio data is never dropped but may get out of sync .br max_aspeed (dbl, default: 2.0, updatable): silence audio if playback speed is greater than specified value .br max_vspeed (dbl, default: 4.0, updatable): move to i-frame only decoding if playback speed is greater than specified value .br buffer (uint, default: 3000, updatable): playout buffer in ms (overridden by BufferLength property of input PID) .br rbuffer (uint, default: 1000, updatable): rebuffer trigger in ms (overridden by RebufferLength property of input PID) .br mbuffer (uint, default: 3000, updatable): max buffer in ms, must be greater than playout buffer (overridden by BufferMaxOccupancy property of input PID) .br ntpsync (uint, default: 0, updatable): ntp resync threshold in ms (drops frame if their NTP is more than the given threshold above local ntp), 0 disables ntp drop .br nojs (bool, default: false): disable javascript .br noback (bool, default: false): ignore background nodes and viewport fill (useful when dumping to PNG) .br ogl (enum, default: auto, updatable): specify 2D rendering mode .br * auto: automatically decides between on, off and hybrid based on content .br * off: disables OpenGL; 3D will not be rendered .br * on: uses OpenGL for all graphics; this will involve polygon tesselation and 2D graphics will not look as nice as 2D mode .br * hybrid: the compositor performs software drawing of 2D graphics with no textures (better quality) and uses OpenGL for all 2D objects with textures and 3D objects .br .br pbo (bool, default: false, updatable): enable PixelBufferObjects to push YUV textures to GPU in OpenGL Mode. This may slightly increase the performances of the playback .br nav (enum, default: none, updatable): override the default navigation mode of MPEG-4/VRML (Walk) and X3D (Examine) .br * none: disables navigation .br * walk: 3D world walk .br * fly: 3D world fly (no ground detection) .br * pan: 2D/3D world zoom/pan .br * game: 3D world game (mouse gives walk direction) .br * slide: 2D/3D world slide .br * exam: 2D/3D object examine .br * orbit: 3D object orbit .br * vr: 3D world VR (yaw/pitch/roll) .br .br linegl (bool, default: false, updatable): indicate that outlining shall be done through OpenGL pen width rather than vectorial outlining .br epow2 (bool, default: true, updatable): emulate power-of-2 textures for OpenGL (old hardware). Ignored if OpenGL rectangular texture extension is enabled .br * yes: video texture is not resized but emulated with padding. This usually speeds up video mapping on shapes but disables texture transformations .br * no: video is resized to a power of 2 texture when mapping to a shape .br .br paa (bool, default: false, updatable): indicate whether polygon antialiasing should be used in full antialiasing mode. If not set, only lines and points antialiasing are used .br bcull (enum, default: on, updatable): indicate whether backface culling shall be disable or not .br * on: enables backface culling .br * off: disables backface culling .br * alpha: only enables backface culling for transparent meshes .br .br wire (enum, default: none, updatable): wireframe mode .br * none: objects are drawn as solid .br * only: objects are drawn as wireframe only .br * solid: objects are drawn as solid and wireframe is then drawn .br .br norms (enum, default: none, updatable): normal vector drawing for debug .br * none: no normals drawn .br * face: one normal per face drawn .br * vertex: one normal per vertex drawn .br .br rext (bool, default: true, updatable): use non power of two (rectangular) texture GL extension .br cull (bool, default: true, updatable): use aabb culling: large objects are rendered in multiple calls when not fully in viewport .br depth_gl_scale (flt, default: 100, updatable): set depth scaler .br depth_gl_type (enum, default: none, updatable): set geometry type used to draw depth video .br * none: no geometric conversion .br * point: compute point cloud from pixel+depth .br * strip: same as point but thins point set .br .br nbviews (uint, default: 0, updatable): number of views to use in stereo mode .br stereo (enum, default: none, updatable): stereo output type. If your graphic card does not support OpenGL shaders, only top and side modes will be available .br * none: no stereo .br * side: images are displayed side by side from left to right .br * top: images are displayed from top (laft view) to bottom (right view) .br * hmd: same as side except that view aspect ratio is not changed .br * ana: standard color anaglyph (red for left view, green and blue for right view) is used (forces views=2) .br * cols: images are interleaved by columns, left view on even columns and left view on odd columns (forces views=2) .br * rows: images are interleaved by columns, left view on even rows and left view on odd rows (forces views=2) .br * spv5: images are interleaved by for SpatialView 5 views display, fullscreen mode (forces views=5) .br * alio8: images are interleaved by for Alioscopy 8 views displays, fullscreen mode (forces views=8) .br * custom: images are interleaved according to the shader file indicated in .I mvshader. The shader is exposed each view as uniform sampler2D gfViewX, where X is the view number starting from the left .br .br mvshader (str, updatable): file path to the custom multiview interleaving shader .br fpack (enum, default: none, updatable): default frame packing of input video .br * none: no frame packing .br * top: top bottom frame packing .br * side: side by side packing .br .br camlay (enum, default: offaxis, updatable): camera layout in multiview modes .br * straight: camera is moved along a straight line, no rotation .br * offaxis: off-axis projection is used .br * linear: camera is moved along a straight line with rotation .br * circular: camera is moved along a circle with rotation .br .br iod (flt, default: 6.4, updatable): inter-ocular distance (eye separation) in cm (distance between the cameras). .br rview (bool, default: false, updatable): reverse view order .br dbgpack (bool, default: false, updatable): view packed stereo video as single image (show all) .br tvtn (uint, default: 30, updatable): number of point sampling for tile visibility algorithm .br tvtt (uint, default: 8, updatable): number of points above which the tile is considered visible .br tvtd (enum, default: off, updatable): debug tiles and full coverage SRD .br * off: regular draw .br * partial: only displaying partial tiles, not the full sphere video .br * full: only display the full sphere video .br .br tvtf (bool, default: false, updatable): force all tiles to be considered visible, regardless of viewpoint .br fov (flt, default: 1.570796326794897, updatable): default field of view for VR .br vertshader (str): path to vertex shader file .br fragshader (str): path to fragment shader file .br autocal (bool, default: false, updatable): auto calibration of znear/zfar in depth rendering mode .br dispdepth (sint, default: -1, updatable): display depth, negative value uses default screen height .br dispdist (flt, default: 50, updatable): distance in cm between the camera and the zero-disparity plane. There is currently no automatic calibration of depth in GPAC .br focdist (flt, default: 0, updatable): distance of focus point .br osize (v2di, default: 0x0, updatable): force output size. If not set, size is derived from inputs .br dpi (v2di, default: 96x96, updatable): default dpi if not indicated by video output .br dbgpvr (flt, default: 0, updatable): debug scene used by PVR addon .br player (enum, default: no): set compositor in player mode .br * no: regular mode .br * base: player mode .br * gui: player mode with GUI auto-start .br .br noaudio (bool, default: false): disable audio output .br opfmt (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 .I player mode .br drv (enum, default: auto): indicate if graphics driver should be used .br * no: never loads a graphics driver, software blit is used, no 3D possible (in player mode, disables OpenGL) .br * yes: always loads a graphics driver, output pixel format will be RGB (in player mode, same as auto) .br * auto: decides based on the loaded content .br .br src (cstr): URL of source content .br gaze_x (sint, default: 0, updatable): horizontal gaze coordinate (0=left, width=right) .br gaze_y (sint, default: 0, updatable): vertical gaze coordinate (0=top, height=bottom) .br gazer_enabled (bool, default: false, updatable): enable gaze event dispatch .br subtx (sint, default: 0, updatable): horizontal translation in pixels towards right for subtitles renderers .br subty (sint, default: 0, updatable): vertical translation in pixels towards top for subtitles renderers .br subfs (uint, default: 0, updatable): font size for subtitles renderers (0 means automatic) .br subd (sint, default: 0, updatable): subtitle delay in milliseconds for subtitles renderers .br audd (sint, default: 0, updatable): audio delay in milliseconds .br clipframe (bool, default: false): visual output is clipped to bounding rectangle .br .br .SH mp4dmx .LP .br Description: ISOBMFF/QT demultiplexer .br .br This filter demultiplexes ISOBMF and QT files. .br Input ISOBMFF/QT can be regular or fragmented, and available as files or as raw bytestream. .br .SH Track Selection .LP .br The filter can use fragment identifiers of source to select a single track for playback. The allowed fragments are: .br * #audio: only use the first audio track .br * #video: only use the first video track .br * #auxv: only use the first auxiliary video track .br * #pict: only use the first picture track .br * #text: only use the first text track .br * #trackID=VAL: only use the track with given ID .br * #itemID=VAL: only use the item with given ID .br * #ID=VAL: only use the track/item with given ID .br * #VAL: only use the track/item with given ID .br .br .SH Scalable Tracks .LP .br When scalable tracks are present in a file, the reader can operate in 3 modes using .I smode option: .br * smode=single: resolves all extractors to extract a single bitstream from a scalable set. The highest level is used .br In this mode, there is no enhancement decoder config, only a base one resulting from the merge of the layers configurations .br * smode=split: all extractors are removed and every track of the scalable set is declared. In this mode, each enhancement track has no base decoder config .br and an enhancement decoder config. .br * smode=splitx: extractors are kept in the bitstream, and every track of the scalable set is declared. In this mode, each enhancement track has a base decoder config .br (copied from base) and an enhancement decoder config. This is mostly used for DASHing content. .br Warning: smode=splitx will result in extractor NAL units still present in the output bitstream, which shall only be true if the output is ISOBMFF based .br .br .SH Options (expert): .LP .br src (cstr): local file name of source content (only used when explicitly loading the filter) .br allt (bool, default: false): load all tracks even if unknown media type .br noedit (bool, default: false): do not use edit lists .br itt (bool, default: false): convert all items of root meta into a single PID .br itemid (bool, default: true): keep item IDs in PID properties .br smode (enum, default: split): load mode for scalable/tile tracks .br * split: each track is declared, extractors are removed .br * splitx: each track is declared, extractors are kept .br * single: a single track is declared (highest level for scalable, tile base for tiling) .br .br alltk (bool, default: false): declare disabled tracks .br frame_size (uint, default: 1024): frame size for raw audio samples (dispatches frame_size samples per packet) .br expart (bool, default: false): expose cover art as a dedicated video PID .br sigfrag (bool, default: false): signal fragment and segment boundaries of source on output packets .br tkid (str): declare only track based on given param .br * integer value: declares track with the given ID .br * audio: declares first audio track .br * video: declares first video track .br * 4CC: declares first track with matching 4CC for handler type .br .br stsd (uint, default: 0): only extract sample mapped to the given sample description index (0 means extract all) .br nocrypt (bool): signal encrypted tracks as non encrypted (mostly used for export) .br mstore_size (uint, default: 1000000): target buffer size in bytes when reading from memory stream (pipe etc...) .br mstore_purge (uint, default: 50000): minimum size in bytes between memory purges when reading from memory stream, 0 means purge as soon as possible .br mstore_samples (uint, default: 50): minimum number of samples to be present before purging sample tables when reading from memory stream (pipe etc...), 0 means purge as soon as possible .br strtxt (bool, default: false): load text tracks (apple/tx3g) as MPEG-4 streaming text tracks .br xps_check (enum, default: auto): parameter sets extraction mode from AVC/HEVC/VVC samples .br * keep: do not inspect sample (assumes input file is compliant when generating DASH/HLS/CMAF) .br * rem: removes all inband xPS and notify configuration changes accordingly .br * auto: resolves to keep for smode=splix (dasher mode), rem otherwise .br .br nodata (bool, default: false): do not load sample data .br initseg (str): local init segment name when input is a single ISOBMFF segment .br .br .SH bifsdec .LP .br Description: MPEG-4 BIFS decoder .br .br This filter decodes MPEG-4 BIFS binary frames directly into the scene graph of the compositor. .br Note: This filter cannot be used to dump BIFS content to text or xml, use MP4Box for that. .br .br No options .br .br .SH odfdec .LP .br Description: MPEG-4 OD decoder .br .br This filter decodes MPEG-4 OD binary frames directly into the scene manager of the compositor. .br Note: This filter cannot be used to dump OD content to text or xml, use MP4Box for that. .br .br No options .br .br .SH fin .LP .br Description: File input .br .br This filter dispatch raw blocks from input file into a filter chain. .br Block size can be adjusted using .I block_size. .br Content format can be forced through .I mime and file extension can be changed through .I ext. .br Note: Unless disabled at session level (see .I -no-probe ), file extensions are usually ignored and format probing is done on the first data block. .br The special file name null is used for creating a file with no data, needed by some filters such as dasher. .br The special file name rand is used to generate random data. .br The special file name randsc is used to generate random data with 0x000001 start-code prefix. .br .br The filter handles both files and GF_FileIO objects as input URL. .br .br .SH Options (expert): .LP .br src (cstr): location of source file .br block_size (uint, default: 0): block size used to read file. 0 means 5000 if file less than 500m, 1M otherwise .br range (lfrac, default: 0-0): byte range .br ext (cstr): override file extension .br mime (cstr): set file mime type .br pck (mem): data to use instead of file .br .br .SH btplay .LP .br Description: BT/XMT/X3D loader .br .br This filter parses MPEG-4 BIFS (BT and XMT), VRML97 and X3D (wrl and XML) files directly into the scene graph of the compositor. .br .br When .I sax_dur=N is set, the filter will do a progressive load of the source and cancel current loading when processing time is higher than N. .br .br .SH Options (expert): .LP .br sax_dur (uint, default: 0): duration for SAX parsing (XMT), 0 disables SAX parsing .br .br .SH httpin .LP .br Description: HTTP input .br .br This filter dispatch raw blocks from a remote HTTP resource into a filter chain. .br Block size can be adjusted using .I block_size, and disk caching policies can be adjusted. .br Content format can be forced through .I mime and file extension can be changed through .I ext. .br .br The filter supports both http and https schemes, and will attempt reconnecting as TLS if TCP connection fails. .br .br Note: Unless disabled at session level (see .I -no-probe ), file extensions are usually ignored and format probing is done on the first data block. .br .br .SH Options (expert): .LP .br src (cstr): URL of source content .br block_size (uint, default: 100000): block size used to read file .br cache (enum, default: disk): set cache mode .br * auto: cache to disk if content length is known, no cache otherwise .br * disk: cache to disk, discard once session is no longer used .br * keep: cache to disk and keep .br * mem: stores to memory, discard once session is no longer used .br * mem_keep: stores to memory, keep after session is reassigned but move to mem after first download .br * none: no cache .br * none_keep: stores to memory, keep after session is reassigned but move to none after first download .br .br range (lfrac, default: 0-0): set byte range, as fraction .br ext (cstr): override file extension .br mime (cstr): set file mime type .br blockio (bool, default: false): use blocking IO .br .br .SH svgplay .LP .br Description: SVG loader .br .br This filter parses SVG files directly into the scene graph of the compositor. .br .br When .I sax_dur=N is set, the filter will do a progressive load of the source and cancel current loading when processing time is higher than N. .br .br .SH Options (expert): .LP .br sax_dur (uint, default: 0): loading duration for SAX parsing, 0 disables SAX parsing .br .br .SH rfimg .LP .br Description: JPG/J2K/PNG/BMP reframer .br .br This filter parses JPG/J2K/PNG/BMP files/data and outputs corresponding visual PID and frames. .br .br The following extensions for PNG change the pixel format for RGBA images: .br * pngd: use RGB+depth map pixel format .br * pngds: use RGB+depth(7bits)+shape(MSB of alpha channel) pixel format .br .br No options .br .br .SH imgdec .LP .br Description: PNG/JPG decoder .br .br This filter decodes JPEG and PNG images. .br .br No options .br .br .SH rfadts .LP .br Description: ADTS reframer .br .br This filter parses AAC files/data and outputs corresponding audio PID and frames. .br .br .SH Options (expert): .LP .br frame_size (uint, default: 1024): size of AAC frame in audio samples .br index (dbl, default: 1.0): indexing window length .br ovsbr (bool, default: false): force oversampling SBR (does not multiply timescales by 2) .br sbr (enum, default: no): set SBR signaling .br * no: no SBR signaling at all .br * imp: backward-compatible SBR signaling (audio signaled as AAC-LC) .br * exp: explicit SBR signaling (audio signaled as AAC-SBR) .br .br ps (enum, default: no): set PS signaling .br * no: no PS signaling at all .br * imp: backward-compatible PS signaling (audio signaled as AAC-LC) .br * exp: explicit PS signaling (audio signaled as AAC-PS) .br .br expart (bool, default: false): expose pictures as a dedicated video PID .br aacchcfg (sint, default: 0): set AAC channel configuration to this value if missing from ADTS header, use negative value to always override .br .br .SH rflatm .LP .br Description: LATM reframer .br .br This filter parses AAC in LATM files/data and outputs corresponding audio PID and frames. .br .br .SH Options (expert): .LP .br frame_size (uint, default: 1024): size of AAC frame in audio samples .br index (dbl, default: 1.0): indexing window length .br .br .SH rfmp3 .LP .br Description: MP3 reframer .br .br This filter parses MPEG-1/2 audio files/data and outputs corresponding audio PID and frames. .br .br .SH Options (expert): .LP .br index (dbl, default: 1.0): indexing window length .br expart (bool, default: false): expose pictures as a dedicated video PID .br forcemp3 (bool, default: true): force mp3 signaling for MPEG-2 Audio layer 3 .br .br .SH faad .LP .br Description: FAAD decoder .br .br This filter decodes AAC streams through faad library. .br .br No options .br .br .SH maddec .LP .br Description: MAD decoder .br .br This filter decodes MPEG 1/2 audio streams through libmad library. .br .br No options .br .br .SH xviddec .LP .br Description: XVid decoder .br .br This filter decodes MPEG-4 part 2 (and DivX) through libxvidcore library. .br .br .SH Options (expert): .LP .br deblock_y (bool, default: false): enable Y deblocking .br deblock_uv (bool, default: false): enable UV deblocking .br film_effect (bool, default: false): enable film effect .br dering_y (bool, default: false): enable Y deblocking .br dering_uv (bool, default: false): enable UV deblocking .br .br .SH j2kdec .LP .br Description: OpenJPEG2000 decoder .br Version: 2.x .br .br This filter decodes JPEG2000 streams through OpenJPEG2000 library. .br .br No options .br .br .SH rfac3 .LP .br Description: AC3 reframer .br .br This filter parses AC3 and E-AC3 files/data and outputs corresponding audio PID and frames. .br .br .SH Options (expert): .LP .br index (dbl, default: 1.0): indexing window length .br .br .SH a52dec .LP .br Description: A52 decoder .br .br This filter decodes AC3 streams through a52dec library. .br .br No options .br .br .SH rfamr .LP .br Description: AMR/EVRC reframer .br .br This filter parses AMR, AMR Wideband, EVRC and SMV files/data and outputs corresponding audio PID and frames. .br .br .SH Options (expert): .LP .br index (dbl, default: 1.0): indexing window length .br .br .SH oggdmx .LP .br Description: OGG demultiplexer .br .br This filter demultiplexes OGG files/data into a set of media PIDs and frames. .br .br .SH Options (expert): .LP .br index (dbl, default: 1.0): indexing window length (not implemented), use 0 to disable stream probing for duration), .br expart (bool, default: false): expose pictures as a dedicated video PID .br .br .SH vorbisdec .LP .br Description: Vorbis decoder .br .br This filter decodes Vorbis streams through libvorbis library. .br .br No options .br .br .SH theoradec .LP .br Description: Theora decoder .br .br This filter decodes Theora streams through libtheora library. .br .br No options .br .br .SH m2tsdmx .LP .br Description: MPEG-2 TS demultiplexer .br .br This filter demultiplexes MPEG-2 Transport Stream files/data into a set of media PIDs and frames. .br .br .SH Options (expert): .LP .br temi_url (cstr): force TEMI URL .br dsmcc (bool, default: no): enable DSMCC receiver .br seeksrc (bool, default: true): seek local source file back to origin once all programs are setup .br sigfrag (bool, default: false): signal segment boundaries on output packets for DASH or HLS sources .br dvbtxt (bool, default: false): export DVB teletext streams .br .br .SH sockin .LP .br Description: UDP/TCP input .br .br This filter handles generic TCP and UDP input sockets. It can also probe for MPEG-2 TS over RTP input. Probing of MPEG-2 TS over UDP/RTP is enabled by default but can be turned off. .br .br Data format can be specified by setting either .I ext or .I mime options. If not set, the format will be guessed by probing the first data packet .br .br - UDP sockets are used for source URLs formatted as udp://NAME .br - TCP sockets are used for source URLs formatted as tcp://NAME .br - UDP unix domain sockets are used for source URLs formatted as udpu://NAME .br - TCP unix domain sockets are used for source URLs formatted as tcpu://NAME .br .br When ports are specified in the URL and the default option separators are used (see gpac -h doc), the URL must either: .br - have a trailing '/', e.g. udp://localhost:1234/[:opts] .br - use gpac separator, e.g. udp://localhost:1234[:gpac:opts] .br .br On OSX with VM packet replay you will need to force multicast routing, e.g. route add -net 239.255.1.4/32 -interface vboxnet0 .br .br .SH Options (expert): .LP .br src (cstr): address of source content .br block_size (uint, default: 0x60000): block size used to read socket .br port (uint, default: 1234): default port if not specified .br ifce (cstr): default multicast interface .br listen (bool, default: false): indicate the input socket works in server mode .br ka (bool, default: false): keep socket alive if no more connections .br maxc (uint, default: +I): max number of concurrent connections .br tsprobe (bool, default: true): probe for MPEG-2 TS data, either RTP or raw UDP. Disabled if mime or ext are given and do not match MPEG-2 TS mimes/extensions .br ext (str): indicate file extension of udp data .br mime (str): indicate mime type of udp data .br block (bool, default: false): set blocking mode for socket(s) .br timeout (uint, default: 10000): set timeout in ms for UDP socket(s), 0 to disable timeout .br reorder_pck (uint, default: 100): number of packets delay for RTP reordering (M2TS over RTP) .br reorder_delay (uint, default: 10): number of ms delay for RTP reordering (M2TS over RTP) .br ssm (strl): list of IP to include for source-specific multicast .br ssmx (strl): list of IP to exclude for source-specific multicast .br .br .SH dvbin .LP .br Description: DVB for Linux .br .br Experimental DVB support for linux, requires a channel config file through .I chcfg .br .br The URL syntax is dvb://CHANNAME[@FRONTEND], with: .br * CHANNAME: the channel name as listed in the channel config file .br * frontend: the index of the DVB adapter to use (optional, default is 0) .br .br .SH Options (expert): .LP .br src (cstr): URL of source content .br block_size (uint, default: 65536): block size used to read file .br chcfg (cstr): path to channels.conf file .br .br .SH osvcdec .LP .br Description: OpenSVC decoder .br .br This filter decodes scalable AVC|H264 streams through OpenSVC library. .br .br No options .br .br .SH vtbdec .LP .br Description: VideoToolBox decoder .br .br This filter decodes video streams through OSX/iOS VideoToolBox (MPEG-2, H263, AVC|H264, HEVC, ProRes). It allows GPU frame dispatch or direct frame copy. .br .br .SH Options (expert): .LP .br reorder (uint, default: 6): number of frames to wait for temporal re-ordering .br no_copy (bool, default: true): dispatch decoded frames as OpenGL textures (true) or as copied packets (false) .br ofmt (pfmt, default: nv12): set default pixel format for decoded video. If not found, fall back to nv12 .br disable_hw (bool, default: false): disable hardware decoding .br wait_sync (bool, default: false, updatable): wait for sync frame before decoding .br .br .SH mcdec .LP .br Description: MediaCodec decoder .br .br This filter decodes video streams using hardware decoder on android devices .br .br .SH Options (expert): .LP .br disable_gl (bool, default: false): disable OpenGL texture transfer .br .br .SH lsrdec .LP .br Description: MPEG-4 LASeR decoder .br .br This filter decodes MPEG-4 LASeR binary frames directly into the scene graph of the compositor. .br Note: This filter cannot be used to dump LASeR content to text or xml, use MP4Box for that. .br .br No options .br .br .SH safdmx .LP .br Description: SAF demultiplexer .br .br This filter demultiplexes SAF (MPEG-4 Simple Aggregation Format for LASeR) files/data into a set of media PIDs and frames. .br .br No options .br .br .SH dashin .LP .br Description: MPEG-DASH and HLS client .br .br This filter reads MPEG-DASH, HLS and MS Smooth manifests. .br .br .SH Regular mode .LP .br This is the default mode, in which the filter produces media PIDs and frames from sources indicated in the manifest. .br The default behavior is to perform adaptation according to .I algo, but the filter can: .br - run with no adaptation, to grab maximum quality. .br Example .br gpac -i MANIFEST_URL:algo=none:start_with=max_bw -o dest.mp4 .br .br - run with no adaptation, fetching all qualities. .br Example .br gpac -i MANIFEST_URL:split_as -o dst=$File$.mp4:clone .br .br .br .SH File mode .LP .br When .I forward is set to file, the client forwards media files without demultiplexing them. .br This is mostly used to expose the DASH session to a file server such as ROUTE or HTTP. .br In this mode, the manifest is forwarded as an output PID. .br Warning: This mode cannot be set through inheritance as it changes the link capabilities of the filter. The filter MUST be explicitly declared. .br .br To expose a live DASH session to route: .br Example .br gpac -i MANIFEST_URL dashin:forward=file -o route://225.0.0.1:8000/ .br .br .br If the source has dependent media streams (scalability) and all qualities and initialization segments need to be forwarded, add .I split_as. .br .br .SH Segment bound modes .LP .br When .I forward is set to segb or mani, the client forwards media frames (after demultiplexing) together with segment and fragment boundaries of source files. .br .br This mode can be used to process media data and regenerate the same manifest/segmentation. .br .br Example .br gpac -i MANIFEST_URL:forward=mani cecrypt:cfile=DRM.xml -o encrypted/live.mpd:pssh=mv .br .br This will encrypt an existing DASH session, inject PSSH in manifest and segments. .br .br Example .br gpac -i MANIFEST_URL:forward=segb cecrypt:cfile=DRM.xml -o encrypted/live.m3u8 .br .br This will encrypt an existing DASH session and republish it as HLS, using same segment names and boundaries. .br .br This mode will force .I noseek=true to ensure the first segment fetched is complete, and .I split_as=true to fetch all qualities. .br .br Each first packet of a segment will have the following properties attached: .br * `CueStart`: indicate this is a segment start .br * `FileNumber`: current segment number .br * `FileName`: current segment file name without manifest (MPD or master HLS) base url .br * `DFPStart`: set with value 0 if this is the first packet in the period, absent otherwise .br .br If .I forward is set to mani, the first packet of a segment dispatched after a manifest update will also carry the manifest payload as a property: .br * `DFManifest`: contains main manifest (MPD, M3U8 master) .br * `DFVariant`: contains list of HLS child playlists as strings for the given quality .br * `DFVariantName`: contains list of associated HLS child playlists name, in same order as manifests in DFVariant .br .br Each output PID will have the following properties assigned: .br * `DFMode`: set to 1 for segb or 2 for mani .br * `DCue`: set to inband .br * `DFPStart`: set to current period start value .br * `FileName`: set to associated init segment if any .br * `Representation`: set to the associated representation ID in the manifest .br * `DashDur`: set to the average segment duration as indicated in the manifest .br * `source_template`: set to true to indicate the source template is known .br * `stl_timescale`: timescale used by SegmentTimeline, or 0 if no SegmentTimeline .br * `init_url`: unresolved intialization URL (as it appears in the MPD or in the variant playlist) .br * `manifest_url`: manifest URL .br * `hls_variant_name`: HLS variant playlist name (as it appears in the HLS master playlist) .br .br When the dasher is used together with this mode, this will force all generated segments to have the same name, duration and fragmentation properties as the input ones. It is therefore not recommended for sessions stored/generated on local storage to generate the output in the same directory. .br .br .SH Options (expert): .LP .br auto_switch (sint, default: 0): switch quality every N segments .br * positive: go to higher quality or loop to lowest .br * negative: go to lower quality or loop to highest .br * 0: disabled .br .br segstore (enum, default: mem): enable file caching .br * mem: all files are stored in memory, no disk IO .br * disk: files are stored to disk but discarded once played .br * cache: all files are stored to disk and kept .br .br algo (str, default: gbuf, minmax: none|grate|gbuf|bba0|bolaf|bolab|bolau|bolao|JS): adaptation algorithm to use .br * none: no adaptation logic .br * grate: GPAC legacy algo based on available rate .br * gbuf: GPAC legacy algo based on buffer occupancy .br * bba0: BBA-0 .br * bolaf: BOLA Finite .br * bolab: BOLA Basic .br * bolau: BOLA-U .br * bolao: BOLA-O .br * JS: use file JS (either with specified path or in $GSHARE/scripts/) for algo (.js extension may be omitted) .br .br start_with (enum, default: max_bw): initial selection criteria .br * min_q: start with lowest quality .br * max_q: start with highest quality .br * min_bw: start with lowest bitrate .br * max_bw: start with highest bitrate; if tiles are used, all low priority tiles will have the lower (below max) bandwidth selected .br * max_bw_tiles: start with highest bitrate; if tiles are used, all low priority tiles will have their lowest bandwidth selected .br .br max_res (bool, default: true): use max media resolution to configure display .br abort (bool, default: false): allow abort during a segment download .br use_bmin (enum, default: auto): playout buffer handling .br * no: use default player settings .br * auto: notify player of segment duration if not low latency .br * mpd: use the indicated min buffer time of the MPD .br .br shift_utc (sint, default: 0): shift DASH UTC clock in ms .br spd (sint, default: -I): suggested presentation delay in ms .br route_shift (sint, default: 0): shift ROUTE requests time by given ms .br server_utc (bool, default: yes): use ServerUTC or Date HTTP headers instead of local UTC .br screen_res (bool, default: yes): use screen resolution in selection phase .br init_timeshift (sint, default: 0): set initial timeshift in ms (if >0) or in per-cent of timeshift buffer (if <0) .br tile_mode (enum, default: none): tile adaptation mode .br * none: bitrate is shared equally across all tiles .br * rows: bitrate decreases for each row of tiles starting from the top, same rate for each tile on the row .br * rrows: bitrate decreases for each row of tiles starting from the bottom, same rate for each tile on the row .br * mrows: bitrate decreased for top and bottom rows only, same rate for each tile on the row .br * cols: bitrate decreases for each columns of tiles starting from the left, same rate for each tile on the columns .br * rcols: bitrate decreases for each columns of tiles starting from the right, same rate for each tile on the columns .br * mcols: bitrate decreased for left and right columns only, same rate for each tile on the columns .br * center: bitrate decreased for all tiles on the edge of the picture .br * edges: bitrate decreased for all tiles on the center of the picture .br .br tiles_rate (uint, default: 100): indicate the amount of bandwidth to use at each quality level. The rate is recursively applied at each level, e.g. if 50%, Level1 gets 50%, level2 gets 25%, ... If 100, automatic rate allocation will be done by maximizing the quality in order of priority. If 0, bitstream will not be smoothed across tiles/qualities, and concurrency may happen between different media .br delay40X (uint, default: 500): delay in milliseconds to wait between two 40X on the same segment .br exp_threshold (uint, default: 100): delay in milliseconds to wait after the segment AvailabilityEndDate before considering the segment lost .br switch_count (uint, default: 1): indicate how many segments the client shall wait before switching up bandwidth. If 0, switch will happen as soon as the bandwidth is enough, but this is more prone to network variations .br aggressive (bool, default: no): if enabled, switching algo targets the closest bandwidth fitting the available download rate. If no, switching algo targets the lowest bitrate representation that is above the currently played (e.g. does not try to switch to max bandwidth) .br debug_as (uintl): play only the adaptation sets indicated by their indices (0-based) in the MPD .br speedadapt (bool, default: no): enable adaptation based on playback speed .br noxlink (bool, default: no): disable xlink if period has both xlink and adaptation sets .br query (str): set query string (without initial '?') to append to xlink of periods .br split_as (bool, default: no): separate all qualities into different adaptation sets and stream all qualities. Dependent representations (scalable) are treated as independent .br noseek (bool, default: no): disable seeking of initial segment(s) in dynamic mode (useful when UTC clocks do not match) .br bwcheck (uint, default: 5): minimum time in milliseconds between two bandwidth checks when allowing segment download abort .br lowlat (enum, default: early): segment scheduling policy in low latency mode .br * no: disable low latency .br * strict: strict respect of AST offset in low latency .br * early: allow fetching segments earlier than their AST in low latency when input PID is empty .br .br forward (enum, default: none): segment forwarding mode .br * none: regular DASH read .br * file: do not demultiplex files and forward them as file PIDs (imply segstore=mem) .br * segb: turn on .I split_as, segment and fragment bounds signaling (sigfrag) in sources and DASH cue insertion .br * mani: same as segb and also forward manifests .br .br fmodefwd (bool, default: yes): forward packet rather than copy them in file forward mode. Packet copy might improve performances in low latency mode .br skip_lqt (bool, default: no): disable decoding of tiles with highest degradation hints (not visible, not gazed at) for debug purposes .br llhls_merge (bool, default: yes): merge LL-HLS byte range parts into a single open byte range request .br groupsel (bool, default: no): select groups based on language (by default all playable groups are exposed) .br chain_mode (enum, default: on): MPD chaining mode .br * off: do not use MPD chaining .br * on: use MPD chaining once over, fallback if MPD load failure .br * error: use MPD chaining once over or if error (MPD or segment download) .br .br asloop (bool, default: false): when auto switch is enabled, iterates back and forth from highest to lowest qualities .br .br .SH cdcrypt .LP .br Description: CENC decryptor .br .br The CENC decryptor supports decrypting CENC, ISMA, HLS Sample-AES (MPEG2 ts) and Adobe streams. .br .br For HLS, key is retrieved according to the key URI in the manifest. .br Otherwise, the filter uses a configuration file. .br The syntax is available at https://wiki.gpac.io/Common-Encryption .br 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 .I cfile (lowest priority). .br 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. .br .br .SH Options (expert): .LP .br cfile (str): crypt file location .br decrypt (enum, default: full): decrypt mode (CENC only) .br * full: decrypt everything, throwing error if keys are not found .br * nokey: decrypt everything for which a key is found, skip decryption otherwise .br * skip: decrypt nothing .br .br drop_keys (uintl): consider keys with given 1-based indexes as not available (multi-key debug) .br kids (strl): define KIDs. If keys is empty, consider keys with given KID (as hex string) as not available (debug) .br keys (strl): define key values for each of the specified KID .br hls_cenc_patch_iv (bool, default: false): ignore IV updates in some broken HLS+CENC streams .br .br .SH cecrypt .LP .br Description: CENC encryptor .br .br The CENC encryptor supports CENC, ISMA and Adobe encryption. It uses a DRM config file for declaring keys. .br The syntax is available at https://wiki.gpac.io/Common-Encryption .br The DRM config file can be set per PID using the property CryptInfo, or set at the filter level using .I cfile. .br 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). .br 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. .br If no DRM config file is defined for a given PID, this PID will not be encrypted, or an error will be thrown if .I allc is specified. .br .br .SH Options (expert): .LP .br cfile (str): crypt file location .br allc (bool): throw error if no DRM config file is found for a PID .br .br .SH mp4mx .LP .br Description: ISOBMFF/QT multiplexer .br .br This filter multiplexes streams to ISOBMFF (14496-12 and derived specifications) or QuickTime .br .br .SH Tracks and Items .LP .br By default all input PIDs with ItemID property set are multiplexed as items, otherwise they are multiplexed as tracks. .br To prevent source items to be multiplexed as items, use .I -itemid option from ISOBMFF demultiplexer. .br Example .br gpac -i source.mp4:itemid=false -o file.mp4 .br .br .br To force non-item streams to be multiplexed as items, use #ItemID option on that PID: .br Example .br gpac -i source.jpg:#ItemID=1 -o file.mp4 .br .br .br .SH Storage .LP .br The .I store option allows controlling if the file is fragmented or not, and when not fragmented, how interleaving is done. For cases where disk requirements are tight and fragmentation cannot be used, it is recommended to use either flat or fstart modes. .br .br The .I vodcache option allows controlling how DASH onDemand segments are generated: .br - If set to on, file data is stored to a temporary file on disk and flushed upon completion, no padding is present. .br - If set to insert, SIDX/SSIX will be injected upon completion of the file by shifting bytes in file. In this case, no padding is required but this might not be compatible with all output sinks and will take longer to write the file. .br - If set to replace, SIDX/SSIX size will be estimated based on duration and DASH segment length, and padding will be used in the file before the final SIDX. If input PIDs have the properties DSegs set, this will used be as the number of segments. .br The on and insert modes will produce exactly the same file, while the mode replace may inject a free box before the sidx. .br .br .SH Custom boxes .LP .br Custom boxes can be specified as box patches: .br For movie-level patch, the .I boxpatch option of the filter should be used. .br Per PID box patch can be specified through the PID property boxpatch. .br Example .br gpac -i source:#boxpatch=myfile.xml -o mux.mp4 .br .br Per Item box patch can be specified through the PID property boxpatch. .br Example .br gpac -i source:1ItemID=1:#boxpatch=myfile.xml -o mux.mp4 .br .br .br The box patch is applied before writing the initial moov box in fragmented mode, or when writing the complete file otherwise. .br The box patch can either be a filename or the full XML string. .br .br .SH Tagging .LP .br When tagging is enabled, the filter will watch the property CoverArt and all custom properties on incoming PID. .br The built-in tag names are indicated by MP4Box -h tags. .br QT tags can be specified using qtt_NAME property names, and will be added using formatting specified in MP4Box -h tags. .br Other tag class may be specified using tag_NAME property names, and will be added if .I tags is set to all using: .br - NAME as a box 4CC if NAME is four characters long .br - NAME as a box 4CC if NAME is 3 characters long, and will be prefixed by 0xA9 .br - the CRC32 of the NAME as a box 4CC if NAME is not four characters long .br .br .SH User data .LP .br The filter will look for the following PID properties to create user data entries: .br * `udtab`: set the track user-data box to the property value which must be a serialized box array blob .br * `mudtab`: set the movie user-data box to the property value which must be a serialized box array blob .br * `udta_U4CC`: set track user-data box entry of type U4CC to property value .br * `mudta_U4CC`: set movie user-data box entry of type U4CC to property value .br .br Example .br gpac -i src.mp4:#udta_tagc='My Awesome Tag' -o tag.mp4 .br gpac -i src.mp4:#mudtab=data@box.bin -o tag.mp4 .br .br .br .SH Custom sample group descriptions and sample auxiliary info .LP .br The filter watches the following custom data properties on incoming packets: .br * `grp_A4CC`: maps packet to sample group description of type A4CC and entry set to property payload .br * `grp_A4CC_param`: same as above and sets sample to group grouping_type_parameter to param .br * `sai_A4CC`: adds property payload as sample auxiliary information of type A4CC .br * `sai_A4CC_param`: same as above and sets aux_info_type_parameterto param .br .br The property grp_EMSG consists in one or more EventMessageBox as defined in MPEG-DASH. .br - in fragmented mode, presence of these boxes in a packet will start a new fragment, with the boxes written before the moof .br - in regular mode, an internal sample group of type EMSG is currently used for emsg box storage .br .br .SH Notes .LP .br The filter watches the property FileNumber on incoming packets to create new files (regular mode) or new segments (DASH mode). .br .br The filter watches the property DSIWrap (4CC as int or string) on incoming PID to wrap decoder configuration in a box of given type (unknown wrapping) .br Example .br -i unkn.mkv:#ISOMSubtype=VIUK:#DSIWrap=cfgv -o t.mp4 .br .br This will wrap the unknown stream using VIUK code point in stsd and wrap any decoder configuration data in a cfgv box. .br .br If .I pad_sparse is set, the filter watches the property Sparse on incoming PID to decide whether empty packets should be injected to keep packet duration info. .br Such packets are only injected when a whole in the timeline is detected. .br - if Sparse is absent, empty packet is inserted for unknown text and metadata streams .br - if Sparse is true, empty packet is inserted for all stream types .br - if Sparse is false, empty packet is never injected .br .br .SH Options (expert): .LP .br m4sys (bool, default: false): force MPEG-4 Systems signaling of tracks .br dref (bool, default: false): only reference data from source file - not compatible with all media sources .br ctmode (enum, default: edit): set composition offset mode for video tracks .br * edit: uses edit lists to shift first frame to presentation time 0 .br * noedit: ignore edit lists and does not shift timeline .br * negctts: uses ctts v1 with possibly negative offsets and no edit lists .br .br dur (frac, default: 0): only import the specified duration. If negative, specify the number of coded frames to import .br pack3gp (uint, default: 1): pack a given number of 3GPP audio frames in one sample .br importer (bool, default: false): compatibility with old importer, displays import progress .br pack_nal (bool, default: false): repack NALU size length to minimum possible size for NALU-based video (AVC/HEVC/...) .br xps_inband (enum, default: no): use inband (in sample data) parameter set for NALU-based video (AVC/HEVC/...) .br * no: parameter sets are not inband, several sample descriptions might be created .br * pps: picture parameter sets are inband, all other parameter sets are in sample description .br * all: parameter sets are inband, no parameter sets in sample description .br * both: parameter sets are inband, signaled as inband, and also first set is kept in sample description .br * mix: creates non-standard files using single sample entry with first PSs found, and moves other PS inband .br * auto: keep source config, or defaults to no if source is not ISOBMFF .br .br store (enum, default: inter): file storage mode .br * inter: perform precise interleave of the file using .I cdur (requires temporary storage of all media) .br * flat: write samples as they arrive and moov at end (fastest mode) .br * fstart: write samples as they arrive and moov before mdat .br * tight: uses per-sample interleaving of all tracks (requires temporary storage of all media) .br * frag: fragments the file using cdur duration .br * sfrag: fragments the file using cdur duration but adjusting to start with SAP1/3 .br .br cdur (frac, default: -1/1): chunk duration for flat and interleaving modes or fragment duration for fragmentation modes .br * 0: no specific interleaving but moov first .br * negative: defaults to 1.0 unless overridden by storage profile .br .br moovts (sint, default: 600): timescale to use for movie. A negative value picks the media timescale of the first track added .br moof_first (bool, default: true): generate fragments starting with moof then mdat .br abs_offset (bool, default: false): use absolute file offset in fragments rather than offsets from moof .br fsap (bool, default: true): split truns in video fragments at SAPs to reduce file size .br subs_sidx (sint, default: -1): number of subsegments per sidx. negative value disables sidx, -2 removes sidx if present in source PID .br m4cc (str): 4 character code of empty box to append at the end of a segment .br chain_sidx (bool, default: false): use daisy-chaining of SIDX .br msn (uint, default: 1): sequence number of first moof to N .br msninc (uint, default: 1): sequence number increase between moof boxes .br tfdt (lfrac, default: 0): set initial decode time (tfdt) of first traf .br tfdt_traf (bool, default: false): force tfdt box in each traf .br nofragdef (bool, default: false): disable default flags in fragments .br straf (bool, default: false): use a single traf per moof (smooth streaming and co) .br strun (bool, default: false): use a single trun per traf (smooth streaming and co) .br psshs (enum, default: moov): set pssh boxes store mode .br * moof: in first moof of each segments .br * moov: in movie box .br * both: in movie box and in first moof of each segment .br * none: pssh is discarded .br .br sgpd_traf (bool, default: false): store sample group descriptions in traf (duplicated for each traf). If not used, sample group descriptions are stored in the movie box .br vodcache (enum, default: replace): enable temp storage for VoD dash modes .br * on: use temp storage of complete file for sidx and ssix injection .br * insert: insert sidx and ssix by shifting bytes in output file .br * replace: precompute pace requirements for sidx and ssix and rewrite file range at end .br .br noinit (bool, default: false): do not produce initial moov, used for DASH bitstream switching mode .br tktpl (enum, default: yes): use track box from input if any as a template to create new track .br * no: disables template .br * yes: clones the track (except edits and decoder config) .br * udta: only loads udta .br .br mudta (enum, default: yes): use udta and other moov extension boxes from input if any .br * no: disables import .br * yes: clones all extension boxes .br * udta: only loads udta .br .br mvex (bool, default: false): set mvex boxes after trak boxes .br sdtp_traf (enum, default: no): use sdtp box in traf box rather than using flags in trun sample entries .br * no: do not use sdtp .br * sdtp: use sdtp box to indicate sample dependencies and do not write info in trun sample flags .br * both: use sdtp box to indicate sample dependencies and also write info in trun sample flags .br .br trackid (uint, default: 0): track ID of created track for single track. Default 0 uses next available trackID .br fragdur (bool, default: false): fragment based on fragment duration rather than CTS. Mostly used for MP4Box -frag option .br btrt (bool, default: true): set btrt box in sample description .br styp (str): set segment styp major brand (and optionally version) to the given 4CC[.version] .br mediats (sint, default: 0): set media timescale. A value of 0 means inherit from PID, a value of -1 means derive from samplerate or frame rate .br ase (enum, default: v0): set audio sample entry mode for more than stereo layouts .br * v0: use v0 signaling but channel count from stream, recommended for backward compatibility .br * v0s: use v0 signaling and force channel count to 2 (stereo) if more than 2 channels .br * v1: use v1 signaling, ISOBMFF style (will mux raw PCM as ISOBMFF style) .br * v1qt: use v1 signaling, QTFF style .br .br ssix (bool, default: false): create ssix box when sidx box is present, level 1 mapping I-frames byte ranges, level 0xFF mapping the rest .br ccst (bool, default: false): insert coding constraint box for video tracks .br maxchunk (uint, default: 0): set max chunk size in bytes for runs (only used in non-fragmented mode). 0 means no constraints .br noroll (bool, default: false): disable roll sample grouping .br norap (bool, default: false): disable rap sample grouping .br saio32 (bool, default: false): use 32 bit offset for side data location instead of 64 bit offset .br tfdt64 (bool, default: false): use 64 bit tfdt and sidx even for 32 bits timestamps .br compress (enum, default: no): set top-level box compression mode .br * no: disable box compression .br * moov: compress only moov box .br * moof: compress only moof boxes .br * sidx: compress moof and sidx boxes .br * ssix: compress moof, sidx and ssix boxes .br * all: compress moov, moof, sidx and ssix boxes .br .br fcomp (bool, default: false): force using compress box even when compressed size is larger than uncompressed .br otyp (bool, default: false): inject original file type when using compressed boxes .br trun_inter (bool, default: false): interleave samples in trun based on the temporal level, the lowest level are stored first (this will create as many trun boxes as required) .br truns_first (bool, default: false): store track runs before sample group description and sample encryption information .br block_size (uint, default: 10000): target output block size, 0 for default internal value (10k) .br boxpatch (str): apply box patch before writing .br deps (bool, default: true): add samples dependencies information .br mfra (bool, default: false): enable movie fragment random access when fragmenting (ignored when dashing) .br forcesync (bool, default: false): force all SAP types to be considered sync samples (might produce non-compliant files) .br refrag (bool, default: false): use track fragment defaults from initial file if any rather than computing them from PID properties (used when processing standalone segments/fragments) .br itags (enum, default: strict): tag injection mode .br * none: do not inject tags .br * strict: only inject recognized itunes tags .br * all: inject all possible tags .br .br keep_utc (bool, default: false): force all new files and tracks to keep the source UTC creation and modification times .br pps_inband (bool, default: no): when .I xps_inband is set, inject PPS in each non SAP 1/2/3 sample .br moovpad (uint, default: 0): insert free box of given size after moov for future in-place editing .br cmaf (enum, default: no): use CMAF guidelines (turns on mvex, truns_first, strun, straf, tfdt_traf, chain_sidx and restricts subs_sidx to -1 or 0) .br * no: CMAF not enforced .br * cmfc: use CMAF cmfc guidelines .br * cmf2: use CMAF cmf2 guidelines (turns on nofragdef) .br .br pad_sparse (bool, default: true): inject sample with no data (size 0) to keep durations in unknown sparse text and metadata tracks .br force_dv (bool, default: false): force DV sample entry types even when AVC/HEVC compatibility is signaled .br tsalign (bool, default: true): enable timeline realignment to 0 for first sample in fragmented mode .br .br .SH rfqcp .LP .br Description: QCP reframer .br .br This filter parses QCP files/data and outputs corresponding audio PID and frames. .br .br .SH Options (expert): .LP .br index (dbl, default: 1.0): indexing window length .br .br .SH rfh263 .LP .br Description: H263 reframer .br .br This filter parses H263 files/data and outputs corresponding visual PID and frames. .br .br .SH Options (expert): .LP .br fps (frac, default: 15000/1000): import frame rate .br index (dbl, default: 1.0): indexing window length .br notime (bool, default: false): ignore input timestamps, rebuild from 0 .br .br .SH rfmpgvid .LP .br Description: M1V/M2V/M4V reframer .br .br This filter parses MPEG-1/2 and MPEG-4 part 2 video files/data and outputs corresponding video PID and frames. .br Note: The filter uses negative CTS offsets: CTS is correct, but some frames may have DTS greater than CTS. .br .br .SH Options (expert): .LP .br fps (frac, default: 0/1000): import frame rate (0 default to FPS from bitstream or 25 Hz) .br index (dbl, default: -1.0): indexing window length. If 0, bitstream is not probed for duration. A negative value skips the indexing if the source file is larger than 20M (slows down importers) unless a play with start range > 0 is issued .br vfr (bool, default: false): set variable frame rate import .br importer (bool, default: false): compatibility with old importer, displays import results .br notime (bool, default: false): ignore input timestamps, rebuild from 0 .br .br .SH nhntr .LP .br Description: NHNT reader .br .br This filter reads NHNT files/data to produce a media PID and frames. .br NHNT documentation is available at https://wiki.gpac.io/NHNT-Format .br .br .SH Options (expert): .LP .br reframe (bool, default: false): force re-parsing of referenced content .br index (dbl, default: 1.0): indexing window length .br .br .SH nhmlr .LP .br Description: NHML reader .br .br This filter reads NHML files/data to produce a media PID and frames. .br NHML documentation is available at https://wiki.gpac.io/NHML-Format .br .br .SH Options (expert): .LP .br reframe (bool, default: false): force re-parsing of referenced content .br index (dbl, default: 1.0): indexing window length .br .br .SH rfnalu .LP .br Description: AVC/HEVC reframer .br .br This filter parses AVC|H264 and HEVC files/data and outputs corresponding video PID and frames. .br This filter produces ISOBMFF-compatible output: start codes are removed, NALU length field added and avcC/hvcC config created. .br Note: The filter uses negative CTS offsets: CTS is correct, but some frames may have DTS greater than CTS. .br .br .SH Options (expert): .LP .br fps (frac, default: 0/1000): import frame rate (0 default to FPS from bitstream or 25 Hz) .br index (dbl, default: -1.0): indexing window length. If 0, bitstream is not probed for duration. A negative value skips the indexing if the source file is larger than 20M (slows down importers) unless a play with start range > 0 is issued .br explicit (bool, default: false): use explicit layered (SVC/LHVC) import .br strict_poc (enum, default: off): delay frame output of an entire GOP to ensure CTS info is correct when POC suddenly changes .br * off: disable GOP buffering .br * on: enable GOP buffering, assuming no error in POC .br * error: enable GOP buffering and try to detect lost frames .br .br nosei (bool, default: false): remove all sei messages .br nosvc (bool, default: false): remove all SVC/MVC/LHVC data .br novpsext (bool, default: false): remove all VPS extensions .br importer (bool, default: false): compatibility with old importer, displays import results .br nal_length (uint, default: 4): set number of bytes used to code length field: 1, 2 or 4 .br subsamples (bool, default: false): import subsamples information .br deps (bool, default: false): import sample dependency information .br seirw (bool, default: true): rewrite AVC sei messages for ISOBMFF constraints .br audelim (bool, default: false): keep Access Unit delimiter in payload .br notime (bool, default: false): ignore input timestamps, rebuild from 0 .br dv_mode (enum, default: auto): signaling for DolbyVision .br * none: never signal DV profile .br * auto: signal DV profile if RPU or EL are found .br * clean: do not signal and remove RPU and EL NAL units .br * single: signal DV profile if RPU are found and remove EL NAL units .br .br dv_profile (uint, default: 0): profile for DolbyVision (currently defined profiles are 4, 5, 7, 8, 9), 0 for auto-detect .br dv_compatid (enum, default: auto): cross-compatibility ID for DolbyVision .br * auto: auto-detect .br * none: no cross-compatibility .br * hdr10: CTA HDR10, as specified by EBU TR 03 .br * bt709: SDR BT.709 .br * hlg709: HLG BT.709 gamut in ITU-R BT.2020 .br * hlg2100: HLG BT.2100 gamut in ITU-R BT.2020 .br * bt2020: SDR BT.2020 .br * brd: Ultra HD Blu-ray Disc HDR .br .br bsdbg (enum, default: off): debug NAL parsing in parser@debug logs .br * off: not enabled .br * on: enabled .br * full: enable with number of bits dumped .br .br .br .SH m2psdmx .LP .br Description: MPEG PS demultiplexer .br .br This filter demultiplexes MPEG-2 program streams to produce media PIDs and frames. .br .br No options .br .br .SH avidmx .LP .br Description: AVI demultiplexer .br .br This filter demultiplexes AVI files to produce media PIDs and frames. .br .br .SH Options (expert): .LP .br fps (frac, default: 1/0): import frame rate, default is AVI one .br importer (bool, default: false): compatibility with old importer, displays import results .br noreframe (bool, default: false): skip media reframer .br .br .SH txtin .LP .br Description: Subtitle loader .br .br This filter reads subtitle data from input PID to produce subtitle frames on a single PID. .br The filter supports the following formats: .br * SRT: https://en.wikipedia.org/wiki/SubRip .br * WebVTT: https://www.w3.org/TR/webvtt1/ .br * TTXT: https://wiki.gpac.io/TTXT-Format-Documentation .br * QT 3GPP Text XML (TexML): Apple QT6, likely deprecated .br * TTML: https://www.w3.org/TR/ttml2/ .br * SUB: one subtitle per line formatted as {start_frame}{end_frame}text .br * SSA (Substation Alpha): basic parsing support for common files .br .br Input files must be in UTF-8 or UTF-16 format, with or without BOM. The internal frame format is: .br * WebVTT (and srt if desired): ISO/IEC 14496-30 VTT cues .br * TTML: ISO/IEC 14496-30 XML subtitles .br * Others: 3GPP/QT Timed Text .br .br .SH TTML Support .LP .br If .I ttml_split option is set, the TTML document is split in independent time segments by inspecting all overlapping subtitles in the body. .br Empty periods in TTML will result in empty TTML documents or will be skipped if .I no_empty option is set. .br .br The first sample has a CTS assigned as indicated by .I ttml_cts: .br - a numerator of -2 indicates the first CTS is 0 .br - a numerator of -1 indicates the first CTS is the first active time in document .br - a numerator >= 0 indicates the CTS to use for first sample .br .br When TTML splitting is disabled, the duration of the TTML sample is given by .I ttml_dur if not 0, or set to the document duration .br .br By default, media resources are kept as declared in TTML2 documents. .br .br .I ttml_embed can be used to embed inside the TTML sample the resources in or : .br - for , ,