/
gpac.1
5169 lines (4986 loc) · 107 KB
/
gpac.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
.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
.
gpac is GPAC's command line tool for setting up and running filter chains.
.br
.br
FILTER: a single filter declaration (e.g., -i file, -o dump, inspect, ...), see gpac -h doc.
.br
[LINK]: a link instruction (e.g., @, @2, @2#StreamType=Visual, ...), see gpac -h doc.
.br
[options]: one or more option strings, each starting with a - character.
.br
- an option using a single - indicates an option of gpac (see gpac -hx) or of libgpac (see gpac -hx core)
.br
- an option using -- indicates a global filter or meta-filter (e.g. FFMPEG) option, e.g. --block_size=1000 or --profile=Baseline (see gpac -h doc)
.br
.br
Filter declaration order may impact the link resolver which will try linking in declaration order. Most of the time for simple graphs, this has no impact. However, for complex graphs with no link declarations, this can lead to different results.
.br
Options do not require any specific order, and may be present anywhere, including between link statements or filter declarations.
.br
Boolean values do not need any value specified. Other types shall be formatted as opt=val, except .I -i, -src, .I -o, -dst and .I -h options.
.br
.br
The session can be interrupted at any time using ctrl+c, which can also be used to toggle global reporting.
.br
.br
The possible options for gpac are:
.br
.br
.TP
.B \-mem-track
.br
enable memory tracker
.br
.TP
.B \-mem-track-stack
.br
enable memory tracker with stack dumping
.br
.TP
.B \-ltf
.br
load test-unit filters (used for for unit tests only)
.br
.TP
.B \-sloop (int)
.br
loop execution of session, creating a session at each loop, mainly used for testing. If no value is given, loops forever
.br
.TP
.B \-runfor (int)
.br
run for the given amount of milliseconds, exit with full session flush
.br
.TP
.B \-runforf (int)
.br
run for the given amount of milliseconds, exit with fast session flush
.br
.TP
.B \-runforx (int)
.br
run for the given amount of milliseconds and exit with no cleanup
.br
.TP
.B \-runfors (int)
.br
run for the given amount of milliseconds and exit with segfault (tests)
.br
.TP
.B \-runforl (int)
.br
run for the given amount of milliseconds and wait forever at end (tests)
.br
.TP
.B \-stats
.br
print stats after execution
.br
.TP
.B \-graph
.br
print graph after execution
.br
.TP
.B \-qe
.br
enable quick exit (no mem cleanup)
.br
.TP
.B \-k
.br
enable keyboard interaction from command line
.br
.TP
.B \-r (string)
.br
enable reporting
.br
* r: runtime reporting
.br
* r=FA[,FB]: runtime reporting but only print given filters, e.g. r=mp4mx for ISOBMFF multiplexer only
.br
* r=: only print final report
.br
.TP
.B \-seps (string, default: :=#,!@)
.br
set the default character sets used to separate various arguments
.br
- the first char is used to separate argument names
.br
- the second char, if present, is used to separate names and values
.br
- the third char, if present, is used to separate fragments for PID sources
.br
- the fourth char, if present, is used for list separators (sourceIDs, gfreg, ...)
.br
- the fifth char, if present, is used for boolean negation
.br
- the sixth char, if present, is used for LINK directives (see filters help (-h doc))
.br
.TP
.B \-i,-src (string)
.br
specify an input file - see filters help (-h doc)
.br
.TP
.B \-o,-dst (string)
.br
specify an output file - see filters help (-h doc)
.br
.TP
.B \-ib (string)
.br
specify an input file to wrap as GF_FileIO object (testing of GF_FileIO)
.br
.TP
.B \-ibx (string)
.br
specify an input file to wrap as GF_FileIO object without caching (testing of GF_FileIO)
.br
.TP
.B \-ob (string)
.br
specify an output file to wrap as GF_FileIO object (testing of GF_FileIO)
.br
.TP
.B \-cl
.br
force complete mode when no link directive are set - see filters help (-h doc)
.br
.TP
.B \-step
.br
test step mode in non-blocking session
.br
.TP
.B \-h,-help,-ha,-hx,-hh (string)
.br
print help. Use -help or -h for basic options, -ha for advanced options, -hx for expert options and -hh for all.
.br
Note: The @ character can be used in place of the * character. String parameter can be:
.br
* empty: print command line options help
.br
* doc: print the general filter info
.br
* alias: print the gpac alias syntax
.br
* log: print the log system help
.br
* core: print the supported libgpac core options. Use -ha/-hx/-hh for advanced/expert options
.br
* cfg: print the GPAC configuration help
.br
* net: print network interfaces
.br
* prompt: print the GPAC prompt help when running in interactive mode (see .I -k )
.br
* modules: print available modules
.br
* module NAME: print info and options of module NAME
.br
* creds: print credential help
.br
* filters: print name of all available filters
.br
* filters:*: print name of all available filters, including meta filters
.br
* codecs: print the supported builtin codecs - use -hx to include unmapped codecs (ffmpeg, ...)
.br
* formats: print the supported formats (-ha: print filter names, -hx: include meta filters (ffmpeg,...), -hh: print mime types)
.br
* protocols: print the supported protocol schemes (-ha: print filter names, -hx: include meta filters (ffmpeg,...), -hh: print all)
.br
* props: print the supported builtin PID and packet properties
.br
* props PNAME: print the supported builtin PID and packet properties mentioning PNAME
.br
* colors: print the builtin color names and their values
.br
* layouts: print the builtin CICP audio channel layout names and their values
.br
* links: print possible connections between each supported filters (use -hx to view src->dst cap bundle detail)
.br
* links FNAME: print sources and sinks for filter FNAME (either builtin or JS filter)
.br
* FNAME: print filter FNAME info (multiple FNAME can be given)
.br
- For meta-filters, use FNAME:INST, e.g. ffavin:avfoundation
.br
- Use * to print info on all filters (big output!), *:* to print info on all filters including meta filter instances (really big output!)
.br
- By default only basic filter options and description are shown. Use -ha to show advanced options capabilities, -hx for expert options, -hh for all options and filter capabilities including on filters disabled in this build
.br
* FNAME.OPT: print option OPT in filter FNAME
.br
* OPT: look in filter names and options for OPT and suggest possible matches if none found. Use -hx to look for keyword in all option descriptions
.br
.br
.TP
.B \-p (string)
.br
use indicated profile for the global GPAC config. If not found, config file is created. If a file path is indicated, this will load profile from that file. Otherwise, this will create a directory of the specified name and store new config there. The following reserved names create a temporary profile (not stored on disk):
.br
* 0: full profile
.br
* n: null profile disabling shared modules/filters and system paths in config (may break GUI and other filters)
.br
Appending :reload to the profile name will force recreating a new configuration file
.br
.TP
.B \-alias (string)
.br
assign a new alias or remove an alias. Can be specified several times. See alias usage (-h alias)
.br
.TP
.B \-aliasdoc (string)
.br
assign documentation for a given alias (optional). Can be specified several times
.br
.TP
.B \-uncache
.br
revert all items in GPAC cache directory to their original name and server path
.br
.TP
.B \-js (string)
.br
specify javascript file to use as controller of filter session
.br
.TP
.B \-wc
.br
write all core options in the config file unless already set
.br
.TP
.B \-we
.br
write all file extensions in the config file unless already set (useful to change some default file extensions)
.br
.TP
.B \-wf
.br
write all filter options in the config file unless already set
.br
.TP
.B \-wfx
.br
write all filter options and all meta filter arguments in the config file unless already set (large config file !)
.br
.TP
.B \-xopt
.br
unrecognized options and filters declaration following this option are ignored - used to pass arguments to GUI
.br
.TP
.B \-creds (string)
.br
setup credentials as used by servers
.br
.br
.br
The following libgpac core options allow customizing the filter session:
.br
.br
.TP
.B \-dbg-edges
.br
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)
.br
.TP
.B \-full-link
.br
throw error if any PID in the filter graph cannot be linked
.br
.TP
.B \-no-dynf
.br
disable dynamically loaded filters
.br
.TP
.B \-no-block (Enum, default: no)
.br
disable blocking mode of filters
.br
* no: enable blocking mode
.br
* fanout: disable blocking on fan-out, unblocking the PID as soon as one of its destinations requires a packet
.br
* all: disable blocking
.br
.TP
.B \-no-reg
.br
disable regulation (no sleep) in session
.br
.TP
.B \-no-reassign
.br
disable source filter reassignment in PID graph resolution
.br
.TP
.B \-sched (Enum, default: free)
.br
set scheduler mode
.br
* free: lock-free queues except for task list (default)
.br
* lock: mutexes for queues when several threads
.br
* freex: lock-free queues including for task lists (experimental)
.br
* flock: mutexes for queues even when no thread (debug mode)
.br
* direct: no threads and direct dispatch of tasks whenever possible (debug mode)
.br
.TP
.B \-max-chain (int, default: 6)
.br
set maximum chain length when resolving filter links. Default value covers for [ in -> ] dmx -> reframe -> decode -> encode -> reframe -> mx [ -> out]. Filter chains loaded for adaptation (e.g. pixel format change) are loaded after the link resolution. Setting the value to 0 disables dynamic link resolution. You will have to specify the entire chain manually
.br
.TP
.B \-max-sleep (int, default: 50)
.br
set maximum sleep time slot in milliseconds when regulation is enabled
.br
.TP
.B \-threads (int)
.br
set N extra thread for the session. -1 means use all available cores
.br
.TP
.B \-no-probe
.br
disable data probing on sources and relies on extension (faster load but more error-prone)
.br
.TP
.B \-no-argchk
.br
disable tracking of argument usage (all arguments will be considered as used)
.br
.TP
.B \-blacklist (string)
.br
blacklist the filters listed in the given string (comma-separated list). If first character is '-', this is a whitelist, i.e. only filters listed in the given string will be allowed
.br
.TP
.B \-no-graph-cache
.br
disable internal caching of filter graph connections. If disabled, the graph will be recomputed at each link resolution (lower memory usage but slower)
.br
.TP
.B \-no-reservoir
.br
disable memory recycling for packets and properties. This uses much less memory but stresses the system memory allocator much more
.br
.TP
.B \-buffer-gen (int, default: 1000)
.br
default buffer size in microseconds for generic pids
.br
.TP
.B \-buffer-dec (int, default: 1000000)
.br
default buffer size in microseconds for decoder input pids
.br
.TP
.B \-buffer-units (int, default: 1)
.br
default buffer size in frames when timing is not available
.br
.SH Using Aliases
.PL
The gpac command line can become quite complex when many sources or filters are used. In order to simplify this, an alias system is provided.
.br
.br
To assign an alias, use the syntax gpac -alias="NAME VALUE".
.br
* `NAME`: shall be a single string, with no space.
.br
* `VALUE`: the list of argument this alias replaces. If not set, the alias is destroyed
.br
.br
When parsing arguments, the alias will be replace by its value.
.br
Example
.br
gpac -alias="output aout vout"
.br
.br
This allows later audio and video playback using gpac -i src.mp4 output
.br
.br
Aliases can use arguments from the command line. The allowed syntaxes are:
.br
* `@{a}`: replaced by the value of the argument with index a after the alias
.br
* `@{a,b}`: replaced by the value of the arguments with index a and b
.br
* `@{a:b}`: replaced by the value of the arguments between index a and b
.br
* `@{-a,b}`: replaced by the value of the arguments with index a and b, inserting a list separator (comma by default) between them
.br
* `@{-a:b}`: replaced by the value of the arguments between index a and b, inserting a list separator (comma by default) between them
.br
* `@{+a,b}`: clones the parent word in the alias for a and b, replacing this pattern in each clone by the corresponding argument
.br
* `@{+a:b}`: clones the parent word in the alias for each argument between index a and b, replacing this pattern in each clone by the corresponding argument
.br
.br
The specified index can be:
.br
* forward index: a strictly positive integer, 1 being the first argument after the alias
.br
* backward index: the value 'n' (or 'N') to indicate the last argument on the command line. This can be followed by -x to rewind arguments (e.g. @{n-1} is the before last argument)
.br
.br
Before solving aliases, all option arguments are moved at the beginning of the command line. This implies that alias arguments cannot be options.
.br
Arguments not used by any aliases are kept on the command line, other ones are removed
.br
.br
Example
.br
-alias="foo src=@{N} dst=test.mp4"
.br
.br
The command gpac foo f1 f2 expands to gpac src=f2 dst=test.mp4 f1
.br
Example
.br
-alias="list: inspect src=@{+:N}"
.br
.br
The command gpac list f1 f2 f3 expands to gpac inspect src=f1 src=f2 src=f3
.br
Example
.br
-alias="list inspect src=@{+2:N}"
.br
.br
The command gpac list f1 f2 f3 expands to gpac inspect src=f2 src=f3 f1
.br
Example
.br
-alias="plist aout vout flist:srcs=@{-,N}"
.br
.br
The command gpac plist f1 f2 f3 expands to gpac aout vout flist:srcs="f1,f2,f3"
.br
.br
Alias documentation can be set using gpac -aliasdoc="NAME VALUE", with NAME the alias name and VALUE the documentation.
.br
Alias documentation will then appear in gpac help.
.br
.br
.SH User Credentials
.LP
.br
Some servers in GPAC can use user-based and group-based authentication.
.br
The information is stored by default in the file users.cfg located in the GPAC profile directory.
.br
The file can be overwritten using the .I -users option.
.br
.br
By default, this file does not exist until at least one user has been configured.
.br
.br
The .I creds option allows inspecting or modifying the users and groups information. The syntax for the option value is:
.br
* `show` or no value: prints the users.cfg file
.br
* `reset`: deletes the users.cfg file (i.e. deletes all users and groups)
.br
* `NAME`: show information of user NAME
.br
* `+NAME`: adds user NAME
.br
* `+NAME:I1=V1[,I2=V2]`: sets info I1 with value V1 to user NAME. The info name password resets password without prompt.
.br
* `-NAME`: removes user NAME
.br
* `_NAME`: force password change of user NAME
.br
* `@NAME`: show information of group NAME
.br
* `@+NAME[:u1[,u2]]`: adds group NAME if not existing and adds specified users to group
.br
* `@-NAME:u1[,u2]`: removes specified users from group NAME
.br
* `@-NAME`: removes group NAME
.br
.br
By default all added users are members of the group users.
.br
Passwords are not stored, only a SHA256 hash is stored.
.br
.br
Servers using authentication rules can use a configuration file instead of a directory name.
.br
This configuration file is organized in sections, each section name describing a directory.
.br
Example
.br
[somedir]
.br
ru=foo
.br
rg=bar
.br
.br
.br
The following keys are defined per directory, but may be ignored by the server depending on its operation mode:
.br
* ru: comma-separated list of user names with read access to the directory
.br
* rg: comma-separated list of group names with read access to the directory
.br
* wu: comma-separated list of user names with write access to the directory
.br
* wg: comma-separated list of group names with write access to the directory
.br
* mcast: comma-separated list of user names with multicast creation rights (RTSP server only)
.br
* filters: comma-separated list of filter names for which the directory is valid. If not found or all, applies to all filters
.br
.br
Rights can be configured on sub-directories by adding sections for the desired directories.
.br
Example
.br
[d1]
.br
rg=bar
.br
[d1/d2]
.br
ru=foo
.br
.br
With this configuration:
.br
- the directory d1 will be readable by all members of group bar
.br
- the directory d1/d2 will be readable by user foo only
.br
.br
Servers in GPAC currently only support the Basic HTTP authentication scheme, and should preferably be run over TLS.
.br
.SH Configuration file
.LP
.br
GPAC uses a configuration file to modify default options of libgpac and filters. This file is called GPAC.cfg and is located:
.br
- on Windows platforms, in C:\Users\FOO\AppData\Roaming\GPAC or in C:\Program Files\GPAC.
.br
- on iOS platforms, in a .gpac folder in the app storage directory.
.br
- on Android platforms, in /sdcard/GPAC/ if this directory exists, otherwise in /data/data/io.gpac.gpac/GPAC.
.br
- on other platforms, in a $HOME/.gpac/.
.br
.br
Applications in GPAC can also specify a different configuration file through the .I -p profile option. EX gpac -p=foo []
.br
This will load configuration from $HOME/.gpac/foo/GPAC.cfg, creating it if needed.
.br
The reserved name 0 is used to disable configuration file writing.
.br
.br
The configuration file is structured in sections, each made of one or more keys:
.br
- section foo is declared as [foo]\n
.br
- key bar with value N is declared as bar=N\n. The key value N is not interpreted and always handled as ASCII text.
.br
.br
By default the configuration file only holds a few system specific options and directories. It is possible to serialize the entire set of options to the configuration file, using .I -wc .I -wf.
.br
This should be avoided as the resulting configuration file size will be quite large, hence larger memory usage for the applications.
.br
The options specified in the configuration file may be overridden by the values in restrict.cfg file located in GPAC share system directory (e.g. /usr/share/gpac or C:\Program Files\GPAC), if present; this allows enforcing system-wide configuration values.
.br
Note: The methods describe in this section apply to any application in GPAC transferring their arguments to libgpac. This is the case for gpac and MP4Box.
.br
.br
.SH Core options
.LP
.br
The options from libgpac core can also be assigned though the config file from section core using option name without initial dash as key name.
.br
Example
.br
[core]
.br
threads=2
.br
.br
Setting this in the config file is equivalent to using -threads=2.
.br
The options specified at prompt overrides the value of the config file.
.br
.SH Filter options in configuration
.LP
.br
It is possible to alter the default value of a filter option by modifying the configuration file. Filter foo options are stored in section [filter@foo], using option name and value as key-value pair. Options specified through the configuration file do not take precedence over options specified at prompt or through alias.
.br
Example
.br
[filter@rtpin]
.br
interleave=yes
.br
.br
This will force the rtp input filter to always request RTP over RTSP by default.
.br
To generate a configuration file with all filters options serialized, use .I -wf.
.br
.SH Global filter options
.LP
.br
It is possible to specify options global to multiple filters using --OPTNAME=VAL. Global options do not override filter options but take precedence over options loaded from configuration file.
.br
This will set option OPTNAME, when present, to VAL in any loaded filter.
.br
Example
.br
--buffer=100 -i file vout aout
.br
.br
This is equivalent to specifying vout:buffer=100 aout:buffer=100.
.br
Example
.br
--buffer=100 -i file vout aout:buffer=10
.br
.br
This is equivalent to specifying vout:buffer=100 aout:buffer=10.
.br
Warning: This syntax only applies to regular filter options. It cannot be used with builtin shortcuts (gfreg, enc, ...).
.br
Meta-filter options can be set in the same way using the syntax --OPT_NAME=VAL.
.br
Example
.br
--profile=Baseline -i file.cmp -o dump.264
.br
.br
This is equivalent to specifying -o dump.264:profile=Baseline.
.br
.br
For both syntaxes, it is possible to specify the filter registry name of the option, using --FNAME:OPTNAME=VAL or --FNAME@OPTNAME=VAL.
.br
In this case the option will only be set for filters which are instances of registry FNAME. This is used when several registries use same option names.
.br
Example
.br
--flist@timescale=100 -i plist1 -i plist2 -o live.mpd
.br
.br
This will set the timescale option on the playlists filters but not on the dasher filter.
.br
.SH libgpac core options:
.LP
.br
.TP
.B \-noprog
.br
disable progress messages
.br
.TP
.B \-quiet
.br
disable all messages, including errors
.br
.TP
.B \-proglf
.br
use new line at each progress messages
.br
.TP
.B \-strict-error,-se
.br
exit after the first error is reported
.br
.TP
.B \-store-dir (string)
.br
set storage directory
.br
.TP
.B \-mod-dirs (string list)
.br
set additional module directories as a semi-colon ; separated list
.br
.TP
.B \-js-dirs (string list)
.br
set javascript directories
.br
.TP
.B \-no-js-mods (string list)
.br
disable javascript module loading
.br
.TP
.B \-ifce (string)
.br
set default multicast interface (default is ANY), either an IP address or a device name as listed by gpac -h net. Prefix '+' will force using IPv6 for dual interface
.br
.TP
.B \-lang (string)
.br
set preferred language
.br
.TP
.B \-cfg,-opt (string)
.br
get or set configuration file value. The string parameter can be formatted as:
.br
* `section:key=val`: set the key to a new value
.br
* `section:key=null`, `section:key`: remove the key
.br
* `section=null`: remove the section
.br
* no argument: print the entire configuration file
.br
* `section`: print the given section
.br
* `section:key`: print the given key in section (section can be set to *)- *:key: print the given key in all sections
.br
.TP
.B \-no-save
.br
discard any changes made to the config file upon exit
.br
.TP
.B \-mod-reload
.br
unload / reload module shared libs when no longer used
.br
.TP
.B \-for-test
.br
disable all creation/modification dates and GPAC versions in files
.br
.TP
.B \-old-arch
.br
enable compatibility with pre-filters versions of GPAC
.br
.TP
.B \-ntp-shift (int)
.br
shift NTP clock by given amount in seconds
.br
.TP
.B \-bs-cache-size (int, default: 512)
.br
cache size for bitstream read and write from file (0 disable cache, slower IOs)
.br
.TP
.B \-no-check
.br
disable compliance tests for inputs (ISOBMFF for now). This will likely result in random crashes
.br
.TP
.B \-unhandled-rejection
.br
dump unhandled promise rejections
.br
.TP
.B \-startup-file (string)
.br
startup file of compositor in GUI mode
.br
.TP
.B \-docs-dir (string)
.br
default documents directory (for GUI on iOS and Android)
.br
.TP
.B \-last-dir (string)
.br
last working directory (for GUI)
.br
.TP
.B \-no-poll
.br
disable poll and use select for socket groups
.br
.TP
.B \-no-tls-rcfg
.br
disable automatic TCP to TLS reconfiguration
.br
.TP
.B \-no-fd
.br
use buffered IO instead of file descriptor for read/write - this can speed up operations on small files
.br
.TP
.B \-no-mx
.br
disable all mutexes, threads and semaphores (do not use if unsure about threading used)
.br
.TP
.B \-netcap (string)
.br
set packet capture and filtering rules formatted as [CFG][RULES]. Each -netcap argument will define a configuration
.br
[CFG] is an optional comma-separated list of:
.br
* id=ID: ID (string) for this configuration. If NULL, configuration will apply to all sockets not specifying a netcap ID
.br
* src=F: read packets from F, as produced by GPAC or a pcap or pcapng file
.br
* dst=F: output packets to F (GPAC or pcap/pcapng file), cannot be set if src is set
.br
* loop[=N]: loop capture file N times, or forever if N is not set or negative
.br
* nrt: disable real-time playback
.br
[RULES] is an optional list of [OPT,OPT2...] with OPT in:
.br
* m=N: set rule mode - N can be r for reception only (default), w for send only or rw for both
.br
* s=N: set packet start range to N
.br
* e=N: set packet end range to N (only used for r and f rules)
.br
* n=N: set number of packets to drop to N - not set, 0 or 1 means single packet
.br
* r=N: random drop one packet every N
.br
* f=N: drop first packet every N
.br
* p=P: local port number to filter, if not set the rule applies to all packets
.br
* o=N: patch packet instead of droping (always true for TCP), replacing byte at offset N (0 is first byte, <0 for random)
.br
* v=N: set patch byte value to N (hexa) or negative value for random (default)
.br
.br
Example
.br
-netcap=dst=dump.gpc
.br
.br
This will record packets to dump.gpc
.br
.br
Example
.br
-netcap=src=dump.gpc,id=NC1 -i session1.sdp:NCID=NC1 -i session2.sdp
.br
.br
This will read packets from dump.gpc only for session1.sdp and let session2.sdp use regular sockets
.br
.br
Example
.br
-netcap=[p=1234,s=100,n=20][r=200,s=500,o=10,v=FE]
.br
.br
This will use regular network interface and drop packets 100 to 119 on port 1234 and patch one random packet every 200 starting from packet 500, setting byte 10 to FE
.br
.TP
.B \-cache (string)
.br
cache directory location
.br
.TP
.B \-proxy-on
.br
enable HTTP proxy
.br
.TP
.B \-proxy-name (string)
.br
set HTTP proxy address
.br
.TP
.B \-proxy-port (int, default: 80)
.br
set HTTP proxy port
.br
.TP
.B \-maxrate (int)
.br
set max HTTP download rate in bits per sec. 0 means unlimited
.br
.TP
.B \-no-cache
.br
disable HTTP caching
.br
.TP
.B \-offline-cache
.br
enable offline HTTP caching (no re-validation of existing resource in cache)
.br
.TP
.B \-clean-cache
.br
indicate if HTTP cache should be clean upon launch/exit
.br
.TP
.B \-cache-size (int, default: 100M)
.br
specify cache size in bytes
.br
.TP
.B \-tcp-timeout (int, default: 5000)
.br
time in milliseconds to wait for HTTP/RTSP connect before error
.br
.TP
.B \-req-timeout (int, default: 10000)