Playing movies during livestreams causes major issues

joelgraff

New Member
I'm currently using OBS to broadcast live performances which sometimes require playing movie clips. The performances are both recorded locally and livestreamed.

The main system is a Win10 box which takes a external feeds from a PTZ camera and a Presonus mixer.
The Win10 system runs presentation software alongside and OBS. OBS captures the persentation software's video output along with the external feeds andrecords them to disk.
At the same time, it's streamed using NDI to a second Linux system. This system, also running OBS, produces the livestream of the performance.

I use two separate systems as a redundancy. Should OBS on the Linux system fail (requiring a restart) the local recording on the Win10 system will be preserved. Likewise, should the Win10 session fail and require a restart, while video will be lost both locally and online, the livestreams will not terminate for the viewers.

The problem is, if I play a video on the Win10 system during the livestream - either as a media source from OBS or as a video from the presentation software, it causes a *very* strange buffering issue. That is, once the video is done playing, the stream video will reset to moments before the video palyback began, and the audio from the video that was just played will be heard, playing again from the beginng. So the viewers at home will end up seeing the camera video feed from (potentially) several minutes beforehand, while hearing the audio track of the video that was just played.

The only way to correct it is to shut down OBS on the Win10 system and restart. It only causes a 30-second interruption in the stream (if I can close it out and restart it quickly), but it's not at all desirable behavior.

I do not have logs handy. I will update the post to include them as soon as I can get them (perhaps in the next day or two). Otherwise, I have no idea where to begin troubleshooting this.
 

Tomasz Góral

Active Member
For backup system, i think you need double physic device who record paraller without NDI.
OBS stop working (on my computers) only if hardware is not stabilize e.g. CPU or MoBo overheat.
My longest stream with 3 cameras lasted 17 hours without break.
Some time i record on cameras for secure.
 

joelgraff

New Member
Here's what's happening:

I have a scene set up that's capturing camera video and audio, which is being recorded to disk and streamed to another computer via NDI.

If I play a movie, when it's done (and I return to the previous scene with the camera view), the camera video feed is queued, so I'm seeing what was happening when the video began, not what's actually going on. That means, if I play a video that's five minutes long, when I return to the camera scene, I see the video feed form five minutes ago! Never mind the fact that the movie audio starts playing again because, of course, that was the audio that was occurring five minutes beforehand.

I tried playing the video through a presentation software on the same machine and have OBS just capture the window as a source, thinking maybe it was a bug in the media source widget, but it had the same effect. I disabled NDI and tried again with no luck, either.

It does appear that the video feed "catches up", but the longer the video plays, the longer it takes to catch up. With a five minute video, I can't bear to let that happen on a live stream, so I'm forced to shut down OBS, killing both the stream and local recording and restart it.
 

joelgraff

New Member
For backup system, i think you need double physic device who record paraller without NDI.
OBS stop working (on my computers) only if hardware is not stabilize e.g. CPU or MoBo overheat.
My longest stream with 3 cameras lasted 17 hours without break.
Some time i record on cameras for secure.
It's not a backup system. I run two different machines to separate the streaming machine from the recording machine, that way if the streaming fails, the live recording is not affected. If the recording machine fails, it will affect the streaming machine, but at least it won't kill the streams on the platforms - they'll just go blank while I restart the recording machine's version of OBS. I have to use NDI to send the recording machine's output to the streaming machine, though it would be nice if I could bypass that.

In any case, it's not the cause of the problem here, it seems.
 

Tomasz Góral

Active Member
You have 2 computer and upload only one log why ?

I never hear about crash good computer.
Years use OBS on one computer to streaming and recording.
I have many computers and crash only after hardware problems e.g. bad radiator on CPU.

I use NDI and never see lag 5 minutes, is not possible, typical lag for NDI is 150 ms.
 

joelgraff

New Member
The computer that's causing the problems is the first in the chain. Whether or not the second computer is running is not relevant here - I tested it with the second computer disabled to the same effect, therefore I uploaded only one log.

NDI is not causing the problem. It is reasonably clear to me that OBS buffers the live camera video source and it is that buffer which is getting replayed when switching away from a movie back to the camera source / scene. I have no idea why, but I have only two options to correct it:

1. Let the buffer play itself out (after which it will "catch up" and display the current video being sent by the camera)
2. Shut down and restart OBS to flush this buffer.

I'm reasonably certain this is not a hardware issue. It's a software buffer inside OBS that's getting replayed when switching away from a movie.
 

joelgraff

New Member
when i read this i saw the CPU usage in RED
Unfortunately, I really am not sure what you're talking about - I couldn't find anything in the log that suggested the CPU was over-utilized... The machine is running an i7-4940K 4GHz, far more than capable of running this setup. CPU utilization is generally somewhere in the 10% range.

This isn't a lag issue - certainly not because of "old" equipment. It's a video buffer that's being replayed and I have no explanation for it. I may have a setting enabled somewhere that's triggering it, I really don't know.
 

Tomasz Góral

Active Member
Ok the problem is not NDI.
Run multiview in OBS, change scene, watch in multiview.
OBS itself don't buffer any video stream (watch memory).

Look on line:
10:23:52.544: restart_on_activate: yes

Why you select this option ?

For test i suggest run OBS with minimal scene (run new profile) and check IP Camera with played video file.
 

Lawrence_SoCal

Active Member
Unfortunately, I really am not sure what you're talking about - I couldn't find anything in the log that suggested the CPU was over-utilized... The machine is running an i7-4940K 4GHz, far more than capable of running this setup. CPU utilization is generally somewhere in the 10% range.

This isn't a lag issue - certainly not because of "old" equipment. It's a video buffer that's being replayed and I have no explanation for it. I may have a setting enabled somewhere that's triggering it, I really don't know.
I can't image a 4th gen i7, doing NDI, only running at 10%. on a laptop i5 6th gen, with NVENC GPU, doing only USB webcam and powerpoint windowed slide show, along with pre-recorded videos failed miserably as CPU and GPU were both overrun
So I got a new desktop PC with i7-10700K and GTX 1660 Super, and all has been well.

real-time video encoding is demanding, and your setup is possibly doable demanding depending on whether OBS stream output is used directly, with minimal wrapping done to encapsulate into NDI stream... or whether more CPU demanding, or ??
I get having the 2nd PC... but I suspect there are much easier approaches to keeping stream up with a 'sorry, technical difficulties' page {or similar}... the details for accomplishing that depending on target platform, and other details.

So, unless you are well versed in hardware monitoring on Win10 (Task Mgr / Perf tab and/or Resource Monitor, including knowing how exceeding RAM thresholds can cause disk i/o issues, etc) I suspect your old CPU simply isn't up to the task. Now, getting a NVENC GPU (ideally a GTX 1650 Super or higher) should help with encoding offload, but may not be worth it on that old system (but if you have or can get a used one to test with?)
Also, if possible/practical, make sure those pre-recorded videos are using GPU offload to decode/play
 
Top