Resource icon

All Versions NVIDIA NvEnc Guide

Luminair

New Member
@findal FFmpeg supports hevc_nvenc but it doesn't show up in Custom Output and I don't know how to make a truly custom custom-output with my own FFmpeg. Can you ask OBS to add hevc_nvenc support? Thanks.
 

Attachments

  • hevc_nvidia_obs.jpg
    hevc_nvidia_obs.jpg
    61.4 KB · Views: 236

Toranks

New Member
Im using NVIDIA Nvenc, but every time I alt+tab from OBS to the game, the recorded image freezes, but when I'm looking at the preview inside OBS studio, it records fine. Something is preventing the image from being processed when I play full screen. The game is Left4 Dead 2 in case it helps. I think it's related to the CPU priority, but I have it set OBS to high, and also starting OBS as administrator, but it doesn't seem to help the problem. Windows 7, 8gb ram, Geforce GT 710, Intel Celeron 2.8 ghz, 2 CPU
Can anybody help me?
 

Lucasmpaiva

New Member
Im using NVIDIA Nvenc, but every time I alt+tab from OBS to the game, the recorded image freezes, but when I'm looking at the preview inside OBS studio, it records fine. Something is preventing the image from being processed when I play full screen. The game is Left4 Dead 2 in case it helps. I think it's related to the CPU priority, but I have it set OBS to high, and also starting OBS as administrator, but it doesn't seem to help the problem. Windows 7, 8gb ram, Geforce GT 710, Intel Celeron 2.8 ghz, 2 CPU
Can anybody help me?
I'm having a similar problem, but playing games that has 4:3 resolution (i'm using the GPU scaling on nvidia control panel). My stream bitrate goes to zero and my preview screen also freezes. Here's the post that I created with more info to help investigate: https://obsproject.com/forum/thread...n-playing-games-that-uses-gpu-scaling.155904/
 

findal

Member
findal updated NVIDIA NvEnc Guide with a new update entry:

Streaming or Recording with HEVC and HDR

With OBS version 28, you can stream with HEVC to platforms that support it. HEVC is an improved codec that provides 15% better encoding efficiency than H.264 (i.e. it provides quality as if you streamed with 15% more bitrate). HEVC - and OBS version 28 - also allow you to record and stream HDR content.

How to Record and/or Stream with HEVC
If you want to record or stream with HEVC, in OBS navigate to your Output window and change the Encoder to Hardware (NVENC, HEVC) for the...

Read the rest of this update entry...
 

spartanz1080

New Member
This updated guide is perfect but i just wanted to mention one thing I experienced. The guide says to turn GPU hardware acceleration on but I was having some issues with the new OBS and as soon as I turned GPU hardware acceleration off all my issues went away so I thought I’d mention that. And on the OBS troubleshooting site it says to turn it off so I’m confused. I’m keeping it off though.
 

iamdak

New Member
Hello, thanks for the guide! I'm not sure if this is due to a recent build but auto hdr doesn't appear to be working anymore (on latest obs and latest win11). The captured image has the dull SDR color. It seems to work fine if I try a game with native hdr.
 

iamdak

New Member
Hello, thanks for the guide! I'm not sure if this is due to a recent build but auto hdr doesn't appear to be working anymore (on latest obs and latest win11). The captured image has the dull SDR color. It seems to work fine if I try a game with native hdr.

I wanted to update this for anyone else trying to figure this out. Auto-HDR isn't working for me when I use a "Game Capture" source. To be clear, Native-HDR games *DO* work with "Game Capture". I was however able to capture my Auto-HDR games by using either a "Window Capture" or "Display Capture" sources.
 

jasonsmith1

New Member
NVIDIA NVENC is a hardware-based video encoding technology that enhances streaming and recording performance. In OBS, select NVENC as the encoder, adjust bitrate, keyframe interval, and profile. ptcl speed test Test settings and prioritize quality or performance based on presets. Refer to current resources for the latest information.
 

nazoren

New Member
Hope this message finds you all well...
Wrote the same below to Nvidia as it just doesn't make sense why it's happening.
Hopefully they'll figure out and will share the same
We have an MSI desktop with NVIDIA® GeForce RTX™ 4090 GAMING TRIO 24G, attached the details.
We also have 2 of the Z-cam E2 F6 cameras and 1 Sony ZV-E1:
https://www.z-cam.com/e2-f6/
https://www.sony.com/electronics/support/e-mount-body-zv-e-series/zv-e1/specifications

We are using either SSP protocol thru 1GB ethernet
Netgear AV Line M4250 GSM4210PD with the OBS Plugin below
https://obsproject.com/forum/resources/z-cam-ssp-source.926/
or Blackmagic Design DeckLink Quad HDMI Recorder Capture Card below:
https://www.blackmagicdesign.com/products/decklink/techspecs/W-DLK-36
For Sound we have Yamaha DM3 via USB connection

We have been using this setup for live streaming with 2 or 3 cameras, about 10 months in 4k 30 frames resolution with NV12 8-bit 4:2:0 color format without any issues with NVIDIA NVENC H.264 Encoder thru OBS 30.1.2

Following the instructions of "NVIDIA NvEnc Guide" at OBS Project Forum, we wanted to improve our live stream to bring the 10-bit HDR to our audience. Therefore we switched to "NVIDIA NvEnc HEVC" as instructed
But unfortunately although all the hardware and software supposed to be capable and compatible to make this happen, we are having difficulties with drop frames and stuttering video.

Attached also the OBS log file showing the drop frames, with the old set up we could bring the encoder bitrate up to 35000 Kbps but the new HEVC even down to 15000 Kbps still drops frames...

We would appreciate the help and support to resolve this and take advantage of RTX 4090's HEVC or AV1 capability to achieve this improvement.

It would be awesome if someone can log in to the desktop, test it and make the required adjustments.

Sincerely,

Additional Details​


Reference Number
240826-000338
Status
New
Created
08/26/2024 08:42 AM
Updated
08/26/2024 08:42 AM
File Attachments
Choose OS
Microsoft Windows 11
Product Name
GeForce RTX 4090
Driver Version
32.0.15.6081
 

nazoren

New Member
Furthermore, uploaded the latest versions of programs and all drivers for everything in use.
Stripped down any unnecessary plugins and settings.
Just playing an mp4 file to test, still the same dropped frames.
OBS analyzer gives only a network error:
This can only be caused by a failure in your internet connection or your networking hardware. It is not caused by OBS.
OBS doesn't do this at all with the old 8 bit 4:2:0 H264 profile.
Below is the latest OBS log and analyze. Will do the regular old 8 bit 4:2:0 H264 profile log and attach that too
 

nazoren

New Member
WIth old settings flawless, no errors, no drop frames but of course 8 bit 4:2:0 not HDR and no use of RTX 4090
Especially low light and fast movements, has lots of artifacts and pixelations
 

nazoren

New Member
Came across with a similar problem from a fellow user, he said it worked for him after formatted his installation.
Not sure full PC format or just the OBS:
 

rockbottom

Active Member
WIth old settings flawless, no errors, no drop frames but of course 8 bit 4:2:0 not HDR and no use of RTX 4090
Especially low light and fast movements, has lots of artifacts and pixelations

This only showed up when the old log was analyzed. Perhaps having the Network Optimizations enabled in OBS are the cause of the dropped frames when using HLS? Test with it disabled & see what happens.


1724715115849.png
 

rockbottom

Active Member
No idea how that's being handled or if it actually disabled the settings. I've streamed before using HLS with no issues but it's been a few years. Anyway, on my set-up all that Network stuff is always set at default. No Dynamic bit-rate or optimizations in play. According to the non HDR log, you have both enabled.

I looked at the HDR log, there was no dropped frames when you were streaming @ 15,000kbps, frames started dropping when you went above that bit-rate. The higher you go, the worse it gets....

13:10:21.347: [obs-nvenc: 'advanced_video_stream'] settings:
13:10:21.347: codec: HEVC
13:10:21.347: rate_control: CBR
13:10:21.347: bitrate: 15000
13:10:21.347: cqp: 20
13:10:21.347: keyint: 60
13:10:21.347: preset: p5
13:10:21.347: tuning: hq
13:10:21.347: multipass: disabled
13:10:21.347: profile: main10
13:10:21.347: width: 3840
13:10:21.347: height: 2160
13:10:21.347: b-frames: 4
13:10:21.347: lookahead: true
13:10:21.347: psycho_aq: true
13:10:21.347:
13:10:21.451: ---------------------------------
13:10:21.451: [FFmpeg aac encoder: 'adv_stream_audio'] bitrate: 160, channels: 2, channel_layout: stereo
13:10:21.451:
13:10:21.452: [ffmpeg muxer: 'adv_stream'] Using muxer settings:
13:10:21.452: method=PUT
13:10:21.452: http_persistent=1
13:10:21.452: ignore_io_errors=1
13:10:21.452: http_user_agent=libobs/30.2.3
13:10:21.452: hls_time=2
13:10:21.459: YT: GetYTApi() Failed to get Auth
13:10:21.459: ==== Streaming Start ===============================================
13:10:21.459: [ffmpeg hls muxer: 'adv_stream'] Writing to path 'https://a.upload.youtube.com/http_upload_hls?cid={stream_key}&copy=0&file=out.m3u8'...
13:10:50.254: User switched to scene 'DKH'
13:10:51.356: User switched Program to scene 'DKH'
13:10:51.371: User switched to scene 'Black'
13:10:55.759: User switched to scene 'DKH'
13:13:18.170: [ffmpeg muxer: 'adv_stream'] Output of file 'https://a.upload.youtube.com/http_upload_hls?cid={stream_key}&copy=0&file=out.m3u8' stopped
13:13:18.170: Output 'adv_stream': stopping
13:13:18.170: Output 'adv_stream': Total frames output: 5237
13:13:18.170: Output 'adv_stream': Total drawn frames: 5302
13:13:18.171: YT: GetYTApi() Failed to get Auth
13:13:18.171: ==== Streaming Stop ================================================

14:23:06.803: codec: HEVC
14:23:06.803: rate_control: CBR
14:23:06.803: bitrate: 21000
14:24:21.434: Output 'adv_stream': Number of dropped frames due to insufficient bandwidth/connection stalls: 528 (24.4%)

13:09:05.434: codec: HEVC
13:09:05.434: rate_control: CBR
13:09:05.434: bitrate: 25000
13:10:07.857: Output 'adv_stream': Number of dropped frames due to insufficient bandwidth/connection stalls: 704 (38.9%)

14:24:35.204: codec: HEVC
14:24:35.204: rate_control: CBR
14:24:35.204: bitrate: 41000
14:37:27.879: Output 'adv_stream': Number of dropped frames due to insufficient bandwidth/connection stalls: 15395 (66.6%)
 

nazoren

New Member
Yes, wanted to test the stream, 15,000 kbps a bit too low for sending 4k in 10-bit HDR.
Main goal is to stream 4k in 10 bit with best possible way in highest bitrate...
One other Fellow wrote he had it fixed by reinstalling everything, not sure if he completely formatted or just the OBS and drivers, asked the same:
Youtube says they have another way to send 10-bit thru RTMPS, will test it with 4k next:
 

Attachments

  • 1724776789765.png
    1724776789765.png
    224.3 KB · Views: 9
Top