Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 Encoder GUIs
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 10th January 2017, 16:36   #1701  |  Link
JohnLai
Registered User
 
Join Date: Mar 2008
Posts: 448
Quote:
Originally Posted by mcjordan View Post
- cbrhq ? Any additional information?
The "HQ" means two pass encoding.

edit:
Source from SDK 7.1.9 in case people are skeptical


edit2:
I guess my Constant Quality deduction back when SDK7.0 was released ....is right on the money. From 7.1.9 itself.
Target quality: This mode is specified by setting rateControlMode to one of the
VBR modes and desired target quality in targetQuality . The range of this target
quality is 1 to 51, roughly corresponding to the range of possible QP values. In this
mode, the encoder tries to maintain constant quality for each frame, by allowing the
bitrate to vary subject to the bitrate parameters specified in maxBitRate and
averageBitRate. If maxBitRate and averageBitRate are not specified, the
encoder will use as many bits as needed to achieve the target quality. However, if
both parameters are set, they will form the upper bound on the actual bitrate. The
bitrate will become constrained, resulting in the desired target quality possibly not
being achieved.

In my previous method....I actually proposed to max both averageBitRate and maxBitRate to 17500 kbps which produced more or less the same result as it is not constrained by bitrate and is able to reach defined target quality. Hmm.......

Last edited by JohnLai; 11th January 2017 at 15:18.
JohnLai is offline   Reply With Quote
Old 10th January 2017, 20:10   #1702  |  Link
mcjordan
Registered User
 
Join Date: Nov 2010
Posts: 124
Thanks, John.
And... hmm... today again:

NVEnc 3.04
To be able to output lossless even with HEVC.
It was restricted so as to be impossible.
mcjordan is offline   Reply With Quote
Old 11th January 2017, 11:55   #1703  |  Link
Magik Mark
Registered User
 
Join Date: Dec 2014
Posts: 666
Stax,

New x265 CLIs:

--ssim-rd
--aq-motion
--multi-pass-opt-rps
--multi-pass-opt-analysis
--multi-pass-opt-distortion
__________________
Asus ProArt Z790 - 13th Gen Intel i9 - RTX 3080 - DDR5 64GB Predator - LG OLED C9 - Yamaha A3030 - Windows 11 x64 - PotPlayerr - Lav - MadVR
Magik Mark is offline   Reply With Quote
Old 11th January 2017, 16:00   #1704  |  Link
mcjordan
Registered User
 
Join Date: Nov 2010
Posts: 124
Another day, another version:
NVEnc 3.05
To be able to output lossless even with HEVC.
It was restricted so as to be impossible*

* Updated to 3.05 (2017.01.11)
It was corrected again as it could not be fixed by 3.04...
I'm sorry I updated it repeatedly.

P.S. Fast test with new edition (StaxRip command line) - vbrhq vs cbrhq (in combination with simple avs r2376 Sharpen (0.2,0.2):
"%app:NVEncC%" --cbrhq 4428 --codec h265 --bframes 5 --ref 4 --lookahead 32 --qp-init 1 --aq --level 4.1 --output-buf 128 --cabac --cu-max 64 --device 1 --vbr-quality 1 --enable-ltr --fullrange -i "%script_file%" -o "%encoder_out_file%"
and same but --vbrhq (--vbr2).
The resulting image in vbr mode in comparision with cbrhq is slightly better (GTX960). On GTX1080 the image is constantly more blurry (may be because default SAO?). In all cases -> High lookahead value -> more blurred result. And all of this in static frame comparision. Playback of the final video doesn't contain significant differences (vs original source) or visible artefacts. John - advise me, please? Where I'm wrong (or better ;-) ?
A... and in my mind - Is it possible inclusion of hardware edge enhancement into NVEncC like AsVideo converter (by steps from 1 to 100; working on both GTX960 and 1080)?

Last edited by mcjordan; 11th January 2017 at 17:27.
mcjordan is offline   Reply With Quote
Old 11th January 2017, 16:57   #1705  |  Link
JohnLai
Registered User
 
Join Date: Mar 2008
Posts: 448
Quote:
Originally Posted by mcjordan View Post
Another day, another version:
NVEnc 3.05
To be able to output lossless even with HEVC.
It was restricted so as to be impossible*

* Updated to 3.05 (2017.01.11)
It was corrected again as it could not be fixed by 3.04...
I'm sorry I updated it repeatedly.

P.S. Fast test with new edition (StaxRip command line) - vbrhq vs cbrhq (in combination with simple avs r2376 Sharpen (0.2,0.2):
"%app:NVEncC%" --cbrhq 4428 --codec h265 --bframes 5 --ref 4 --lookahead 32 --qp-init 1 --aq --level 4.1 --output-buf 128 --cabac --cu-max 64 --device 1 --vbr-quality 1 --enable-ltr --fullrange -i "%script_file%" -o "%encoder_out_file%"
and same but --vbrhq (--vbr2).
The resulting image in vbr mode in comparision with cbrhq is slightly better (GTX960). On GTX1080 the image is constantly more blurry (may be because default SAO?). In all cases -> High lookahead value -> more blurred result. And all this in static frame comparision. Playback of the final video doesn't contain significant differences (vs original source) or visible artefacts. John - advise me, please? Where I'm wrong?
..............use unconstrained* VBR Constant Quality mode instead.

http://i.imgur.com/qaujIkT.jpg

Two pass encoding is pointless because there is "lookahead" rate control being used.

If you take a look on nvenc sdk list of presets, you will notice HQ (two pass encoding) mode is only used for low latency video (eg, videoconferencing)

EDIT:
Now...the problem with your command line for nvenc hevc encoding.
--bframes 5 = option useless because there is no b-frame support
--ref 4 = useless because nvenc hevc only make use of 1 single reference frame
--output-buffer 128 = if you use SSD, maybe 128mb. However, if you use HDD, better stick with sane value like 32mb or 64mb (matching HDD cache, you know, HDD has fast DRAM cache)
--cabac = -.- no need to specify this, HEVC use cabac by default
--cu-max = -.- NVENC encoding chip is limited to 32x32 max, just let it auto.
--enable-ltr = useless because there is only one active reference frame in DPB
--fullrange = give this one up....nvidia has color reproduction bug https://devtalk.nvidia.com/default/t...range-colors-/

EDIT2: (rephrasing)
-> High lookahead value -> more blurred result? Are you analysing it based on PSNR?
First reason = SAO
Second reason = spatial adaptive quantization(SAQ). Probably SAQ algorithm decides to raise QP factor after analyzing more frames (higher lookahead value) and determine those frames are heavy in motion.
From SDK :

Last edited by JohnLai; 11th January 2017 at 17:39.
JohnLai is offline   Reply With Quote
Old 11th January 2017, 17:51   #1706  |  Link
mcjordan
Registered User
 
Join Date: Nov 2010
Posts: 124
Yes, thank you very much, John. I know more of this things.
But strange - StaxRip log indicate that 64x64 cu-max is activated?! It's real or not (most likely)?
Encoding with NVEnc is a real pain - must guess all things into smoke on the water ;-)
mcjordan is offline   Reply With Quote
Old 11th January 2017, 17:56   #1707  |  Link
JohnLai
Registered User
 
Join Date: Mar 2008
Posts: 448
Quote:
Originally Posted by mcjordan View Post
Yes, thank you very much, John. I know more of this things.
But strange - StaxRip log indicate that 64x64 cu-max is activated?! It's real or not (most likely)?
Encoding with NVEnc is a real pain - must guess all things into smoke on the water ;-)
Nope....it is not.
If you specify 64x64, it automatically fallback to "auto"...which mean 32x32.
It is mentioned in SDK documentation and I also verify it through hevc bitstream analyzer.
JohnLai is offline   Reply With Quote
Old 11th January 2017, 19:44   #1708  |  Link
mcjordan
Registered User
 
Join Date: Nov 2010
Posts: 124
John, thank you again for responsiveness and sorry for disturbing.
Things, a little bit, began to explain to me. Obviously I need to read more (SDK, I mean)
and especially - more carefully. Obviously, there is still much more to be done in development of NVEnc.
Pity, this is one of the fastest hardware encoders, that I know. I'll do some more tests, but generally, soon,
if Ryzen prove what I guess - I'll assemble such kind of configuration and will go on pure x265.
With AVX512 support, may be? (as rumor has ;-)
mcjordan is offline   Reply With Quote
Old 12th January 2017, 06:20   #1709  |  Link
JohnLai
Registered User
 
Join Date: Mar 2008
Posts: 448
Quote:
Originally Posted by mcjordan View Post
John, thank you again for responsiveness and sorry for disturbing.
Things, a little bit, began to explain to me. Obviously I need to read more (SDK, I mean)
and especially - more carefully. Obviously, there is still much more to be done in development of NVEnc.
Pity, this is one of the fastest hardware encoders, that I know. I'll do some more tests, but generally, soon,
if Ryzen prove what I guess - I'll assemble such kind of configuration and will go on pure x265.
With AVX512 support, may be? (as rumor has ;-)
Not sure about Zen AVX512, but so far, Zen can't do single cycle AVX and AVX2 256bit unlike Intel.
Zen needs two cycles (128bit each) to execute AVX/AVX2 instruction.

Anyway, back to topic....stax76.....have you add NVENC NPP resizers into the GUI and NPP library itself (maybe provide a link to NPP library as it is 37MB) to the test-build yet?
Note: I am still using v1.4.0.0-stable.....
JohnLai is offline   Reply With Quote
Old 12th January 2017, 07:55   #1710  |  Link
mcjordan
Registered User
 
Join Date: Nov 2010
Posts: 124
John, NPP library (on Rigaya shareplaces / working like a charm in command line mode by the way /) -
https://onedrive.live.com/?cid=6bdd4...3&lor=shortUrl
or
https://drive.google.com/drive/folde...0E?usp=sharing

P.S. Concerning Zen - in this case the price is a determining factor...

Last edited by mcjordan; 12th January 2017 at 07:58.
mcjordan is offline   Reply With Quote
Old 12th January 2017, 09:37   #1711  |  Link
JohnLai
Registered User
 
Join Date: Mar 2008
Posts: 448
Quote:
Originally Posted by mcjordan View Post
John, NPP library (on Rigaya shareplaces / working like a charm in command line mode by the way /) -
https://onedrive.live.com/?cid=6bdd4...3&lor=shortUrl
or
https://drive.google.com/drive/folde...0E?usp=sharing

P.S. Concerning Zen - in this case the price is a determining factor...
I know about using command line.
Just wanna make thing easier for newbie with GUI implementation......

Or maybe implement the custom preset for unconstrained VBR Target Quality rate control method. If one ask me about UVBRTQ, I think it is quite similar to software encoder CRF method.


EDIT: I just tested staxrip testbuild StaxRip-x64-1.4.0.2-test, but apparently, ffms2 as source filter doesn't play well with nvencc
Quote:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Script
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

LoadPlugin("C:\Users\Anonymous\Desktop\Staxrip\Apps\Plugins\both\ffms2\ffms2.dll")
FFVideoSource("C:\Users\Anonymous\Desktop\test_track1_und.h264", cachefile = "L:\test_track1_und_temp\test_track1_und.ffindex")

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Script Properties
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

source frame count : 2184
source frame rate : 23.976024
source duration : 00:01:31.0910000
target frame count : 2184
target frame rate : 23.976024
target duration : 00:01:31.0910000

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Encoding using NVEncC 3.02 x64
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

@echo off
C:\Users\Anonymous\Desktop\Staxrip\Apps\NVEncC\NVEncC64.exe --cqp 20:26:30 --codec h265 --ref 6 --aq --level 5.1 --lookahead 32 -i L:\test_track1_und_temp\test_track1_und.avs -o L:\test_track1_und_temp\test_track1_und_out.h265

cmd.exe /C call "L:\test_track1_und_temp\test_track1_und_NVEncC.bat"

avs: invalid colorformat.
Failed to open input file.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Error Encoding using NVEncC 3.02 x64
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Encoding using NVEncC 3.02 x64 failed with exit code: 1 (0x1)

The exit code might be a system error code: STATUS_WAIT_1

The exit code might be a system error code: Incorrect function.

avs: invalid colorformat.
Failed to open input file.

Start: 10:00:45 PM
End: 10:00:45 PM
Duration: 00:00:00
Other source filter such as LSMASHSource works well. But I need FFVideoSource filter for exact timing.

EDIT: Turn out AviSynth+r2294 is the problem. Uninstall 2294 and install AviSynthPlus-r1576 somehow works.
EDIT2: Hmm...apparently AviSynth+_v0.1.0_r1825-MT works too. Source video is 10bit h264. R2172 doesn't work too.

Last edited by JohnLai; 12th January 2017 at 16:16.
JohnLai is offline   Reply With Quote
Old 12th January 2017, 16:45   #1712  |  Link
mcjordan
Registered User
 
Join Date: Nov 2010
Posts: 124
Try these updates:

ffms2 have a new version ->
https://github.com/FFMS/ffms2/releas...2.23.1-msvc.7z
Chagelog:
Updated FFmpeg APIs used (Daemon404)
Added new API that can read/write indexes to a memory buffer (Daemon404)
Added support for high bitdepth output in Avisynth+ (Myrsloik)
vapoursource: Add nfMakeLinear flag to better performance in most cases (Myrsloik)
Remove bad colorspace matrix guessing for YUV (Myrsloik)
Tell libavformat to discard packets we don't want (Daemon404)
Restore original FFCopyrightInfringement behavior (Myrsloik)
Make FFMS_Init threadsafe (Daemon404)
Support latest libav* APIs (Daemon404)

And -> latest Avisynth+ is r2380
http://www.mediafire.com/file/6pyic6...splus-r2380.7z
Includes support for 10-bit formats & various color space conversions.

LSMASHSource -> r921
https://www.dropbox.com/sh/3i81ttxf0...VhYLasmwa?dl=0

P.S. Specifically I use as source filter DGDecNV r2052 (2017.01.09 is latest)

Last edited by mcjordan; 12th January 2017 at 17:14.
mcjordan is offline   Reply With Quote
Old 12th January 2017, 17:59   #1713  |  Link
JohnLai
Registered User
 
Join Date: Mar 2008
Posts: 448
StaxRip-x64-1.4.0.2-test uses ffms2 2.23.1
Latest Avisynth+ r2380 still have the same "avs: invalid colorformat." error.

LSMASHSource doesn't exactly work well for multichapters plus separate MKV content. Only FFVideoSource can properly index and load multichapter mkv files.
Example, load chapter1.mkv, then at 1:30, load OP.mkv, next at 3:20, load chapter2.mkv.
LSMASHSource and LWLibavVideoSource actually skipped the OP.mkv resulting in out of audio sync with video.

Not a big deal since older avisynth+ works fine.
JohnLai is offline   Reply With Quote
Old 12th January 2017, 19:35   #1714  |  Link
mcjordan
Registered User
 
Join Date: Nov 2010
Posts: 124
Thank you for response.
I will do test to reproduce a problem, but tomorrow.
I had a quite hard day in work.
mcjordan is offline   Reply With Quote
Old 13th January 2017, 20:24   #1715  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,314
Quote:
Originally Posted by JohnLai View Post
StaxRip-x64-1.4.0.2-test uses ffms2 2.23.1
Latest Avisynth+ r2380 still have the same "avs: invalid colorformat." error.
Beginning with r2290 Avisynth+ has native 10 bit support. Your 10 bit video is probably opened as real 10 bit by ffms2. Thus the output is also 10 bits which is not handled well by the encoder at least not without appropriate parameters. Try ConvertBits(8) line before the end of the script, or right after opening the video, or try to use a 8 bit colorspace parameter directly with ffms2.
pinterf is offline   Reply With Quote
Old 13th January 2017, 21:19   #1716  |  Link
Dark Eiri
Registered User
 
Join Date: May 2006
Posts: 335
Are you planning to support HEVC thru AMD VCE on Polaris \ Vega GPUs soon?
Dark Eiri is offline   Reply With Quote
Old 13th January 2017, 21:21   #1717  |  Link
NikosD
Registered User
 
Join Date: Aug 2010
Location: Athens, Greece
Posts: 2,901
Quote:
Originally Posted by Dark Eiri View Post
Are you planning to support HEVC thru AMD VCE on Polaris \ Vega GPUs soon?
http://forum.doom9.org/showthread.php?p=1790780
__________________
Win 10 x64 (19042.572) - Core i5-2400 - Radeon RX 470 (20.10.1)
HEVC decoding benchmarks
H.264 DXVA Benchmarks for all
NikosD is offline   Reply With Quote
Old 16th January 2017, 14:23   #1718  |  Link
Khun_Doug
Registered User
 
Join Date: Jul 2016
Posts: 100
Rev 1.4.0.2 X265 Errors with Analysis 1 / Limit TU

Using the latest 1.4.0.2 build to encode with X265. I have the latest encoder that supports the limit-tu option. But the test build of Stax appears to create a command string "--limit-tu level 2", but it should really be "--limit-tu 2". The word "level" needs to be removed from the command string.

PS - Sorry to read Stax76 is going to leave the project. This is surely going to be a loss sorely felt.
Khun_Doug is offline   Reply With Quote
Old 16th January 2017, 18:05   #1719  |  Link
dracore
Registered User
 
Join Date: Oct 2006
Posts: 55
im new to all this and ive been trying to add lookahead for my encodes in staxrip .. could someone please help me how to .... thank you
dracore is offline   Reply With Quote
Old 17th January 2017, 03:43   #1720  |  Link
JohnLai
Registered User
 
Join Date: Mar 2008
Posts: 448
Quote:
Originally Posted by dracore View Post
im new to all this and ive been trying to add lookahead for my encodes in staxrip .. could someone please help me how to .... thank you
You didn't even mention which encoder.
If I didn't bother to check your post at videohelp forum, nobody will even bother to help you.





Or if you use latest Staxrip beta.

Last edited by JohnLai; 17th January 2017 at 03:45.
JohnLai is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 21:51.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.