Livestreaming with IP Cameras

jpicwin

New Member
Hopefully this is in the right place.

I'm trying to livestream church services since COVID and I've been having some trouble with OBS holding on to the camera's RSTP feed. Started out with a Dahua DH-SD29204UE-GN on a tripod (ghetto but worked fine) and transitioned to a properly wall mounted Amcrest IP4M-1053EW. Works great for about 5 minutes then the RSTP stream drops out. The only way to get it back is to either restart OBS or the PC itself. What can I do to keep this from happening? Should I add the camera(s) as something other than Media Source? I get the feeling that I may be overloading something because both cameras cut out but even using the Amcrest by itself does it so I don't know.
 

Lawrence_SoCal

Active Member
Have you used Windows Task Manager (Performance tab) or Resource Monitor to monitor your PC resource usage (CPU, GPU, RAM, Disk & Network I/O, etc)?
 

jpicwin

New Member
Have you used Windows Task Manager (Performance tab) or Resource Monitor to monitor your PC resource usage (CPU, GPU, RAM, Disk & Network I/O, etc)?
I'm watching it right now and everything seems fine. CPU utilization is around 75%, GPU isn't being used, temps look ok, memory is fine. Resource Monitor says I'm not hitting 10mbps on the network so I think I'm good there too. I ran a test for about an hour beforehand and didn't have any issues but now it's cut out again.
 

Lawrence_SoCal

Active Member
That is a relatively high CPU utilization (maybe ok, maybe not... depends). Do you not have a GPU that would support encoding offload?
Are you also watching Disk I/O?

Without knowing better, and with that high a CPU utilization level, I could see you doing something like changing OBS scene, playing a pre-recorded video, or something (maybe even not OBS related), and either CPU spikes, or maybe start getting disk I/O latency, then the RSTP stream 'trips'... and it is at the OS connection layer/level. *if* you knew the exact process, you could kill/restart it. Or Logging out/back in. Restarting the PC itself .. if truly required.. means OS unstable (could be app caused, not OS fault... again... depends. And OS maybe fine, and you just don't know how to fix at app level (or the app itself is poorly written and can't recover).. Sorry, I'm using Panasonic PTZ camera and their virtual USB software vs using a NDI plug-in, or other/similar.. so I have something on the PC running, other than OBS, handling the video stream

Are you RTSP straight into OBS? if yes, sorry I can't comment - I have no experience with that and its relative stability/maturity/compatibility. Have you tried another RTSP receiver s/w on the PC and checked for stable connection? ie, maybe it isn't OBS?
 

jpicwin

New Member
That is a relatively high CPU utilization (maybe ok, maybe not... depends). Do you not have a GPU that would support encoding offload?
Are you also watching Disk I/O?

Without knowing better, and with that high a CPU utilization level, I could see you doing something like changing OBS scene, playing a pre-recorded video, or something (maybe even not OBS related), and either CPU spikes, or maybe start getting disk I/O latency, then the RSTP stream 'trips'... and it is at the OS connection layer/level. *if* you knew the exact process, you could kill/restart it. Or Logging out/back in. Restarting the PC itself .. if truly required.. means OS unstable (could be app caused, not OS fault... again... depends. And OS maybe fine, and you just don't know how to fix at app level (or the app itself is poorly written and can't recover).. Sorry, I'm using Panasonic PTZ camera and their virtual USB software vs using a NDI plug-in, or other/similar.. so I have something on the PC running, other than OBS, handling the video stream

Are you RTSP straight into OBS? if yes, sorry I can't comment - I have no experience with that and its relative stability/maturity/compatibility. Have you tried another RTSP receiver s/w on the PC and checked for stable connection? ie, maybe it isn't OBS?
I'm running an i5-2500k with an RX480 and 8GB RAM on Win7. Probably not the most efficient setup but I'm working with what I had laying around the house to minimize cost. I am RSTP'd straight in to OBS. Looking at the metrics, everything seems fine. Disk I/O isn't super high as I'm not recording, just streaming but it is an older HDD so it could be an issue.
 

Lawrence_SoCal

Active Member
That is an 8 generation old CPU, and a HDD, and your doing video encoding... yea, a lot to ask of an old PC. You have to ask yourself what spare parts you could use to test for better performance (SSD, RAM, GTX GPU with NVENC offload support), and whether worth it on such a system (for this purpose.. my primary PC 2 generation older than yours, but multiple SSDs, 24GB RAM, and not doing any gaming/phot/video editing on it). Might you be able to optimize your setup to work with what you have.. maybe, ... I don't know.
Good luck
 

jpicwin

New Member
That is an 8 generation old CPU, and a HDD, and your doing video encoding... yea, a lot to ask of an old PC. You have to ask yourself what spare parts you could use to test for better performance (SSD, RAM, GTX GPU with NVENC offload support), and whether worth it on such a system (for this purpose.. my primary PC 2 generation older than yours, but multiple SSDs, 24GB RAM, and not doing any gaming/phot/video editing on it). Might you be able to optimize your setup to work with what you have.. maybe, ... I don't know.
Good luck
Looks like it was a resource issue. I offloaded everything else and I'm just running OBS now and it seems to be doing fine. I might grab a better CPU and SSD if I can find something for cheap. Thanks for the help!
 

Lawrence_SoCal

Active Member
I tried to livestream a house of worship service mixing various pre-recorded videos and live video (from USB webcam).
With a clean Win10 install, reasonably optimized Win OS config, nothing in background, but non-optimized OBS setup, a 2016 gaming laptop with 8GB RAM, SATA SSD Win 10 Home edition, Intel Core i5-6300HQ @ 2.3GHz (4c/4t) released Fall 2015], and Nvidia GeForce GTX 960M
chocked terribly when trying to stream
Many month later, and better OBS understanding, I might have been able to get that laptop to work.. maybe... wasn't worth it to us.. We get pre-recorded videos from different folks from 720p to 4k and wasn't worth effort to re-encode every video in advance to something older laptop could handle...
So not surprised a resource issue on such an old CPU.
 

Superfly

New Member
I tried to livestream a house of worship service mixing various pre-recorded videos and live video (from USB webcam).
With a clean Win10 install, reasonably optimized Win OS config, nothing in background, but non-optimized OBS setup, a 2016 gaming laptop with 8GB RAM, SATA SSD Win 10 Home edition, Intel Core i5-6300HQ @ 2.3GHz (4c/4t) released Fall 2015], and Nvidia GeForce GTX 960M
chocked terribly when trying to stream
Many month later, and better OBS understanding, I might have been able to get that laptop to work.. maybe... wasn't worth it to us.. We get pre-recorded videos from different folks from 720p to 4k and wasn't worth effort to re-encode every video in advance to something older laptop could handle...
So not surprised a resource issue on such an old CPU.

would you mind sharing how you got the amcrest IP4-10xx / RTSP working in the first place ... Struggling here and cant get it to work.

at the moment I am trying to add this : rtsp://username:pass@192.168.1.41:554\videoMain intoOBS as a MEDIA SOURCE.. but can get it to work. (un/pw are different obviously)
thanks
 
Top