I am wondering if there could be more options added to NVEnc HEVC settings.
Specifically, disable SAO, psy-RDO, AQ, and I/B-frame controls.
Posts: 10.618
Threads: 57
Joined: May 2017
17.11.2017, 06:58
(This post was last modified: 17.11.2017, 06:59 by Selur.)
'NVEnc HEVC' uses NVEncC which uses the NVIDIA SDK ( https://developer.nvidia.com/nvidia-video-codec-sdk) to access the onboard encoder chip of your NVIDIA card.
Calling 'NVEncC' shows the options NVEncC offers, anything that made sense to me (and is gpu based) of those options is exposed by Hybrid.
So unless both the SDK offer an option to support those things (ask NVIDIA) and rigaya supports them through NVEncC ( https://github.com/rigaya/NVEnc/tree/master/NVEncC) I can't offer those options inside Hybrid.
-> Nothing I can do about it.
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Thanks for the response.
I cannot figure out the conditions for using AQ strength and temporal AQ are, they are disabled for me.
Weighted P frame is not in Hybrid. I noticed the issues in the github, but I think it should be included even without compatibility detection, since there are some who will be able to use it.
Posts: 10.618
Threads: 57
Joined: May 2017
21.11.2017, 21:31
(This post was last modified: 21.11.2017, 21:33 by Selur.)
Hybrid disables options when they are not supported by the graphic card and driver combination (check 'NVEncC --check-features') or when another option is in conflict with them. For me GeForce GTX 980ti for example, I too can't use those options when encoding to H.265, but I can when encoding to H.264.
Here's the output I get from check-features:
List of available features.
Codec: H.264/AVC
Max Bframes 4
RC Modes 63
Field Encoding 1
MonoChrome 0
FMO 0
Quater-Pel MV 1
B Direct Mode 1
CABAC 1
Adaptive Transform 1
Max Temporal Layers 0
Hierarchial P Frames 0
Hierarchial B Frames 0
Max Level 51
Min Level 1
4:4:4 1
Max Width 4096
Max Height 4096
Dynamic Resolution Change 1
Dynamic Bitrate Change 1
Forced constant QP 1
Dynamic RC Mode Change 0
Subframe Readback 1
Constrained Encoding 1
Intra Refresh 1
Custom VBV Bufsize 1
Dynamic Slice Mode 1
Ref Pic Invalidiation 1
PreProcess 0
Async Encoding 1
Max MBs 65536
MAX MB per sec 983040
Lossless 1
SAO 0
Me Only Mode 1
Lookahead 1
AQ (temporal) 1
10bit depth 0
Codec: H.265/HEVC
Max Bframes 0
RC Modes 63
Field Encoding 0
MonoChrome 0
Quater-Pel MV 1
B Direct Mode 0
Max Temporal Layers 0
Hierarchial P Frames 0
Hierarchial B Frames 0
Max Level 62
Min Level 1
4:4:4 0
Max Width 4096
Max Height 4096
Dynamic Resolution Change 1
Dynamic Bitrate Change 1
Forced constant QP 1
Dynamic RC Mode Change 0
Subframe Readback 1
Constrained Encoding 0
Intra Refresh 1
Custom VBV Bufsize 1
Dynamic Slice Mode 1
Ref Pic Invalidiation 1
PreProcess 0
Async Encoding 1
Max MBs 65536
MAX MB per sec 983040
Lossless 0
SAO 0
Me Only Mode 0
Lookahead 1
AQ (temporal) 0
10bit depth 0
+ calling just 'NVEncC' gives me:
NVEncC (x64) 3.06 by rigaya [NVENC API v7.1, CUDA 8.0], Feb 5 2017 21:10:22
reader: raw, avs, vpy, avcuvid [H.264/AVC, H.265/HEVC, MPEG1, MPEG2, VP8, VP9]
Usage: NVEncC.exe [Options] -i <input file> -o <output file>
Input can be avs, raw YUV, YUV4MPEG2(y4m).
When Input is in raw format, fps, input-res is required.
Ouput format will be in raw H.264/AVC or H.265/HEVC ES.
Example:
NVEncC -i "<avsfilename>" -o "<outfilename>"
avs2pipemod -y4mp "<avsfile>" | NVEncC --y4m -i - -o "<outfilename>"
Information Options:
-h,-? --help print help
-v,--version print version info
--check-device show DeviceId for GPUs available on system --check-hw [<int>] check NVEnc codecs for specefied DeviceId
if unset, will check DeviceId #0
--check-features [<int>] check for NVEnc Features for specefied DeviceId
if unset, will check DeviceId #0
--check-environment check for 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:
-d,--device <int> set DeviceId used in NVEnc (default:0)
-i,--input <filename> set input filename
-o,--output <filename> set output filename
Input formats (auto detected from extension of not set)
--raw set input as raw format
--y4m set input as y4m format
--avs set input as avs format
--vpy set input as vpy format
--vpy-mt set input as vpy(mt) format
--avcuvid [<string>] use libavformat + cuvid for input
this enables full hw transcode and resize.
avcuvid mode could be set as a option
- native (default)
- cuda
--avsw set input to use avcodec + sw deocder
--input-analyze <int> set time (sec) which reader analyze input file.
default: 5 (seconds).
could be only used with avcuvid/avsw 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 avcuvid/avsw 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.
--input-format <string> set input format of input file.
this requires use of avcuvid/avsw reader.
-f,--output-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
avcuvid/avsw 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
avcuvid/avsw 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
avcuvid/avsw reader and avcodec muxer.
--input-res <int>x<int> set input resolution
--crop <int>,<int>,<int>,<int> crop pixels from left,top,right,bottom
left crop is unavailable with avcuivid reader
--output-res <int>x<int> set output resolution
--fps <int>/<int> or <float> set framerate
-c,--codec <string> set ouput codec
h264 (or avc), h265 (or hevc)
--profile <string> set codec profile
H.264: baseline, main, high(default), high444
HEVC : main, main10, main444
--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
--output-depth <int> set output bit depth ( 8(default), 10 )
--sar <int>:<int> set SAR ratio
--dar <int>:<int> set DAR ratio
--cqp <int> or encode in Constant QP mode
<int>:<int>:<int> Default: <I>:<P>:<B>=<20>:<23>:<25>
--vbr <int> set bitrate for VBR mode (kbps)
--vbrhq <int> set bitrate for VBR (High Quality) mode (kbps)
--cbr <int> set bitrate for CBR mode (kbps)
--cbrhq <int> set bitrate for CBR (High Quality) mode (kbps)
Default: 7500 kbps
--vbr-quality <int> set target quality for VBR mode (0-51, 0 = auto)
--max-bitrate <int> set Max Bitrate (kbps)
--qp-init <int> or set initial QP
<int>:<int>:<int> Default: auto
--qp-max <int> or set max QP
<int>:<int>:<int> Default: unset
--qp-min <int> or set min QP
<int>:<int>:<int> Default: unset
--lookahead <int> enable lookahead and set lookahead depth (1-32)
Default: 16 frames
--gop-len <int> set GOP Length / Default: 0 frames
--strict-gop avoid GOP len fluctuation
--no-i-apdat disable adapt. I frame insertion on lookahead mode
--no-b-apdat disable adapt. B frame insertion on lookahead mode
Default: off
-b,--bframes <int> set B frames / Default 1457204848 frames
--ref <int> set Ref frames / Default 3 frames
--enable-ltr enable LTR (Long Term Reference pictures)
--aq enable spatial adaptive quantization
--aq-temporal enable temporal adaptive quantization (FOR H.264 ONLY)
--aq-strength <int> set aq strength (weak 1 - 15 strong)
FOR H.264 ONLY, Default: auto(= 0)
--mv-precision <string> set MV Precision / Default: Q-pel
Q-pel (High Quality)
half-pel
full-pel (Low Quality)
--vbv-bufsize <int> set vbv buffer size (kbit) / Default: auto
--vpp-deinterlace <string> set deinterlace mode / Default: none
none, bob, adaptive (normal)
available only with avcuvid reader
--vpp-resize <string> default, nn, npp_linear, cubic
cubic_bspline, cubic_catmull, cubic_b05c03
super, lanczos, bilinear, spline36
default: default
--vpp-gauss <int> disabled, 3, 5, 7
default: disabled
--vpp-knn [<param1>=<value>][,<param2>=<value>][...] enable denoise filter by K-nearest neighbor.
params
radius=<int> set radius of knn (default=3)
strength=<float> set strength of knn (default=0.08, 0.0-1.0)
lerp=<float> set balance of orig and blended pixel (default=0.20)
lower value results strong denoise.
th_lerp=<float> set threshold for detecting edge (default=0.80, 0.0-1.0)
higher value will preserve edge.
--vpp-pmd [<param1>=<value>][,<param2>=<value>][...] enable denoise filter by pmd.
params
apply_count=<int> set count to apply pmd denoise (default=2)
strength=<float> set strength of pmd (default=100.00, 0.0-100.0)
threshold=<float> set threshold of pmd (default=100.00, 0.0-255.0)
lower value will preserve edge.
--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:-544]
--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-perf-monitor check duration of each filter.
may decrease overall transcode performance.
--videoformat <string> undef, ntsc, component, pal, secam, mac
default: undef
--colormatrix <string> undef, auto, bt709, smpte170m, bt470bg
smpte240m, YCgCo, fcc, GBR, bt2020nc
bt2020c
default: undef
--colorprim <string> undef, auto, bt709, smpte170m, bt470m
bt470bg, smpte240m, film, bt2020
default: undef
--transfer <string> undef, auto, bt709, smpte170m, bt470m
bt470bg, smpte240m, linear, log100, log316
iec61966-2-4, bt1361e, iec61966-2-1
bt2020-10, bt2020-12, smpte-st-2084
smpte-st-428, arib-srd-b67
default: undef
--fullrange set fullrange
--output-buf <int> buffer size for output in MByte
default 8 MB (0-128)
--max-procfps <int> limit encoding performance to lower resource usage.
default:0 (no limit)
--output-thread <int> set output thread num
-1: auto (= default)
0: disable (slow, but less memory usage)
1: use one thread
--log <string> set log file name
--log-level <string> set log level
debug, info(default), warn, error
--log-framelist <string> output frame info of avcuvid reader to path
H.264/AVC
--tff same as --interlaced tff
--bff same as --interlaced bff
--interlaced <string> interlaced encoding
tff, bff
--cabac use CABAC
--cavlc use CAVLC (no CABAC)
--bluray for bluray / Default: off
--lossless for lossless / Default: off
--(no-)deblock enable(disable) deblock filter
H.265/HEVC
--cu-max <int> set max CU size
--cu-min <int> set min CU size
8, 16, 32 are avaliable
warning: it is not recommended to use --cu-max or --cu-min,
leaving it auto will enhance video quality.
important part is the second one:
--aq enable spatial adaptive quantization
--aq-temporal enable temporal adaptive quantization (FOR H.264 ONLY)
--aq-strength <int> set aq strength (weak 1 - 15 strong)
FOR H.264 ONLY, Default: auto(= 0)
=> Similar outputs on your system should explain why Hybrid acts the way it does.
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
oh
the version is old.
Please update for the new features.
|