Question / Help NVENC and .mp4/.flv problems - corruption?

MindBlank

New Member
Hey there!

I am encountering a very strange issue with OBS since I've installed it on my new gaming machine.

Regardless of me recording in .mp4 or .flv format (then transcoded to .mp4), if I want to skip to a portion of the video it just takes an awful long among of time. I have tried this is default W8.1 media player, MPC, VLC etc. Also, loading any of these videos in Avidemux 2.6.x will just not let me scrub the video file from frame to frame or I-frame to I-frame.

Something is wrong and I don't know why.

I'm running latest beta of OBS and using NVENC to encode. Tried CBR and VBR recording, same problem. Problem does not occur if using x264 encoding.

It has something to do with NVENC, because I've been using OBS with AMD VCE before and this issue is not present.

Can someone offer some input, please? I would like to be able to cut, modify etc. the files in Avidemux and I can't do it at the moment...
 
Need an OBS log file from your recording. Media Info from the file you saved would be nice too.

If I had to guess, you saved it without Constant Frame Rate on, or you used an insanely high bitrate.
 
CFR is on, CBR is on with max bitrate 11000kbps. I can switch it to 3000 kbps and the result is the same.



20:50:40: =====Stream Start: 2015-05-27, 20:50:40===============================================
20:50:40: Multithreaded optimizations: On
20:50:40: Base resolution: 1920x1080
20:50:40: Output resolution: 1920x1080
20:50:40: ------------------------------------------
20:50:40: Loading up D3D10 on NVIDIA GeForce GTX 980M (Adapter 1)...
20:50:40: ------------------------------------------
20:50:40: Audio Format: 48000 Hz
20:50:40: ------------------------------------------
20:50:40: Audio Channels: 2 Ch
20:50:40: Playback device Default
20:50:40: ------------------------------------------
20:50:40: Using desktop audio input: Speakers (Realtek High Definition Audio)
20:50:40: Global Audio time adjust: 0
20:50:40: ------------------------------------------
20:50:40: Audio Encoding: AAC
20:50:40: bitrate: 128
20:50:40: Using graphics capture
20:50:40: Trying to hook process: witcher3.exe
20:50:40: Scene buffering time set to 700
20:50:40: 1 CUDA capable devices found
20:50:40: [ GPU #0 - < GeForce GTX 980M > has Compute SM 5.2, NVENC Available ]
20:50:40: NVENC internal init finished successfully
20:50:40: NVENC supports 10 h264 presets
20:50:40: ------------------------------------------
20:50:40: Video Encoding: NVENC
20:50:40: fps: 30
20:50:40: width: 1920, height: 1080
20:50:40: preset: llhq
20:50:40: profile: high
20:50:40: level: autoselect
20:50:40: keyint: -1
20:50:40: CBR: yes
20:50:40: CFR: yes
20:50:40: max bitrate: 11000
20:50:40: avg bitrate: 11000
20:50:40: buffer size: 11000
20:50:40: ------------------------------------------
20:50:40: SharedTexCapture hooked
21:07:25: FlushBufferedVideo: Flushing 22 packets over 700 ms
21:07:26: Total frames encoded: 30135, total frames duplicated: 9 (0.03%)
21:07:26: Total frames rendered: 30138, number of late frames: 2 (0.01%) (it's okay for some frames to be late)
21:07:26: Encoder closed
21:07:26: NVENC deinitialized
21:07:27:
21:07:27: Profiler time results:
21:07:27:
21:07:27: ==============================================================
21:07:27: video thread frame - [100%] [avg time: 0.641 ms] [children: 29.6%] [unaccounted: 70.4%]
21:07:27: | scene->Preprocess - [0.312%] [avg time: 0.002 ms]
21:07:27: | GPU download and conversion - [29.3%] [avg time: 0.188 ms] [children: 24.3%] [unaccounted: 4.99%]
21:07:27: | | flush - [22%] [avg time: 0.141 ms]
21:07:27: | | CopyResource - [0.936%] [avg time: 0.006 ms]
21:07:27: | | conversion to 4:2:0 - [1.4%] [avg time: 0.009 ms]
21:07:27: Convert444Threads - [100%] [avg time: 1.745 ms] [children: 99.4%] [unaccounted: 0.573%]
21:07:27: | Convert444toNV12 - [99.4%] [avg time: 1.735 ms]
21:07:27: encoder thread frame - [100%] [avg time: 6.26 ms] [children: 1.25%] [unaccounted: 98.8%]
21:07:27: | sending stuff out - [1.25%] [avg time: 0.078 ms]
21:07:27: ==============================================================
21:07:27:
21:07:27:
21:07:27: Profiler CPU results:
21:07:27:
21:07:27: ==============================================================
21:07:27: video thread frame - [cpu time: avg 0.091 ms, total 2765.63 ms] [avg calls per frame: 1]
21:07:27: | scene->Preprocess - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
21:07:27: | GPU download and conversion - [cpu time: avg 0.041 ms, total 1250 ms] [avg calls per frame: 1]
21:07:27: | | flush - [cpu time: avg 0.036 ms, total 1093.75 ms] [avg calls per frame: 1]
21:07:27: | | CopyResource - [cpu time: avg 0.002 ms, total 62.5 ms] [avg calls per frame: 1]
21:07:27: | | conversion to 4:2:0 - [cpu time: avg 0.002 ms, total 62.5 ms] [avg calls per frame: 1]
21:07:27: Convert444Threads - [cpu time: avg 1.513 ms, total 91156.3 ms] [avg calls per frame: 2]
21:07:27: | Convert444toNV12 - [cpu time: avg 1.51 ms, total 90968.8 ms] [avg calls per frame: 2]
21:07:27: encoder thread frame - [cpu time: avg 0.47 ms, total 14156.3 ms] [avg calls per frame: 1]
21:07:27: | sending stuff out - [cpu time: avg 0.08 ms, total 2421.88 ms] [avg calls per frame: 1]
21:07:27: ==============================================================
21:07:27:
21:07:27: =====Stream End: 2015-05-27, 21:07:27=================================================
 
Here's some info about a file recently recorded:


Complete name : E:\Record\w3e.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom
File size : 1.45 GiB
Duration : 18mn 36s
Overall bit rate mode : Constant
Overall bit rate : 11.1 Mbps
Encoded date : UTC 2015-05-26 19:43:37
Tagged date : UTC 2015-05-26 19:43:37
Writing application : Open Broadcaster Software v0.651b

Video
ID : 2
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4
Format settings, CABAC : Yes
Format settings, ReFrames : 1 frame
Muxing mode : Container profile=High@3.1
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 18mn 36s
Source duration : 18mn 36s
Bit rate mode : Constant
Bit rate : 11.0 Mbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Variable
Frame rate : 30.000 fps
Minimum frame rate : 29.412 fps
Maximum frame rate : 30.303 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.177
Stream size : 1.43 GiB (99%)
Source stream size : 1.43 GiB (99%)
Encoded date : UTC 2015-05-26 19:43:37
Tagged date : UTC 2015-05-26 19:43:37
Color range : Limited
Color primaries : BT.709
Transfer characteristics : sYCC
Matrix coefficients : BT.709
mdhd_Duration : 1116033

Audio
ID : 1
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : 40
Duration : 18mn 36s
Source duration : 18mn 35s
Bit rate mode : Constant
Nominal bit rate : 128 Kbps
Channel(s) : channel0
Channel(s)_Original : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Compression mode : Lossy
Source stream size : 17.0 MiB (1%)
Language : English
Encoded date : UTC 2015-05-26 19:43:37
Tagged date : UTC 2015-05-26 19:43:37
mdhd_Duration : 1115968
 
Also, just noticed the fact that skipping to a portion of the video makes the CPU jump to 100% utilization until the video resumes playing 10-20 or more seconds later. Actually, the audio comes first, the video is still frozen for 5 seconds after the audio starts going, and then the video gets going as well.

I'm trying to describe things as accurately I can so someone can help me, because it is really annoying not being able to scrub through the video in either MPC or Avidemux, or cut portions from it or whatever...
 
Yeah, how did you manage to set your keyinterval to "-1" ? Set it to 2 seconds if you're streaming to Twitch, 5 seconds if you're just saving to your hard drive.
 
Hmmm, yeah, that kinda explains things. Actually, I haven't touched the setting, it is set to 0 which means Auto. No ideea why OBS has it set to -1 when actual encoding starts.

I will change it and the report back if the issue is fixed. Thank you for your help!
 
Back
Top