OBS video feed freezing near start of livestream

goodzyk

Member
Hello - need some help diagnosing the issue causing a livestream video freeze with our church services and new basic setup. We have a PTZoptics gen 2 camera using hdmi thru a startech capture card hdmi to usb3 into our computer which is an i7 16g ram wired ethernet laptop windows 10 setup streaming to youtube live

audio is via a different behringer usb mixer and continues in the livestream, but the video stops...have tried various fixes with camera on/off, changing source properties on capture device to obs virtual camera then back to device...one way or another i manage to get the video back but it takes time, plus the scene sometimes changes from fit to screen to letterbox etc...so much fun on the fly :/

Once the first say ten minutes of the stream have gone thru no more freezing issues surface. CPU about 50% utilized, RAM about 40%.

Startech tech rep states the capture device is compatible with OBS tho they prefer streamcatcher pro of which i dont have a clue.

am attaching a log file below or added -any thoughts welcome - am not a full techie...
 
Ugh on the ultra-low power laptop CPU, optimized for battery life, not the computationally demanding task of real-time video encoding. Beware thermal throttling

What is the story with selecting custom video format of
09:18:17.745: format: I444
no point really, I'd think, for that color space with the low bit rate stream you have. but maybe I'm way off base. put that back to default
I could be wrong, but I suspect this color space setting is the main culprit of your trouble (combined with wrong too (CPU/system) for real-time video encoding, but with proper settings should be fine)

Rescaling has CPU impact. Have you tested keeping output at 1080p and what overall impact that has?

Speaking of which, are you upload bandwidth constrained hence keeping to such a low bitrate? I was streaming HoW 720p at 5000kb/s, and now 1080p at 7+Mb/s. Unless you are really limited, I'd up that bitrate (assuming other fixes made such that system stable and able to handle it). And of course, either Quality of Service constraints on all other users, or better yet throttle/don't allow anything else to use your WAN link during livestream (ie no office PCs on, nor Guest WiFi.. again, unless on separate circuit or throttled)

Why is Win10's Game DVR mode on? [it is by default, silly M$]

Your log shows a number of Mic and Video capture device failures. Did you create extra, not use but not delete them? I'd recommend some clean up if that is the case. can't be helping matters

One more thing to consider, all Content Delivery Networks (YouTube, Facebook, etc) heavily compress upon re-encode videos. *IF* you want a good recording for future use, be sure to locally record (though again, watch hardware resource utilization)

Oh, and basics of OS operation - make sure PC booted up and has plenty of time to fully settle down before streaming (at least 10 min, maybe more?) And you may need to turn off unnecessary background processes/apps, and disable performance impacting eye candy MS enabled to streamline Windows OS. And check for thermal throttling.. make sure decent airflow around laptop, especially any air vents if any
 
ok here are my thoughts:
-yes laptop not optimal - its a one year old thinkpad but its what we have - only used for livestream and sermon/youtube setup.
-customer video format? no clue why - will put to default
-rescaling - will test your idea out
-bandwidth...initially we were running on wifi (i know bad idea) so kept that low but now can increase...to ? also have audio bitrate at 128-does it make a difference to increase that?
-WAN link- supposedly we are on a separate circuit along with one pc in the office that i can ensure minimal processes are running.guest wifi supposedly on a separate circuit but will check.
-Win10 DVR? sigh.
- very good point on giving longer boot time to pc- have sophos anti virus that is a ram and cpu hog especially on pc startup....and extra capture devices need to be cleaned up.

appreciate your comments.
 
-bandwidth...initially we were running on wifi (i know bad idea) so kept that low but now can increase...to ? also have audio bitrate at 128-does it make a difference to increase that?
bitrate to go to depends on
a. upload bandwidth you have to work with (leave a decent amount of headroom, just in case.. ie don't try to get to 80%+ of upload limit without a LOT of testing.
b. your resolution .. so I used 5mb/s for 720p which is a bit overkill, and am targetting maybe 8->10Mb/s (again a little overkill) for 1080p. There are charts out there on recommendations.
but
c. OBS PC capability - higher bitrate = more work for laptop .. so you'll have to balance.

FYI - I'm streaming 1080p to FB at 7200 bitrate on a 10mb/s upload limit circuit. and I'll probably bump that up a little

As for audio - beware ingest guidance by provider. Facebook for example specifies 128-bit audio, and not higher (iirc). For higher quality audio, read up on enabling Core AAC (which I haven't done). Supposedly, It's purely an audio quality improvement over the built-in OBS AAC encoder. If you'd like to install CA, here's a guide: https://obsproject.com/forum/resources/obs-studio-enable-coreaudio-aac-encoder-windows.220/
short version - no, for your use case, and in general, no need to have higher audio rate setting than 128-bit, if allowed at all (provider dependent)

But beware changing too much at once. Hopefully fixing the custom color space will resolve your issue, and the other clean up mentioned being a more "Cross the T's, dot the I's" sort of thing.
 
trial number 2 - made some changes to color space, resolution, slightly higher bit rate and again had the video feed freeze - changing the feed choice on the capture device this time or deactivate/activate did not seem to help, rather rebooting the camera second time seemed to do the trick (although the camera during the feed freeze was responding to preset changes via the ir remote). Youtube screen says exellent connection.
also - dynamic bit rate is on - should i turn off?
 
-for some reason when i try to recommence the video capture device (to try and deal with freeze) and switching to obs virtrual camera and back, the fps changes to 60fps instead of the previous setup of 30fps (same as camera) any clue how that would happen...
 
Your video format is still the VERY (apparently exceedingly) demanding format of I444. Why?
Much more common (and I'd recommend to start with (default?), which would be something closer to)

21:35:11.904: video settings reset:
21:35:11.904: base resolution: 1920x1080
21:35:11.904: output resolution: 1920x1080
21:35:11.904: downscale filter: Bicubic
21:35:11.904: fps: 30/1
21:35:11.904: format: NV12
21:35:11.904: YUV mode: 709/Partial
 
thank you - i did change the settings before streaming at 9;12;15 - had an initial video freeze at 9;17;03 before streaming which i tried to fix by toggling to obs virtual camera and back but for some reason settings changed at 9;23;32 and msg about fallback to qsv encoder which i dont understand.
stream start at 9;23;35 and then froze which i tried to fix.
-have another short service today and will see if fixes will work.
 
Hmm, did you actually stream anything during that test. The log is odd as it doesn't have the normal ending....
How did it go?

looking for minor things as key performance metrics not in the Trial 3 log above

Why 2 speakers defined? is that a mistake, or intentional? no problem if intentional
11:48:41.107: WASAPI: Device 'Speakers (2- USB Audio CODEC )' [48000 Hz] initialized
11:48:41.107: [Loaded global audio device]: 'Desktop Audio'
11:48:41.120: WASAPI: Device 'Speakers (2- USB Audio CODEC )' [48000 Hz] initialized
11:48:41.120: [Loaded global audio device]: 'Desktop Audio 2'

This may or may not be normal (not my area, but seems odd to me)
11:48:41.787: Video Capture Device 2: data.GetDevice failed​
11:48:41.787: Video Capture Device 2: Video configuration failed​
11:50:17.188: Video Capture Device 2: data.GetDevice failed​
11:50:17.188: Video Capture Device 2: Video configuration failed​
11:50:44.720: Video Capture Device 2: data.GetDevice failed​
11:50:44.720: Video Capture Device 2: Video configuration failed​
11:51:34.488: Video Capture Device 2: data.GetDevice failed​
11:51:34.488: Video Capture Device 2: Video configuration failed​
11:51:45.673: ---------------------------------​
11:51:45.673: [DShow Device: 'Video Capture Device 2'] settings updated:​
11:51:45.673: video device: OBS Virtual Camera​
11:51:45.673: video path:​
11:51:45.673: resolution: 1920x1080​
11:51:45.673: flip: 0​
11:51:45.673: fps: 30.00 (interval: 333333)​
11:51:45.673: format: NV12​
11:51:49.322: ---------------------------------​
11:51:49.322: [DShow Device: 'Video Capture Device 2'] settings updated:​
11:51:49.322: video device: UVCHDCAP, Video Capture​
11:51:49.322: video path: \\?\usb#vid_1164&pid_757a&mi_00#6&392ee435&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global​
11:51:49.322: resolution: 1920x1080​
11:51:49.322: flip: 0​
11:51:49.322: fps: 60.00 (interval: 166666)​
11:51:49.322: format: YUY2​
11:55:47.923: Settings changed (stream 1, outputs)​

Do you know why Video Capture Device 2 is not initially working, then within seconds is?
And unless you use the OBS Virtual Camera for something else, I'd disable it as others have been tripped up by unexpected behaviors in the background
Do you have the camera/device configured in OBS to stop processing when not in use? [sorry not in front of OBS so don't have exact phrase/setting name] In this case (assuming PTZ camera you want to switch to at any moment and have available), I wouldn't use that setting

as for this line,
11:55:50.454: >>> nv12 tex not active, fall back to old qsv encoder​
I'm not a user of QuickSync (I have desktop with Turing NVENC for video encode and decode offload), so I'm not familiar with latest recommended settings. There should be plenty of recent posts in this forum that go into more detail

Finally, is there a reason the camera is sending using format: YUY2 ? was that the default? if not, why was it changed?
 
thanks for your comments and help:
  • the livestream went well, the first log is the live stream starting about 7 min in from opening obs - the second log is the fixes /cleanup which i then closed OBS and then reopened to make it easier for me to follow the livestream log.
  • before the livestream i did have a camera freeze i think around 11.51;34. what i have been using as a fix (rightly or wrongly) is going into the video capture device properties, toggling device to obs virtual camera and then back to my actual device UVCHDCAP. and it brought the video back....unfortunately what that seems to do is change some of the default video settings to to this YUY2 format and 60 fps instead of 30....the stream worked but i need to learn/use a different workaround to not screw up the video settings.
  • not sure what the 2 speakers part is - the audio device is a USB in Behringer 12 channel mixer so guessing thats what the driver is called? the desktop audio devices are turned off/muted.
  • not sure on the stop processing when not in use - will have to look into.
  • the nv12 tex not active fall back to old qsv encoder kicked in at start of stream...perhaps due to my toggling and the settings becoming mixed up. will look into
  • a question- on the output encode settings it gives me two choices - a hardware one (QSV)which is being used... and the software x624...is the hardware one my capture device ?
 
  • a question- on the output encode settings it gives me two choices - a hardware one (QSV)which is being used... and the software x624...is the hardware one my capture device ?
No, QSV = Intel's Quicksync, which in this case would be what I'd start with vs software which is CPU... both are CPU, but QuickSync uses some aspects of GPU hardware on the CPU, so for general use case like this, most likely preferred (some offload from CPU cores)... but not my area of expertise..
 
so i hadnt gone in to output advanced settings before - went in - using the hardware quicksync encoder and found target usage rate(CPU?) was set to normal which is worse for the cpu and guessing contributed to any video freeze issue - so have set that to fast now and maybe should go to very fast...also keyframe interval is showing as 3 seconds so will adjust that down to 2 perhaps as i see recommended? CPU usage via task manager seems ok at less then 40 total during the stream
 
Back
Top