#
# Argument configuration file for FFmpeg
#
# All arguments defined here will be displayed at WebUI to manage them
# and configured values will be passed to executable later on
# Arguments will be passed as given order below
#
# Following rules may apply on every line
# lines starting with # will be ignored
# lines starting with // threated as section title
#
# Switches starting with @ will be threated as file
#  example: @-filename (Picture {;Disabled|__file__;Enabled})
# Switches starting with ~ will be threated as bool
#  example: ~-bool_switch (Enable Switch)
# Switches starting with ^ will be threated as environment variable
# and will be transferred to start script with is exact name and value
#
# Final use of special switches are;
# __pass__ is just an indicator that the given option will be passed as it is
# __input__ and __output__ special switches are for placeholders to implement in start script (mod_run.sh)
# __file__ will be used together with @ and it will be replaced with the filename which contains user configured data.
#
# use [[ ]] (( )) {{ }} || ;; "" instead of [ ] ( ) { } | ; " while defining arguments
# do not use single quote '
#

$$ structured

#####
// Hardware
#####
^gpunode	(Acceleration Node {__gpu_loop__|;Off})

#####
// Video Decoder
#####
^icvid	(Codec {_guess_;Auto|h264;H.264/MPEG-4|hevc;H.265/HEVC|av1;AV1|mpeg2;MPEG-2|mpeg4;MPEG-4 part 2|vp8;VP8|vp9;VP9|vc1;VC1|mjpeg;Motion JPEG|;No Video})
~^hdec	(Accelerate)
^iccsp	(>Colorspace {;Auto|bt470;SDTV, PAL ((BT.470BG or BT.601-6 625))|bt470m;SDTV, NTSC 1953 ((BT.470M or BT.470-6 System M))|smpte170m;SDTV, NTSC ((SMPTE-C, SMPTE-170M or BT.601-6 525))|smpte240m;HDTV ((SMPTE 240M))|bt709;High-Definition ((BT.709))|bt2020;Ultra-High-Definition ((BT.2020))})


#####
// Video Encoder
#####
~^henc	(Accelerate)
^icdin	(>Deinterlacing Mode [Advanced] {;|bob;Bob|advanced;Advanced})

$$ tab,Profile,6,numprof
~^profen	(<br>Enable)

^ocvid	(Codec {copy;Use Original Encoding|h264;H.264/MPEG-4|hevc;H.265/HEVC|av1;AV1|mpeg2;MPEG-2|;No Video})
^ocvtr	(>Track {_zero_;First|1;Second|2;Third|3;Fourth})
^ocvpr	(>Profile {;|baseline;H.264 Baseline|main;Main*|high;H.264/H.265 High|main10;H.265 Main 10|rext;H.265 Range Extension|simple;MPEG-2 Simple})
^ocvps	(>>Preset [LLHQ] {_label_;_sep_|_label_;Live Transcoding|veryfast;High Performance*|faster;High Quality|_label_;_sep_|_label_;Latency Tolerant HQ Transcoding|fast;High Performance Single Pass|medium;High Quality Single Pass|slow;High Quality 2 Passes|slower;Lossless High Performance|veryslow;Lossless})
^ocscl	(>Scale {;Same as Input|_label_;_sep_|_label_;SDTV|sdt704x480;704x480, 4SIF 525|sdt720x480;720x480, D-1 NTSC|sdt704x576;704x576, 4SIF 625|sdt720x576;720x576, D-1 PAL|_label_;_sep_|_label_;HDTV|hdt960x720;960x720, 4:3, 2K|hdt1280x720;1280x720, 16:9, HD-1, 2K|hdt1440x1080;1440x1080, 4:3, 2K|hdt1920x1080;1920x1080, 16:9, HD-2, FHD, 2K|_label_;_sep_|_label_;HDTV+|hdp960x540;960x540, 16:9, qHD, 1K|hdp1600x900;1600x900, 16:9, HD+, 1K+|hdp2560x1440;2560x1440, 16:9, 2K+|hdp3200x1800;3200x1800, 16:9, 3K+|_label_;_sep_|_label_;UHDTV|uhd2880x2160;2880x2160, 4:3, 4K|uhd3840x2160;3840x2160, 16:9, UHD-1, 4K|uhd7680x4320;7680x4320, 16:9, UHD-2, 8K|_label_;_sep_|_label_;HLS Compatible|hls416x234;416x234, 16:9, H.264|hls640x360;640x360, 16:9, H.264, HEVC|hls768x432;768x432, 16:9, H.264, HEVC|hls960x540;960x540, 16:9, qHD, 1K, H.264, HEVC|hls1280x720;1280x720, 16:9, HD-1, 2K, H.264, HEVC|hls1920x1080;1920x1080, 16:9, HD-2, FHD, 2K, H.264, HEVC|hls2560x1440;2560x1440, 16:9, 2K, HEVC|hls3840x2160;3840x2160, 16:9, UHD-1, 4K, HEVC|_label_;_sep_|_label_;Mobile/Web|mob240x160;240x160|mob256x144;256x144, 16:9|mob320x240;320x240, 4:3|mob426x240;426x240, ~16:9|mob480x320;480x320|mob480x270;480x270, 16:9|mob640x360;640x360, 16:9|mob854x480;854x480, ~16:9|mob1024x576;1024x576, 16:9})
^ocsca	(>>Interpolation [Default] {low_power;Default|low_power;Low Power|hq;High Quality})
^occsp	(>Colorspace {;Same as Input|bt470;Standard-Definition ((BT.470))|bt709;High-Definition ((BT.709))|bt2020;Ultra-High-Definition ((BT.2020))})
^ocpix	(>Format [Default] {;Default|yuv420p;yuv420p|yuv420p10le;yuv420p10le|yuv420p16le;yuv420p16le|yuv422p;yuv422p|yuv422p10le;yuv422p10le|yuv422p16le;yuv422p16le|yuv440p;yuv440p|yuv444p;yuv444p|yuv444p10be;yuv444p10be|yuv444p16le;yuv444p16le|nv12;nv12|nv21;nv21|nv16;nv16|nv20le;nv20le|nv24;nv24})
^ocvas	(>Aspect Ratio {;Original|4:3|16:9})
^ocvfr	(>Frame Rate {;Auto|source_fps;Same as Input|film;Film ((24 FPS))|pal;PAL ((25 FPS))|ntsc;NTSC ((30000/1001))|30;30|50;50|60;60|120;120})
^ocfps	(>>FPS Mode {;Auto|passthrough;Passthrough|cfr;CFR ((dup/drop))|vfr;VFR ((pass/drop))|drop;Regenerate})
^ocgop	(>GOP)
^ocvbc	(>Bitrate Control {vbr;VBR|cbr;CBR})
^ocvbr	(>Target Bitrate [Kbps])
# ^ocvbm	(Maximum Bitrate [Kbps])
^ocstem	(Subtitle Overlay {;Off|((W-w))/2:H-h-10;Bottom|((W-w))/2:10;Top|10:H-h-10;Bottom-Left|W-w:H-h-10;Bottom-Right|10:10;Top-Left|W-w:10;Top-Right|custom;Custom})
^ocstps	(>Custom Position)
^ocsttr (>Subtitle Track {_zero_;First|1;Second|2;Third|3;Fourth|4;Fifth|5;Sixth|6;Seventh|7;Eighth|8;Ninth|9;Tenth|10;Eleventh|11;Twelfth})
^ocvad	(Advanced)

$$ endtab

#####
// Audio Decoder
#####
^icaud	(Codec {;Auto|aac;AAC ((Advanced Audio Coding))|mp1;MP1 ((MPEG audio layer 1))|mp2;MP2 ((MPEG audio layer 2))|mp3;MP3 ((MPEG audio layer 3))|ac3;ATSC A/52A ((AC-3))|eac3;ATSC A/52B ((AC-3, E-AC-3))})

#####
// Audio Encoder
#####

$$ tab,Profile,6,audprof
~^profan	(<br>Enable)

^ocaid	(Codec {copy;Use Original Encoding|aac;AAC, Advanced Audio Coding|ac3;AC-3, Digital Audio Compression|libmp3lame;MP3, MPEG Audio Layer III|mp2;MP2, MPEG Audio Layer II|pcm_s16le;PCM s16le|;No Audio})
^ocatr	(>Track {all;All|_zero_;First|1;Second|2;Third|3;Fourth|4;Fifth|5;Sixth|6;Seventh|7;Eighth|8;Ninth|9;Tenth|10;Eleventh|11;Twelfth})
^ocasr	(>Sampling Rate [44.1 KHz] {;|16000;16 KHz|22050;22 KHz|24000;24 KHz|32000;32 KHz|44100;44.1 KHz*|48000;48 KHz})
^ocnch	(>Channels {;All|1;1|2;2|6;6|7;7|8;8})
^ocnlo	(>>Upmix [FL,FR,FC,LFE,BL,BR])
^ocabr	(>Bitrate [192kb/s] {;|64k;64kb/s|128k;128kb/s|192k;192kb/s*|256k;256kb/s|384k;384kb/s|400k;400kb/s|640k;640kb/s})
^ocasy	(>Sync to Timestamp {;Default|fill;Filling and Trimming|str;Stretching and Squeezing})
%^ocavl	(>Volume [+%] {mv;-100|mx;200|st;1|dv;0|fl;no})
^ocaad	(Advanced)

$$ endtab

#####
// Subtitle Encoder
#####
^ocstidx	(Codec {copy;Use Original Encoding|;No Subtitle})
^ocsttrx	(>Track {all;All|_zero_;First|1;Second|2;Third|3;Fourth|4;Fifth|5;Sixth|6;Seventh|7;Eighth|8;Ninth|9;Tenth|10;Eleventh|11;Twelfth})

#####
// Video Effects
#####
~^vepict	(Picture)
%^vepcont	(>Contrast [+%] {mv;-100|mx;900|st;2|dv;0|fl;no})
%^vepbrig	(>Brightness [+%] {mv;-100|mx;100|st;1|dv;0|fl;no})
%^vepsatu	(>Saturation [+%] {mv;-100|mx;900|st;2|dv;0|fl;no})
%^vepgamm	(>Hue [+%] {mv;-100|mx;100|st;1|dv;0|fl;no})
^wmarkpos	(Watermark {;|x=0:y=0;Top-Left|x=W-w:y=0;Top-Right|x=0:y=H-h;Bottom-Left|x=W-w:y=H-h;Bottom-Right|x=((main_w-overlay_w))/2:y=((main_h-overlay_h))/2;Center|custom;Custom})
^wmcpos	(>Custom Position [x:y])
@^wmarkfile	(>File)
~^vednoi	(Denoise)
^veflip	(Flip {;|v;Vertically|h;Horizontally|vh;Both})

#####
// Other Options
#####
^policy	(Policy {;Adaptive|rest;Restrictive})
~^natfr	(Real Time Output)
^muxrat	(Transport Bitrate ((CBR)) [bps])
^intmo	(Input Timeout [secs] {;Auto|5;5|10;10|15;15|20;20*|30;30|40;40|50;50|60;60})
^infifo	(Input Buffer Size {;Auto|45000;8MB|89000;16MB|134000;24MB|179000;32MB|268000;48MB})
^autors	(Restart After {;|01:00:00;1 Hour|02:00:00;2 Hours|04:00:00;4 Hours|06:00:00;6 Hours|08:00:00;8 Hours|12:00:00;12 Hours|24:00:00;1 Day|48:00:00;2 Days})
^genadv	(Advanced)

#####
// Health Check
#####
^hcminfps	(Min FPS {0;0|5;5|20;20|24;24|25;25|30;30|50;50|60;60})
^hcminbw	(Min Bitrate {0;0|10kb;10 Kbps|100kb;100 Kbps|200kb;200 Kbps*|400kb;400 Kbps|600kb;600 Kbps|800kb;800 Kbps|1mb;1 Mbps|2mb;2 Mbps|4mb;4 Mbps})
^hcminspd	(Speed {yes;Yes|no;No})
^hcdrops	(Drops {yes;Yes|no;No})

