QSVEncC (x64) 2.51 (r1105) by rigaya, Jun 12 2016 21:42:18 (VC 1900/Win/avx2)
 reader: raw, avi, avs, vpy, avqsv [H.264/AVC, HEVC, MPEG2, VC-1, VP8, VP9]
Usage: QSVEncC64 [Options] -i <filename> -o <filename>

When video codec could be decoded by QSV, any format or protocol supported
by ffmpeg library could be used as a input.
Also,  input can be avi, avs, vpy, raw YUV or YUV4MPEG2(y4m) format.
when raw(default), fps, input-res are also necessary.

output format will be automatically set by the output extension.
when output filename is set to "-", H.264/AVC ES output is thrown to stdout.

Example:
  QSVEncC -i "<avsfilename>" -o "<outfilename>"
  avs2pipemod -y4mp "<avsfile>" | QSVEncC --y4m -i - -o "<outfilename>"

Example for Benchmark:
  QSVEncC -i "<avsfilename>" --benchmark "<benchmark_result.txt>"

Information Options: 
-h,-? --help                    show help
-v,--version                    show version info
   --check-hw                   check if QuickSyncVideo is available
   --check-lib                  check lib API version installed
   --check-features [<string>]  check encode/vpp features
                                 with no option value, result will on stdout,
                                 otherwise, it is written to file path set
                                 and opened by default application.
                                 when writing to file, txt/html/csv format
                                 is available, chosen by the extension
                                 of the output file.
   --check-features-html [<string>]
                                check encode/vpp features and write html report to
                                 specified path. With no value, "qsv_check.html"
                                 will be created to current directory.
   --check-environment          check environment info
   --check-avversion            show dll version
   --check-codecs               show codecs available
   --check-encoders             show audio encoders available
   --check-decoders             show audio decoders available
   --check-formats              show in/out formats available
   --check-protocols            show in/out protocols available
   --check-filters              show filters available


Basic Encoding Options: 
-c,--codec <string>             set encode codec
                                 - h264(default), hevc, mpeg2
-i,--input-file <filename>      set input file name
-o,--output-file <filename>     set ouput file name
                                 for extension mp4/mkv/mov,
                                 avcodec muxer will be used.

 Input formats (will be estimated from extension if not set.)
   --raw                        set input as raw format
   --y4m                        set input as y4m format
   --avi                        set input as avi format
   --avs                        set input as avs format
   --vpy                        set input as vpy format
   --vpy-mt                     set input as vpy format in multi-thread
   --avqsv                      set input to use avcodec + qsv
   --avqsv-analyze <int>        set time (sec) which reader analyze input file.
                                 default: 5 (seconds).
                                 could be only used with avqsv reader.
                                 use if reader fails to detect audio stream.
   --video-track <int>          set video track to encode in track id
                                 1 (default)  highest resolution video track
                                 2            next high resolution video track
                                   ... 
                                 -1           lowest resolution video track
                                 -2           next low resolution video track
                                   ... 
   --video-streamid <int>       set video track to encode in stream id
   --audio-source <string>      input extra audio file
   --audio-file [<int>?][<string>:]<string>
                                extract audio into file.
                                 could be only used with avqsv reader.
                                 below are optional,
                                  in [<int>?], specify track number to extract.
                                  in [<string>?], specify output format.
   --trim <int>:<int>[,<int>:<int>]...
                                trim video for the frame range specified.
                                 frame range should not overwrap each other.
   --seek [<int>:][<int>:]<int>[.<int>] (hh:mm:ss.ms)
                                skip video for the time specified,
                                 seek will be inaccurate but fast.
-f,--format <string>            set output format of output file.
                                 if format is not specified, output format will
                                 be guessed from output file extension.
                                 set "raw" for H.264/ES output.
   --audio-copy [<int>[,...]]   mux audio with video during output.
                                 could be only used with
                                 avqsv reader and avcodec muxer.
                                 by default copies all audio tracks.
                                 "--audio-copy 1,2" will extract
                                 audio track #1 and #2.
   --audio-codec [<int>?]<string>
                                encode audio to specified format.
                                  in [<int>?], specify track number to encode.
   --audio-bitrate [<int>?]<int>
                                set encode bitrate for audio (kbps).
                                  in [<int>?], specify track number of audio.
   --audio-ignore-decode-error <int>  (default: 10)
                                set numbers of continuous packets of audio
                                 decode error to ignore, replaced by silence.
   --audio-ignore-notrack-error ignore error when audio track is unfound.
   --audio-samplerate [<int>?]<int>
                                set sampling rate for audio (Hz).
                                  in [<int>?], specify track number of audio.
   --audio-resampler <string>   set audio resampler.
                                  swr (swresampler: default), soxr (libsoxr)
   --audio-stream [<int>?][<string1>][:<string2>][,[<string1>][:<string2>]][..
       set audio streams in channels.
         in [<int>?], specify track number to split.
         in <string1>, set input channels to use from source stream.
           if unset, all input channels will be used.
         in <string2>, set output channels to mix.
           if unset, all input channels will be copied without mixing.
       example1: --audio-stream FL,FR
         splitting dual mono audio to each stream.
       example2: --audio-stream :stereo
         mixing input channels to stereo.
       example3: --audio-stream 5.1,5.1:stereo
         keeping 5.1ch audio and also adding downmixed stereo stream.
       usable simbols
         mono       = FC
         stereo     = FL + FR
         2.1        = FL + FR + LFE
         3.0        = FL + FR + FC
         3.0(back)  = FL + FR + BC
         3.1        = FL + FR + FC + LFE
         4.0        = FL + FR + FC + BC
         quad       = FL + FR + BL + BR
         quad(side) = FL + FR + SL + SR
         5.0        = FL + FR + FC + SL + SR
         5.1        = FL + FR + FC + LFE + SL + SR
         6.0        = FL + FR + FC + BC + SL + SR
         6.0(front) = FL + FR + FLC + FRC + SL + SR
         hexagonal  = FL + FR + FC + BL + BR + BC
         6.1        = FL + FR + FC + LFE + BC + SL + SR
         6.1(front) = FL + FR + LFE + FLC + FRC + SL + SR
         7.0        = FL + FR + FC + BL + BR + SL + SR
         7.0(front) = FL + FR + FC + FLC + FRC + SL + SR
         7.1        = FL + FR + FC + LFE + BL + BR + SL + SR
         7.1(wide)  = FL + FR + FC + LFE + FLC + FRC + SL + SR
   --audio-filter [<int>?]<string>
                                set audio filter.
                                  in [<int>?], specify track number of audio.
   --chapter-copy               copy chapter to output file.
   --chapter <string>           set chapter from file specified.
   --sub-copy [<int>[,...]]     copy subtitle to output file.
                                 these could be only used with
                                 avqsv reader and avcodec muxer.
                                 below are optional,
                                  in [<int>?], specify track number to copy.

   --avsync <string>            method for AV sync (default: through)
                                 through  ... assume cfr, no check but fast
                                 forcecfr ... check timestamp and force cfr.
-m,--mux-option <string1>:<string2>
                                set muxer option name and value.
                                 these could be only used with
                                 avqsv reader and avcodec muxer.

   --nv12                       set raw input as NV12 color format,
                                if not specified YV12 is expected
   --tff                        set as interlaced, top field first
   --bff                        set as interlaced, bottom field first
   --fps <int>/<int> or <float> video frame rate (frames per second)

   --input-res <int>x<int>      input resolution
   --output-res <int>x<int>     output resolution
                                if different from input, uses vpp resizing
                                if not set, output resolution will be same
                                as input (no resize will be done).
   --fixed-func                 use fixed func instead of GPU EU (default:off)

Frame buffer Options:
 frame buffers are selected automatically by default.
 d3d9 memory is faster than d3d11, so d3d9 frames are used whenever possible,
 except decode/vpp only mode (= no encoding mode, system frames are used).
 On particular cases, sush as runnning on a system with dGPU, or running
 vpp-rotate, will require the uses of d3d11 surface.
 Options below will change this default behavior.

   --disable-d3d                disable using d3d surfaces
   --d3d                        use d3d9/d3d11 surfaces
   --d3d9                       use d3d9 surfaces
   --d3d11                      use d3d11 surfaces

Encode Mode Options:
 EncMode default: --cqp
   --cqp <int> or               encode in Constant QP, default 24:26:27
         <int>:<int>:<int>      set qp value for i:p:b frame
   --vqp <int> or               encode in Variable QP, default 24:26:27
         <int>:<int>:<int>      set qp value for i:p:b frame
   --la <int>                   set bitrate in Lookahead mode (kbps)
   --la-hrd <int>               set bitrate in HRD-Lookahead mode (kbps)
   --icq <int>                  encode in Intelligent Const. Quality mode
                                  default value: 23
   --la-icq <int>               encode in ICQ mode with Lookahead
                                  default value: 23
   --cbr <int>                  set bitrate in CBR mode (kbps)
   --vbr <int>                  set bitrate in VBR mode (kbps)
   --avbr <int>                 set bitrate in AVBR mode (kbps)
                                 AVBR mode is only supported with API v1.3
   --avbr-unitsize <int>        avbr calculation period in x100 frames
                                 default 90 (= unit size 9000 frames)
   --qvbr <int>                 set bitrate in Quality VBR mode.
                                 requires --qvbr-q option to be set as well
   --qvbr-q <int>  or           set quality used in qvbr mode. default: 23
   --qvbr-quality <int>          QVBR mode is only supported with API v1.11
   --vcm <int>                  set bitrate in VCM mode (kbps)

Other Encode Options:
   --fallback-rc                enable fallback of ratecontrol mode, when
                                 platform does not support new ratecontrol modes.
-a,--async-depth                set async depth for QSV pipeline. (0-64)
                                 default: 0 (=auto, 4+2*(extra pipeline step))
   --max-bitrate <int>          set max bitrate(kbps)
   --qp-min <int> or            set min QP, default 0 (= unset)
           <int>:<int>:<int>
   --qp-max <int> or            set max QP, default 0 (= unset)
           <int>:<int>:<int>
   --qp-offset <int>[:<int>][:<int>]...
                                set qp offset of each pyramid reference layers.
                                 default 0 (= unset).
-u,--quality <string>           encode quality
                                  - best, higher, high, balanced(default)
                                    fast, faster, fastest
   --la-depth <int>             set Lookahead Depth, 10-100
   --la-window-size <int>       enables Lookahead Windowed Rate Control mode,
                                  and set the window size in frames.
   --la-quality <string>        set lookahead quality.
                                 - auto(default), fast, medium, slow
   --(no-)mbbrc                 enables per macro block rate control
                                 default: auto
   --(no-)extbrc                enables extended rate control
                                 default: auto
   --ref <int>                  reference frames
                                  default 0 (auto)
-b,--bframes <int>              number of sequential b frames
                                  default 3(HEVC) / 3(others)
   --(no-)b-pyramid             enables B-frame pyramid reference (default:off)
   --(no-)direct-bias-adjust    lower usage of B frame Direct/Skip type
   --gop-len <int>              (max) gop length, default 0 (auto)
                                  when auto, fps x 10 will be set.
   --(no-)scenechange           enables scene change detection
   --(no-)open-gop              enables open gop (default:off)
   --strict-gop                 force gop structure
   --(no-)i-adapt               enables adaptive I frame insert (default:off)
   --(no-)b-adapt               enables adaptive B frame insert (default:off)
   --(no-)weightp               enable weight prediction for P frame
   --(no-)weightb               enable weight prediction for B frame
   --(no-)fade-detect           enable fade detection
   --trellis <string>           set trellis mode used in encoding
                                 - auto(default), off, i, ip, all
   --mv-scaling                 set mv cost scaling
                                 - 0  set MV cost to be 0
                                 - 1  set MV cost 1/2 of default
                                 - 2  set MV cost 1/4 of default
                                 - 3  set MV cost 1/8 of default
   --slices <int>               number of slices, default 0 (auto)
   --no-deblock                 disables H.264 deblock feature
   --sharpness <int>            [vp8] set sharpness level for vp8 enc

   --level <string>             set codec level
                                - H.264: auto(default), 1, 1b, 1.1, 1.2, 1.3
                                         2, 2.1, 2.2, 3, 3.1, 3.2, 4, 4.1, 4.2
                                         5, 5.1, 5.2
                                - HEVC:  auto(default), 1, 2, 2.1, 3, 3.1, 4
                                         4.1, 5, 5.1, 5.2, 6, 6.1, 6.2
                                - MPEG2: auto(default), low, main, high
                                         high1440
   --profile <string>           set codec profile
                                - H.264: auto(default), Baseline, Main, High
                                - HEVC:  auto(default), main
                                - MPEG2: auto(default), Simple, Main, High

   --sar <int>:<int>            set Sample Aspect Ratio
   --dar <int>:<int>            set Display Aspect Ratio
   --bluray                     for H.264 bluray encoding

   --crop <int>,<int>,<int>,<int>
                                set crop pixels of left, up, right, bottom.

   --fullrange                  set stream as fullrange yuv
   --videoformat <string>       undef, ntsc, component, pal, secam, mac
                                 default: undef
   --colormatrix <string>       undef, auto, bt709, smpte170m, bt470bg
                                smpte240m, YCgCo, fcc, GBR
                                 default: undef
   --colorprim <string>         undef, auto, bt709, smpte170m, bt470m
                                bt470bg, smpte240m, film
                                 default: undef
   --transfer <string>          undef, auto, bt709, smpte170m, bt470m
                                bt470bg, smpte240m, linear, log100, log316
                                 default: undef

   --input-buf <int>            buffer size for input in frames (1-16)
                                 default   hw: 3,  sw: 1
                                 cannot be used with avqsv reader.
   --output-buf <int>           buffer size for output in MByte
                                 default 8 MB (0-128)
   --input-thread <int>        set input thread num
                                  0: disable (slow, but less cpu usage)
                                  1: use one thread
   --output-thread <int>        set output thread num
                                 -1: auto (= default)
                                  0: disable (slow, but less memory usage)
                                  1: use one thread
   --min-memory                 minimize memory usage of QSVEncC.
                                 same as --output-thread 0 --audio-thread 0
                                         -a 1 --input-buf 1 --output-buf 0
                                 this will cause lower performance!
   --max-procfps <int>         limit processing speed to lower resource usage.
                                 default:0 (no limit)
   --log <string>               output log to file (txt or html).
   --log-level <string>         set output log level
                                 info(default), warn, error, debug
   --log-framelist <string>     output frame info for avqsv reader (for debug)

   --benchmark <string>         run in benchmark mode
                                 and write result in txt file
   --bench-quality "all" or <int>[,<int>][,<int>]...
                                 default: 1,4,7
                                list of target quality to check on benchmark
   --perf-monitor [<string>][,<string>]...
       check performance info of QSVEncC and output to log file
       select counter from below, default = all
   --perf-monitor-plot [<string>][,<string>]...
       plot perf monitor realtime (required python, pyqtgraph)
       select counter from below, default = cpu,bitrate
                                 
     counters for perf-monitor, perf-monitor-plot
                                 all          ... monitor all info
                                 cpu_total    ... cpu total usage (%)
                                 cpu_kernel   ... cpu kernel usage (%)
                                 cpu_main     ... cpu main thread usage (%)
                                 cpu_enc      ... cpu encode thread usage (%)
                                 cpu_in       ... cpu input thread usage (%)
                                 cpu_out      ... cpu output thread usage (%)
                                 cpu_aud_proc ... cpu aud proc thread usage (%)
                                 cpu_aud_enc  ... cpu aud enc thread usage (%)
                                 cpu          ... monitor all cpu info
                                 gpu_load    ... gpu usage (%)
                                 gpu_clock   ... gpu avg clock (%)
                                 gpu         ... monitor all gpu info
                                 queue       ... queue usage
                                 mem_private ... private memory (MB)
                                 mem_virtual ... virtual memory (MB)
                                 mem         ... monitor all memory info
                                 io_read     ... io read  (MB/s)
                                 io_write    ... io write (MB/s)
                                 io          ... monitor all io info
                                 fps         ... encode speed (fps)
                                 fps_avg     ... encode avg. speed (fps)
                                 bitrate     ... encode bitrate (kbps)
                                 bitrate_avg ... encode avg. bitrate (kbps)
                                 frame_out   ... written_frames
                                 
   --python <string>            set python path for --perf-monitor-plot
                                 default: python
   --perf-monitor-interval <int> set perf monitor check interval (millisec)
                                 default 250, must be 50 or more
   --(no-)timer-period-tuning   enable(disable) timer period tuning
                                  default: enabled

VPP Options:
   --vpp-denoise <int>          use vpp denoise, set strength (0-100)
   --vpp-detail-enhance <int>   use vpp detail enahancer, set strength (0-100)
   --vpp-deinterlace <string>   set vpp deinterlace mode
                                enabled only when set --tff or --bff
                                 - none     disable deinterlace
                                 - normal   normal deinterlace
                                 - it       inverse telecine
                                 - bob      double framerate
   --vpp-image-stab <string>    set image stabilizer mode
                                 - none, upscale, box
   --vpp-sub [<int>] or [<string>]
                                burn in subtitle into frame
                                set sub track number in input file by integer
                                or set external sub file path by string.
   --vpp-sub-charset [<string>] set subtitle char set
   --vpp-sub-shaping <string>   simple(default), complex
   --vpp-delogo <string>        set delogo file path
   --vpp-delogo-select <string> set target logo name or auto select file
                                 or logo index starting from 1.
   --vpp-delogo-pos <int>:<int> set delogo pos offset
   --vpp-delogo-depth <int>     set delogo depth [default:128]
   --vpp-delogo-y  <int>        set delogo y  param
   --vpp-delogo-cb <int>        set delogo cb param
   --vpp-delogo-cr <int>        set delogo cr param
   --vpp-rotate <int>           rotate image
                                 90, 180, 270.
   --vpp-mirror <string>        mirror image
                                 - h   mirror in horizontal direction
                                 - v   mirror in vertical   direction
   --vpp-scaling <string>       set scaling quality                                 - auto(default)                                 - simple   use simple scaling
                                 - fine     use high quality scaling
   --vpp-half-turn              half turn video image
                                 unoptimized and very slow.

