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 > High Efficiency Video Coding (HEVC)

Reply
 
Thread Tools Search this Thread Display Modes
Old 6th December 2017, 09:22   #1  |  Link
Neillithan
Banned
 
Join Date: Feb 2007
Posts: 124
2-pass HEVC NVENC - Is it possible?

Title pretty much sums it up. I'm wondering if it's possible to do a 2-pass encoding with NVENC.

It would provide a super fast encoding, but with the benefits of better bitrate distribution for those really pesky parts of videos that end up being way lower bitrate than is acceptable.
Neillithan is offline   Reply With Quote
Old 6th December 2017, 13:13   #2  |  Link
JohnLai
Registered User
 
Join Date: Mar 2008
Posts: 448
Not possible.
Previously, nvenc has option called VBR2Pass. It was renamed to VBRHQ in SDK7.19
It is not exactly the two pass you are looking for.
http://forum.doom9.net/showthread.ph...01#post1792801
Think of it as single frame two pass where only data from previous frame is used for determining the next frame bit distribution.


X264 and X265 two pass work differently where all frames from beginning till the end is analysed, then the data is used to do the actual encoding process in second pass.


On your other thread, of course x265 gonna win in term of quality per file size.
x265 makes use of B-Frame.
NVENC HEVC doesn't have B-frame support.
http://forum.doom9.net/showthread.ph...93#post1780493
JohnLai is offline   Reply With Quote
Old 6th December 2017, 21:58   #3  |  Link
Neillithan
Banned
 
Join Date: Feb 2007
Posts: 124
I see, interesting. Do you think this will ever become possible in the future, or is this forever impossible due to the way NVENC is designed?

Regarding x265 vs NVENC HEVC.... for some reason, the x265 wins for 23.976fps footage is when I do a Medium preset (or slower), 2-pass conversion. I have tested Faster, Very Fast, Single Pass, Constant Quality, etc etc. In each of these cases, NVENC wins most of the time (again, it depends on what the input footage is). I do not know why.

x265 always wins for 60fps footage, even with the faster preset.

I keep taking screenshots to compare NVENC and x265 and (just to reiterate) nvenc seems to win unless I perform a 2-pass medium preset encode with x265. But this is way off topic. :P

Last edited by Neillithan; 6th December 2017 at 22:05.
Neillithan is offline   Reply With Quote
Old 7th December 2017, 20:22   #4  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
NVEnC uses the VPU chip on your NVIDIA card so unless a new chip comes out I doubt that there is some undocumented api version which would allow to do something like x264/x265/Xvid/... do with two pass encoding.
+ I doubt it will happen that NVIDIA/Intel/AMD will support 2pass encoding like we know it from software encoders, since their main goal is to provide a fast way to do decent life stream video encoding and 2pass encoding the way software encoders to it can't be live.
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 18th December 2020, 04:42   #5  |  Link
Tazlord
Registered User
 
Join Date: Mar 2005
Posts: 25
Old thread but to answer your question, VBRHQ IS 2-pass.
Quote:
Previously, nvenc has option called VBR2Pass. It was renamed to VBRHQ in SDK7.19
It is not exactly the two pass you are looking for.
http://forum.doom9.net/showthread.ph...01#post1792801
The description in that link describes exactly how 2-pass works. It isn't limited to frames within the same pass. It actually stores frame information for use in a 2nd pass, the compression pass. Considering what year it is now, both Turing and Ampere have vastly improved on the features available in the API. I use a command-line app called NVEncC64 to access the nvenc API. It's easy to use and pretty fool-proof.

https://github.com/rigaya/NVEnc
Tazlord is offline   Reply With Quote
Old 19th December 2020, 14:22   #6  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
Quote:
VBRHQ IS 2-pass.
Like before what happens 1st a frame is encoded once and then the same frame is encoded a second time while applying some information gathered during the first compression.
So it is still no real 2pass encoding the way folks know it from most modern software encoders, which allows to hit a specific file size.
Only new thing is that you can use a faster 2pass approach by doing the 1st pass on a scaled down version.
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 19th December 2020, 14:47   #7  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 3,997
NVIDIA's 2-pass principle is described here:
https://docs.nvidia.com/video-techno...ame-phencoding
Sharc is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 10:52.


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