Question / Help OBS Footage lagging in Vegas (Similar ShadowPlay Footage does not)

Boildown

Active Member
Ok, that was my fault. OBS doesn't let you set a keyinterval of less than 1 second. And you thought you were setting frames, but you were setting seconds, so a 10 second keyint at 60fps = 600 frames keyint. We wanted 30, which would require a .5 second keyint. Unfortunately keyint (aka GOP size) can be defined by seconds or by frames, depending on who did the UI. And doubly unfortunately, OBS doesn't allow a .5 second keyint, something which I requested be added to the UI nearly four years ago.

So the workaround with x264 is to use a custom x264 command. Unfortunately that won't work since you're using NVEnc, not x264, and I don't know of a way to do it using NVEnc. There was a way back in the day to edit a text file with custom NVEnc settings, but that was when the feature was still in alpha/beta, and I haven't read anything about it since. The best we can do is set it to 1 second.

So the TL;DR is try setting the keyint to 1, not 10, and test again.
 

DeMoN

Member
Try using higher CQP (analogous to CRF) values than what you're using now. Obviously you don't want to use too high or you'll impact quality, but test out how much higher you can go without noticing a quality drop.
18 isnt that huge and 182 mbit is rather small too.

I would rather change this crap software to a software which is not complete garbage.
edit: While you talk about gop lengths I really wonder why OBS uses Seconds, instead frames. Seconds is so inaccurate.. and the funny thing is: The encoder parameter IS in frames. So why the OBS GUI changed it to the much more inaccurate setting : seconds? :S

edit2:
so don't have to re encode with handbrake to resync the audio
Why all people think they have to re-encode their videos with handbrake (and in addition always this specific program) to get to a constant framerate? Is it a specific youtuber which spreads things like that?
 
Last edited:

Boildown

Active Member
DeMoN has a crusade going against Sony Vegas on these forums fyi. Vegas has worked well for me in the past, but I was thinking of trying one thing he suggested. What was it called again?
 

DeMoN

Member
Not just vegas. 99% of all these timeline softwares for windows have pure garbage decoder and encoders. And this is a fact.
They still cant read higher color samplings than 4:2:0. They still cant read 10bit. Still no mkv containers. Still no multitrack audio (especially not avi, just vegas in this case is an exception woohoo), still many more formats not readable and so on. Why they just dont use ffmpeg if they're too lazy to do a good decoder??

And it continues with the encoders.
mainconcept( why mainconcept and no x264????? Just why??
Why still almost no options??
Why even still just bitrate based encoding?
[...]
Its almost as worse as shadowplay's amount of options and stupid software limits.

Never ever I would pay for such bad decoder and encoders. Adobe even ultra expensive software and is the same disaster in decoding and encoding. never would pay for that.Its a shame. Really.
 

Rip

New Member
Ok, that was my fault. OBS doesn't let you set a keyinterval of less than 1 second. And you thought you were setting frames, but you were setting seconds, so a 10 second keyint at 60fps = 600 frames keyint. We wanted 30, which would require a .5 second keyint. Unfortunately keyint (aka GOP size) can be defined by seconds or by frames, depending on who did the UI. And doubly unfortunately, OBS doesn't allow a .5 second keyint, something which I requested be added to the UI nearly four years ago.

So the workaround with x264 is to use a custom x264 command. Unfortunately that won't work since you're using NVEnc, not x264, and I don't know of a way to do it using NVEnc. There was a way back in the day to edit a text file with custom NVEnc settings, but that was when the feature was still in alpha/beta, and I haven't read anything about it since. The best we can do is set it to 1 second.

So the TL;DR is try setting the keyint to 1, not 10, and test again.

Thank you! I will try that!
 

Rip

New Member
18 isnt that huge and 182 mbit is rather small too.

I would rather change this crap software to a software which is not complete garbage.
edit: While you talk about gop lengths I really wonder why OBS uses Seconds, instead frames. Seconds is so inaccurate.. and the funny thing is: The encoder parameter IS in frames. So why the OBS GUI changed it to the much more inaccurate setting : seconds? :S

edit2:
Why all people think they have to re-encode their videos with handbrake (and in addition always this specific program) to get to a constant framerate? Is it a specific youtuber which spreads things like that?

If I render a raw Shadowplay file in Vegas by the end of the video the audio is out of sync with the video (something to do with Vegas not liking Shadowplay a variable frame rate file). I encountered this problem THEN looked for a solution which led me to find out the transcoding in Handbrake to a constant frame rate fixes the issue. Believe me, I wouldn't just transcode my captures for 5hrs per capture if I didn't have to!

Do you know of some other way to stop Shadowplay audio going out of sync in Vegas? FYI it doesn't really happen with short clips, it slowly goes out of sync and gets worse the longer the video is.
 

Rip

New Member
I haven’t forgotten about this by the way, I’m hoping to have time to make a capture this weekend.
 

Rip

New Member
Ok, that was my fault. OBS doesn't let you set a keyinterval of less than 1 second. And you thought you were setting frames, but you were setting seconds, so a 10 second keyint at 60fps = 600 frames keyint. We wanted 30, which would require a .5 second keyint. Unfortunately keyint (aka GOP size) can be defined by seconds or by frames, depending on who did the UI. And doubly unfortunately, OBS doesn't allow a .5 second keyint, something which I requested be added to the UI nearly four years ago.

So the workaround with x264 is to use a custom x264 command. Unfortunately that won't work since you're using NVEnc, not x264, and I don't know of a way to do it using NVEnc. There was a way back in the day to edit a text file with custom NVEnc settings, but that was when the feature was still in alpha/beta, and I haven't read anything about it since. The best we can do is set it to 1 second.

So the TL;DR is try setting the keyint to 1, not 10, and test again.

I think you've solved it mate, thanks! I've just tried a 26min capture with these settings and I could run the preview screen in Vegas at the highest quality and I could skip around the video no problem with no lag and with a CPU usage peaking at around 80% (averaging around 40-50%.)

Here's the file info for reference:
General
Complete name : D:\OBS Videos RAW - Copy - Copy\2017-09-26 13-11-16.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom (isom/iso2/avc1/mp41)
File size : 21.3 GiB
Duration : 26 min 25 s
Overall bit rate mode : Variable
Overall bit rate : 115 Mb/s
Writing application : Lavf57.66.102

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L5.2
Format settings, CABAC : No
Format settings, RefFrames : 2 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 26 min 25 s
Bit rate mode : Constant
Bit rate : 114 Mb/s
Width : 3 440 pixels
Height : 1 440 pixels
Display aspect ratio : 2.40:1
Frame rate mode : Constant
Frame rate : 60.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.382
Stream size : 21.2 GiB (100%)
Color range : Limited
Matrix coefficients : BT.470 System B, BT.470 System G

Audio #1
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : 40
Duration : 26 min 25 s
Bit rate mode : Variable
Bit rate : 115 kb/s
Maximum bit rate : 192 kb/s
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 44.1 kHz
Frame rate : 43.066 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 21.8 MiB (0%)
Title : Mod-Mic 4
Default : Yes
Alternate group : 1

Audio #2
ID : 3
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : 40
Duration : 26 min 25 s
Bit rate mode : Constant
Bit rate : 192 kb/s
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 44.1 kHz
Frame rate : 43.066 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 36.8 MiB (0%)
Title : Beyerdynamics DT990 Pro
Default : No
Alternate group : 1

So to sum up, I've used the exact settings in this video (but 3440x1440 instead of 1920x1080)
https://www.youtube.com/watch?v=svrpFWMkmd0&t=512s

BUT I've had to change the following settings:

Rate Control: CBR
Preset: High
Bitrate: 115000
Key-int: 1

I'm not too sure why these settings have made a difference but I'm happy that they have.

Thanks!
 

Rip

New Member
Just to add though I did get some screen tearing and some slight rubber banding/lag that I don't get with OBS off.
 

Boildown

Active Member
Cool, glad to hear it. Try the NVEnc HP (High Performance) preset if you haven't yet, to lower the GPU usage and hopefully reduce the lag.
 

PrettyP1nkUnicorn

New Member
I think you've solved it mate, thanks! I've just tried a 26min capture with these settings and I could run the preview screen in Vegas at the highest quality and I could skip around the video no problem with no lag and with a CPU usage peaking at around 80% (averaging around 40-50%.)

So to sum up, I've used the exact settings in this video (but 3440x1440 instead of 1920x1080)
https://www.youtube.com/watch?v=svrpFWMkmd0&t=512s

BUT I've had to change the following settings:

Rate Control: CBR
Preset: High
Bitrate: 115000
Key-int: 1

I'm not too sure why these settings have made a difference but I'm happy that they have.

Thanks!
I'm Sorry to bring up this old post, but I have the exact same issue. The link to the YouTube video is broken, and I learn much better by watching rather than reading, so I was wondering if you could find the video again or something.

Terribly sorry to disturb you!
 

ganjin

New Member
I'm Sorry to bring up this old post, but I have the exact same issue. The link to the YouTube video is broken, and I learn much better by watching rather than reading, so I was wondering if you could find the video again or something.

Terribly sorry to disturb you!

I also just ran into this problem, OBS files in Vegas are super slow compared to shadowplay files. The youtube link broke sadly...
 

rockbottom

Active Member
If you're encoding B frames with OBS, don't.

Make sure hardware acceleration is enabled correctly in Vegas.

Lower the Preview window quality in Vegas if your hardware still struggles.
 

ganjin

New Member
If you're encoding B frames with OBS, don't.

Make sure hardware acceleration is enabled correctly in Vegas.

Lower the Preview window quality in Vegas if your hardware still struggles.
Thank you, what seems to help is to put Keyframe Interval to 1 (was 0 before). B-Frames is 0
 

rockbottom

Active Member
Cool, same as I use when I'm not in the Custom Output. You will also get the same results with the Keyframe Interval @ 2 as well.
 

ganjin

New Member
Not sure what the difference would be between 1 and 2 quality wise but 1 helps with scrubbing and playback right now
 

ArcherAC3

New Member
My brother in Christ, I'm pulling my hairs out trying to figure this out.
I use VSDC for video editting and I'm having the exact same issue, even a lower bitrate and resolution OBS videos lags a lot in the editor preview, while Shadowplay works flawlessly. It's terrible.

Is there any fix for this?
 

paprikastaude

New Member
This has been irritating me since I got a new PC. OBS footage from my old computer is previewed smoothly, but new OBS footage from my current one is laggy and often crashes Vegas - regardless of what encoder I use in OBS.

What version of Vegas do people here use? I'm on Vegas 19 (Steam), but I now tried changing back to Vegas 14 and weirdly enough, the previews for my new OBS footage run without problems there...

I was thinking about maybe upgrading to Vegas 21 in the next Steam sale, in hope that they fixed this issue there, though I also don't want to waste money finding out that it still lags.
 
Top