Question / Help Lossless NVENC not lossless (4:2:0)

Dogway

New Member
The title sums it up. Saying its lossless is misleading, now I wonder if this might be a bug or there isn't really a way to encode 4:4:4 on the NVENC API. I don't see a place to tweak NVENC settings either.
 

OldAoe2Player

New Member
The NVENC API (v4.0), yes, it does support 4:4:4 and lossless encoding.

4:4:4 would be useful for local wireless display-mirroring (i.e. miracast or Intel WiDi type of application), when you have sufficient bandwidth (at least 50mbps for 1080p60.) But on my Geforce 750TI (GM107), 4:4:4 encoding is very slow (more than twice as slow as the usual 4:2:0 encoding),

Lossless encoding consumes a ridiculous amount of disk-space. In my opinion, it's an academic curiosity only.

The problem with either of these modes (4:4:4, lossless), is that they require the bitstream to be encoded with HighProfile-444P. Just about every decent videoplayer will play them correctly (even Windows 7's built-in Windows Media Player), but they can't use hardware-accelerated decode (DXVA.)

Having said that, OBS isn't going to support all the features offered by the NVENC API, because many of them simply aren't useful/practical in a streaming application. I'd be very surprised if any streaming-hosts even accept uploads @ HighProfile444P.
 

kaloc

Member
I would use 4:4:4 for local encoding, but I wonder if its fast enough for real-time with Kepler? I was under the impression that nvenc didn't allow or support 4:4:4 outside of Nvidia Grid servers. Hopefully it's unlocked on all maxwell cards.

@ OldAoe2Player
You've encoded with nvenc on your 750ti at 444 ?

As you can see in BtbN's code there may be hope for 444 in the future, but probably a while away.
https://github.com/jp9000/OBS/blob/master/ObsNvenc/inc/nvEncodeAPI.h
 
Last edited:

Dogway

New Member
I never thought about streaming, in that regard yes lossless is academic curiosity, but on semi-professional level (ie, serious youtube channels, etc), and of course professional ones lossless is always used as intermediary files for local encoding, which is what I do encoding gameplays. Otherwise you would end with (h.264 footage->h.264 edited/effects->h.264 youtube) which IMO is crap, but some people don't even know/care.

Besides that, if you record a snes or nes game with 4:2:0 planes it is very easy to see image degradation, pair this with the above 3 or 4 times transcoding and you will find why true lossless (which implies no chroma subsampling) is so much needed.

I also own a 750Ti, I don't know how you did the test but 444 or not lossless encoding is not so demanding as lossy ones, there aren't as many optimizations to be done, so it kind of compensates.
I didn't know OBS was streaming focused software so sorry about that, maybe there are more nvenc encoding programs around?
 

Boildown

Active Member
Other than Shadowplay, I haven't heard of any other encoding software programs to have NVEnc support. There was a request on the Handbrake forums, but it didn't gain much traction last I checked.

There is an older version of OBS to support 4:4:4 output, but I'm 99% sure that was before NVEnc support was added, so that does no good either.

Depending on what you want to do, FRAPS might be a good option.
 

Dogway

New Member
FRAPS is CPU encoding, so if I was to use FRAPS I would better use OBS with x264, or DXtory, or/and using another lossless encoder.
I did a bit of research and found more programs with NVENC support CyberLink MediaEspresso and Bandicam, but I don't know if they can encode lossless or output 444, but I would be surprised if they did (still need to check).
 

AlexFolland

New Member
The question here is whether the NVENC API supports RGB encoding. YUV4:4:4 is not lossless for RGB content such as the output from an NES or SNES emulator. I believe that's what Dogway wants, anyway. It's also something I would be interested in, mainly for handling color conversion with external tools.
 

Dogway

New Member
Well yes, that's technically true but the same could be said for almost all video sources, (almost) everything is RGB until you convert it to video where RGB is not a proper color format.

I gave a glance to the API file and it doesn't seem to support it but maybe someone more knowledgeable can say better. IIRC RGB is rarely used on a production pipeline at this level? I know NUKE does all internal calculations in RGB 32bit, so if Premiere or After Effects (among other packages) do the same then I can find a justification, although by experience YUV 444->RGB 32bit->YUV444 is barely noticeable if any. RGB also compresses much worse so you really have to think if it's worth it or not.
 

Dogway

New Member
I wanted to add that oddly enough importing MP4 with Hi444P profiles into premiere (CS6 at least) will render grey. I found then this profile was seemingly required not only for 444 planes but also for --qp 0 420 (aka lossless bitrate with chroma subsampling) which is what ultimately OBS is recording these videos at, so I had to convert them to another lossless format like UTVideo so they will load into Premiere. For some reason either UTVideo, FFV1 or the likes compress much worse than the lossless MP4. Then just now I found this.
Bug FIxes:
H.264 444 video files are incorrectly decoded as 422. One manifestation is green artifacts.
So probably newer Premiere versions can load them without issues? Can anyone confirm?
 
Top