Bug Report NVENC Audio/Video Issues

HypnoToadTrance

New Member
When using NVENC to record locally, everything is fine. When using NVENC to broadcast, it produces a horribly-mangled stream as evidenced here: http://www.twitch.tv/hypnotoadtrance/b/507055083

At first, I thought this may be related to CFR and/or "Force Desktop Audio to use Video timestamps as a base for audio time".

Disabling CFR while leaving everything else the same still produces this: http://www.twitch.tv/hypnodragontrance/b/507062252

Disabling "Force Desktop Audio to use Video timestamps as a base for audio time" while leaving everything else unchanged also produces the same thing: http://www.twitch.tv/hypnodragontrance/b/507063606

Disabling BOTH CFR and "Force Desktop Audio to use Video timestamps as a base for audio time" at the same time while leaving all other settings unchanged produces this: http://www.twitch.tv/hypnodragontrance/b/507064446


So after having tested that, I decided I would come to here for assistance, as I do not know what could be causing this. Any help you could provide would be appreciated.

Thank you!


Code:
07:06:10: CUDA loaded successfully
07:06:11: 1 CUDA capable devices found
07:06:11: [ GPU #0 - < GeForce GTX 650 Ti > has Compute SM 3.0, NVENC Available ]
07:07:14: Settings::Video: Disabling Aero
07:13:06: Open Broadcaster Software v0.612b - 64bit ( ^ω^)
07:13:06: -------------------------------
07:13:06: CPU Name: Intel(R) Core(TM) i3 CPU         540  @ 3.07GHz
07:13:06: CPU Speed: 3066MHz
07:13:06: Physical Memory:  8183MB Total, 4938MB Free
07:13:06: stepping id: 2, model 37, family 6, type 0, extmodel 1, extfamily 0, HTT 1, logical cores 4, total cores 2
07:13:06: monitor 1: pos={0, 0}, size={1920, 1080}
07:13:06: Windows Version: 6.1 Build 7601 S
07:13:06: Aero is Disabled
07:13:06: -------------------------------
07:13:06: OBS Modules:
07:13:06: Base Address     Module
07:13:06: 000000003FF10000 OBS.exe
07:13:06: 00000000EA2D0000 OBSApi.dll
07:13:06: 00000000EE090000 DShowPlugin.dll
07:13:06: 00000000EE060000 GraphicsCapture.dll
07:13:06: 00000000EC3F0000 NoiseGate.dll
07:13:06: 00000000EC3D0000 PSVPlugin.dll
07:13:06: ------------------------------------------
07:13:06: Adapter 1
07:13:06:   Video Adapter: NVIDIA GeForce GTX 650 Ti
07:13:06:   Video Adapter Dedicated Video Memory: 1018888192
07:13:06:   Video Adapter Shared System Memory: 3221549056
07:13:06:   Video Adapter Output 1: pos={0, 0}, size={1920, 1080}, attached=true
07:52:03: =====Stream Start: 2014-02-28, 07:52:03===============================================
07:52:03:   Multithreaded optimizations: On
07:52:03:   Base resolution: 1280x720
07:52:03:   Output resolution: 640x360
07:52:03: ------------------------------------------
07:52:03: Loading up D3D10 on NVIDIA GeForce GTX 650 Ti (Adapter 1)...
07:52:03: ------------------------------------------
07:52:03: Audio Format: 44100hz
07:52:03: Playback device Default
07:52:03: ------------------------------------------
07:52:03: Using desktop audio input: Speakers (Realtek High Definition Audio)
07:52:03: ------------------------------------------
07:52:03: Using auxilary audio input: Microphone (3- HP Webcam 3100)
07:52:04: ------------------------------------------
07:52:04: Audio Encoding: AAC
07:52:04:     bitrate: 160
07:52:04: Using graphics capture
07:52:04: Scene buffering time set to 700
07:52:04: NVENC internal init finished successfully
07:52:04: NVENC supports 7 h264 presets
07:52:04: ------------------------------------------
07:52:04: Video Encoding: NVENC
07:52:04:     fps: 60
07:52:04:     width: 640, height: 360
07:52:04:     preset: default
07:52:04:     profile: main
07:52:04:     level: autoselect
07:52:04:     keyint: 120
07:52:04:     CBR: yes
07:52:04:     CFR: yes
07:52:04:     max bitrate: 2048
07:52:04:     buffer size: 2048
07:52:04: ------------------------------------------
07:52:04: SharedTexCapture hooked
07:52:04: Syncing audio to video time (WARNING: you should not be doing this if you are just having webcam desync, that's a separate issue)
07:52:05: Using RTMP service: Twitch / Justin.tv
07:52:05:   Server selection: rtmp://live-lax.justin.tv/app
07:52:05:   Interface: Linksys AE2500 (802.11, 163 mbps)
07:52:05: Completed handshake with rtmp://live-lax.justin.tv/app in 91 ms.
07:52:06: SO_SNDBUF was at 172032
07:52:06: SO_SNDBUF is now 65536
08:12:09: Audio timestamp for device 'Microphone (3- HP Webcam 3100)' was behind target timestamp by 80
08:27:31: GraphicsCaptureSource::NewCapture:  eliminating old capture
08:27:31: SharedTexCapture hooked
08:27:32: RTMPPublisher::SocketLoop: Increasing send buffer to ISB 262144 (buffer: 0 / 282624)
08:30:58: GraphicsCaptureSource::NewCapture:  eliminating old capture
08:30:58: SharedTexCapture hooked
08:36:27: Total frames encoded: 159742, total frames duplicated: 384 (0.24%)
08:36:27: Total frames rendered: 159734, number of late frames: 16 (0.01%) (it's okay for some frames to be late)
08:36:27: RTMPPublisher::SocketLoop: Graceful loop exit
08:36:27: Average send payload: 5424 bytes, average send interval: 20 ms
08:36:27: Number of times waited to send: 0, Waited for a total of 0 bytes
08:36:27: Number of b-frames dropped: 0 (0%), Number of p-frames dropped: 0 (0%), Total 0 (0%)
08:36:27: Number of bytes sent: 702503242
08:36:27: Encoder closed
08:36:27: NVENC deinitialized
08:36:27: 
08:36:27: Profiler time results:
08:36:27: 
08:36:27: ==============================================================
08:36:27: video thread frame - [100%] [avg time: 0.855 ms] [children: 32%] [unaccounted: 68%]
08:36:27: | scene->Preprocess - [0.234%] [avg time: 0.002 ms]
08:36:27: | GPU download and conversion - [31.8%] [avg time: 0.272 ms] [children: 26.8%] [unaccounted: 5.03%]
08:36:27: | | flush - [19.4%] [avg time: 0.166 ms]
08:36:27: | | CopyResource - [6.08%] [avg time: 0.052 ms]
08:36:27: | | conversion to 4:2:0 - [1.29%] [avg time: 0.011 ms]
08:36:27: Convert444Thread - [100%] [avg time: 0.394 ms] [children: 99.2%] [unaccounted: 0.761%]
08:36:27: | Convert444toNV12 - [99.2%] [avg time: 0.391 ms]
08:36:27: encoder thread frame - [100%] [avg time: 2.986 ms] [children: 1.54%] [unaccounted: 98.5%]
08:36:27: | sending stuff out - [1.54%] [avg time: 0.046 ms]
08:36:27: ==============================================================
08:36:27: 
08:36:27: 
08:36:27: Profiler CPU results:
08:36:27: 
08:36:27: ==============================================================
08:36:27: video thread frame - [cpu time: avg 0.126 ms, total 20155.3 ms] [avg calls per frame: 1]
08:36:27: | scene->Preprocess - [cpu time: avg 0 ms, total 78 ms] [avg calls per frame: 1]
08:36:27: | GPU download and conversion - [cpu time: avg 0.054 ms, total 8736.05 ms] [avg calls per frame: 1]
08:36:27: | | flush - [cpu time: avg 0.039 ms, total 6349.24 ms] [avg calls per frame: 1]
08:36:27: | | CopyResource - [cpu time: avg 0.005 ms, total 889.207 ms] [avg calls per frame: 1]
08:36:27: | | conversion to 4:2:0 - [cpu time: avg 0.004 ms, total 639.602 ms] [avg calls per frame: 1]
08:36:27: Convert444Thread - [cpu time: avg 0.378 ms, total 60497.2 ms] [avg calls per frame: 1]
08:36:27: | Convert444toNV12 - [cpu time: avg 0.376 ms, total 60138.4 ms] [avg calls per frame: 1]
08:36:27: encoder thread frame - [cpu time: avg 1.201 ms, total 191912 ms] [avg calls per frame: 1]
08:36:27: | sending stuff out - [cpu time: avg 0.006 ms, total 1014.01 ms] [avg calls per frame: 1]
08:36:27: ==============================================================
08:36:27: 
08:36:27: =====Stream End: 2014-02-28, 08:36:27=================================================
 

BtbN

Member
Don't use the "Default" preset, it's not Default for a good reason.
It's only its name, it's not actualy the default(Yes, that IS confusing).
Use Low Latency High Quality for that resolution/framerate.
 

HypnoToadTrance

New Member
BtbN said:
Don't use the "Default" preset, it's not Default for a good reason.
It's only its name, it's not actualy the default(Yes, that IS confusing).
Use Low Latency High Quality for that resolution/framerate.

Using that preset gave the same result
http://www.twitch.tv/hypnodragontrance/b/507448301

This is a curious problem. I am pretty sure my NVENC is working fine, as I am able to use Nvidia's Shadowplay without fault, so hopefully this isn't anything related to my Graphics Card itself.
Code:
13:32:26: CUDA loaded successfully
13:32:26: 1 CUDA capable devices found
13:32:26: [ GPU #0 - < GeForce GTX 650 Ti > has Compute SM 3.0, NVENC Available ]
13:37:47: Open Broadcaster Software v0.612b - 64bit ( ^ω^)
13:37:47: -------------------------------
13:37:47: CPU Name: Intel(R) Core(TM) i3 CPU         540  @ 3.07GHz
13:37:47: CPU Speed: 3066MHz
13:37:47: Physical Memory:  8183MB Total, 4563MB Free
13:37:47: stepping id: 2, model 37, family 6, type 0, extmodel 1, extfamily 0, HTT 1, logical cores 4, total cores 2
13:37:47: monitor 1: pos={0, 0}, size={1920, 1080}
13:37:47: Windows Version: 6.1 Build 7601 S
13:37:47: Aero is Disabled
13:37:47: -------------------------------
13:37:47: OBS Modules:
13:37:47: Base Address     Module
13:37:47: 000000003FD80000 OBS.exe
13:37:47: 00000000EAB30000 OBSApi.dll
13:37:47: 00000000EBBD0000 DShowPlugin.dll
13:37:47: 00000000FB880000 GraphicsCapture.dll
13:37:47: 00000000EBBB0000 NoiseGate.dll
13:37:47: 00000000EBB10000 PSVPlugin.dll
13:37:47: ------------------------------------------
13:37:47: Adapter 1
13:37:47:   Video Adapter: NVIDIA GeForce GTX 650 Ti
13:37:47:   Video Adapter Dedicated Video Memory: 1018888192
13:37:47:   Video Adapter Shared System Memory: 3221549056
13:37:47:   Video Adapter Output 1: pos={0, 0}, size={1920, 1080}, attached=true
13:37:47: =====Stream Start: 2014-03-01, 13:37:47===============================================
13:37:47:   Multithreaded optimizations: On
13:37:47:   Base resolution: 1280x720
13:37:47:   Output resolution: 640x360
13:37:47: ------------------------------------------
13:37:47: Loading up D3D10 on NVIDIA GeForce GTX 650 Ti (Adapter 1)...
13:37:48: ------------------------------------------
13:37:48: Audio Format: 44100hz
13:37:48: Playback device Default
13:37:48: ------------------------------------------
13:37:48: Using desktop audio input: Speakers (Realtek High Definition Audio)
13:37:48: ------------------------------------------
13:37:48: Audio Encoding: AAC
13:37:48:     bitrate: 160
13:37:48: Using graphics capture
13:37:48: Scene buffering time set to 700
13:37:48: NVENC internal init finished successfully
13:37:48: NVENC supports 7 h264 presets
13:37:49: ------------------------------------------
13:37:49: Video Encoding: NVENC
13:37:49:     fps: 60
13:37:49:     width: 640, height: 360
13:37:49:     preset: llhq
13:37:49:     profile: main
13:37:49:     level: autoselect
13:37:49:     keyint: 120
13:37:49:     CBR: yes
13:37:49:     CFR: yes
13:37:49:     max bitrate: 2048
13:37:49:     buffer size: 2048
13:37:49: ------------------------------------------
13:37:49: SharedTexCapture hooked
13:37:50: Using RTMP service: Twitch / Justin.tv
13:37:50:   Server selection: rtmp://live-lax.justin.tv/app
13:37:50:   Interface: Linksys AE2500 (802.11, 163 mbps)
13:37:50: Completed handshake with rtmp://live-lax.justin.tv/app in 81 ms.
13:37:51: SO_SNDBUF was at 172032
13:37:51: SO_SNDBUF is now 65536
13:41:03: Total frames encoded: 11599, total frames duplicated: 58 (0.50%)
13:41:03: Total frames rendered: 11597, number of late frames: 3 (0.03%) (it's okay for some frames to be late)
13:41:03: RTMPPublisher::SocketLoop: Graceful loop exit
13:41:03: Average send payload: 5623 bytes, average send interval: 21 ms
13:41:03: Number of times waited to send: 0, Waited for a total of 0 bytes
13:41:03: Number of b-frames dropped: 0 (0%), Number of p-frames dropped: 0 (0%), Total 0 (0%)
13:41:03: Number of bytes sent: 50630249
13:41:03: Encoder closed
13:41:03: NVENC deinitialized
13:41:03: 
13:41:03: Profiler time results:
13:41:03: 
13:41:03: ==============================================================
13:41:03: video thread frame - [100%] [avg time: 0.835 ms] [children: 32.1%] [unaccounted: 67.9%]
13:41:03: | scene->Preprocess - [0.24%] [avg time: 0.002 ms]
13:41:03: | GPU download and conversion - [31.9%] [avg time: 0.266 ms] [children: 25%] [unaccounted: 6.83%]
13:41:03: | | flush - [16.8%] [avg time: 0.14 ms]
13:41:03: | | CopyResource - [6.23%] [avg time: 0.052 ms]
13:41:03: | | conversion to 4:2:0 - [2.04%] [avg time: 0.017 ms]
13:41:03: Convert444Thread - [100%] [avg time: 0.364 ms] [children: 99.2%] [unaccounted: 0.824%]
13:41:03: | Convert444toNV12 - [99.2%] [avg time: 0.361 ms]
13:41:03: encoder thread frame - [100%] [avg time: 4.566 ms] [children: 0.767%] [unaccounted: 99.2%]
13:41:03: | sending stuff out - [0.767%] [avg time: 0.035 ms]
13:41:03: ==============================================================
13:41:03: 
13:41:03: 
13:41:03: Profiler CPU results:
13:41:03: 
13:41:03: ==============================================================
13:41:03: video thread frame - [cpu time: avg 0.102 ms, total 1185.61 ms] [avg calls per frame: 1]
13:41:03: | scene->Preprocess - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
13:41:03: | GPU download and conversion - [cpu time: avg 0.061 ms, total 717.605 ms] [avg calls per frame: 1]
13:41:03: | | flush - [cpu time: avg 0.04 ms, total 468.004 ms] [avg calls per frame: 1]
13:41:03: | | CopyResource - [cpu time: avg 0.008 ms, total 93.6 ms] [avg calls per frame: 1]
13:41:03: | | conversion to 4:2:0 - [cpu time: avg 0.002 ms, total 31.2 ms] [avg calls per frame: 1]
13:41:03: Convert444Thread - [cpu time: avg 0.321 ms, total 3712.82 ms] [avg calls per frame: 1]
13:41:03: | Convert444toNV12 - [cpu time: avg 0.321 ms, total 3712.82 ms] [avg calls per frame: 1]
13:41:03: encoder thread frame - [cpu time: avg 1.272 ms, total 14710.9 ms] [avg calls per frame: 1]
13:41:03: | sending stuff out - [cpu time: avg 0.016 ms, total 187.2 ms] [avg calls per frame: 1]
13:41:03: ==============================================================
13:41:03: 
13:41:03: =====Stream End: 2014-03-01, 13:41:03=================================================
13:41:26: 1 CUDA capable devices found
13:41:26: [ GPU #0 - < GeForce GTX 650 Ti > has Compute SM 3.0, NVENC Available ]
 

BtbN

Member
It's possible that nvenc just doesn't like that resolution, it propably was never tested by nvidia for anything else than 720p and 1080p.
 

HypnoToadTrance

New Member
BtbN said:
It's possible that nvenc just doesn't like that resolution, it propably was never tested by nvidia for anything else than 720p and 1080p.

Being that Nvidia's own Shadowplay supports resolutions as low as 240p, I'd say it's supported.

I thank you for your assistance and hope that as solution can be found in the near future.

xq2oPp4.png
 
Top