Problems with Youtube and delay in audio

Organist

New Member
Hello all. I have not found an appropriate thread for my topic.
I've been streaming our Sunday morning service on Youtube with OBS for almost two years now without any problems. Unfortunately, since mid-November, I've had a 0.5-1sec delay between audio and video. Usually we have 180ms latency between picture and audio, which is also corrected via the advanced audio settings.
Now I have made on Wednesday once a test, where picture and sound was again synchronous to receive on Youtube. Likewise, the recording of OBS was without failures. I have opened all programs that usually work on Sundays also active. But everything ran fine.
Today was again such a strong delay between picture and sound. Where can something like this come from? We have a 50,000 kbit/s fiber optic line in the church and so far we have no interference there. The computer has a CPU load of 40-50%.
It's just strange that there are problems on Sundays, but not on Wednesdays. (Moving the service because of this is not an option :-) )

I have no ideas how to solve the problem.
 

SuperWhisk

New Member
Where do you get your audio from? If it's a digital sound board, where you using the exact same scene (collection of sound board settings, not an OBS scene) on your Wednesday test as you were on Sunday? Many boards have a delay function that could have been turned on by accident.
I do the same thing as you for my church, and I know there can often be a lot of moving parts compared to what I imagine is the more common use of OBS which is to stream or capture videogames or other software.
I would recommend very carefully itemizing each "link in the chain" between the source of the audio (and video) and OBS and make absolutely sure your test scenario is in fact the same as Sunday Morning. In my experience, the issue is rarely OBS (especially if the CPU usage is only at ~50%, though be sure to check the GPU usage too!). If you want to rule out network issues (also not likely) check and see if the delay is still present in output recorded by OBS directly to your local disk. Also double check all your audio sources in OBS and make sure the delay adjustment is the same on all of them. Finally, make sure you are monitoring the audio directly from OBS using the "monitor and output" option and not via the stream page on YouTube (I did that once by accident), or from the sound board.
If none of these suggestions help then perhaps you could share more details about your setup (software, hardware, how things are connected, etc).
 

Organist

New Member
Thank you for your quick response. I will get the log file and post it here.
For audio we use Behringer X32 via USB and I used the same scene. There is no difference.
The test on Wednesday I recorded to hard-disc: no problems. But we usually don't record the videos on Sunday. I will do it next service. GPU power is usually less than 30-60%
 

konsolenritter

Active Member
Audio is later.
Thats a bit unusual, cause video signals thru hdmi, ip, grabber need more time and buffer to enter the system most often than audio.

CPU usage of 40-50% and GPU between 30-60% renders ME a bit nervous. You should know that things like gpu usage are averaged over a short period. When we see 60% in average, this could mean short outage of gpu ressources in between. When ressources are blocking, the according thread will be delayed. The same is valid regarding the cpu stuff. This often leads to increasing buffer sizes regarding audio.

Due to the fact that handling usb stuff and audio belongs to the cpu alone, we may know more when you provide the regarding obs-log then. Please try to deliver the whole obs-log, that is:

- Make a streaming or recording showing the issue.
- End recording/streaming.
- Close OBS!
- Reopen OBS once after a couple of seconds.
- Use the "send last log" from the menu.

If you remember the exact time of former stream with issue and didn't start OBS more than nine times till then, you may find the complete log under the path given above already.
 
Last edited:

Organist

New Member
Oh, Entschuldigung. Audio ist 1-2 Sekunden früher!
GPU: I will check the power, I didn't looked right onto it.
 

konsolenritter

Active Member
Oooh, okay. Also andersrum.
We need to know more now about your camera setup, routing, cabling and how the video signal enters your machine. Additional to the obs-log.
 

Organist

New Member
This is my Lock with problems on sunday service
 

Attachments

  • 2021-12-19 09-48-03 - Kopie.txt
    19.1 KB · Views: 43

Organist

New Member
In the log-file are thousend of same lines:

21:35:15.648: Error decoding video
21:35:15.680: warning: Found EOI before any SOF, ignoring
21:35:15.680: fatal: No JPEG data found in image

But this errors are in Wednstday and sunday.

My GPU is while streaming round about 25-31%.
CPU ~35%
My camera is any sony camcorder, with a miracast hdmi-USB grabber. There was no change since 2 years. So we have only the grabber for the latency, no video-console ore something else.
I have a different, cheaper HDMI grabber and could change for test.
We use a Intel nano PC, i5.10210U
16GB RAM
222GB SSD
Win 10
 
Last edited:

Organist

New Member
The other HDMI-grabber has shorter latency, only 120ms. But in this test, I have not so NO latency like on Sunday. Now, everything is okay.
 

konsolenritter

Active Member
Hhm.

Your PC has an U-model cpu, which is quite weak for OBS. Instead of a real GPU there is an iGPU, an integrated graphics card.
And your sound devices have different samplerates, which fosters latency and buffer problems alot!

More can't be said cause both of the OBS-logs does not contain any streaming or recording session. *seufz*
The logs seem uncomplete a bit.
 

Organist

New Member
Thank you for looking in the log.
I will adjust the sample rate. I also saw that they are not the same.
Would I have to set up something else that even more information is logged? Since I haven't changed anything regarding the log, these should be the default settings.
The many error messages are also not a problem? They are present in both logs. Both Sundays also Wednesday or also like today.
 

konsolenritter

Active Member
Teams and zoom are demanding as well, as all these programs compete together with obs for the ressources of this lean cpu.
Do you have possibilites to try some different more capable machine instead?

Regarding your question: Yes, those many error-msgs are a problem, too - at least as they strain the cpu and i/o system further. Did you tried different settings in the mirabox's source dialog?
But i've no answer on that. Possibly one of the collegues reading here.
 

Lawrence_SoCal

Active Member
Assuming you left the OS with common settings, What has changed in the last 2 years is Windows OS updates. And MS hasn't been doing well with code quality in years. So... any number of updates could cause issues. Or more likely, is changes to Apps like Teams and Zoom... both of those have changed a lot, especially if you run one or both during services.

Are you using Task manager’s Performance tab and/or Resource Monitor to check hardware resource (CPU, GPU, RAM, Disk I/O, etc) utilization to see if your system is being maxed out with your settings? When you indicate CPU and GPU usage, is that from the OBS stats monitor, or from a tool watching the overall system?

I shudder at thought of using a U model CPU for real-time video encoding.... but at least its 10th gen, so seems doable. But, definitely make sure unnecessary stuff isn't running in the background (like OneDrive, Google Sync, Dropbox, etc). And maybe turn off some of the Win10 eye-candy (functionally irrelevant default settings)?

I'd suggest
- fixing the audio sampling rate as noted, and that load of error messages.
- then run a recording session at least a minute or two (preferably longer), then for a quick before posting here submit the log to OBS Log-Analyzer
 

Organist

New Member
Hello and thank you for the feedback.
Now if a possible unclean Windows programming through updates is causing problems to the system, I could understand if I always had a latency between picture and sound when streaming. But then I could possibly get those under control. But apparently I only get the problem on Sundays. Hopefully not on Christmas Eve during the Christmas service.
I have so far always set the shortest latency on Youtube and will switch back to the normal latency.
The load of CPU and GPU I have from the Windows display (Task Manager) and should be correct. The CPU load of OBS shows me something completely different, it is much too low.
My last two test sessions were already 30-45 minutes long and at the end everything was still in sync.
 

Lawrence_SoCal

Active Member
I have so far always set the shortest latency on Youtube and will switch back to the normal latency.
Note, that latency has to do with YouTube re-encoding your video (it does so for all videos to redistribute to more bandwidth efficient codecs). And that latency impacts the speed at which your viewers see it at home. Dose cutting a few seconds off the latency make any difference? usually not, unless your priest/worship leader is practiced in engaging the online community, getting responses and reacting to those responses [and that is rare, in my experience]. For us, normal latency and higher video quality is more important than cutting the video redistribution time by a few seconds.
NOTE - YouTube latency has nothing to do with anything taking place on your OBS PC (and not audio/video sync)

And if you are doing YouTube, I'd without knowing better advise against running Teams, Zoom, or anything else at the same time [due to both system load implications, and the desirability for a single remote community comment area vs multi-broadcasting and creating separate pockets of community]. Again, said without knowing your specific circumstance.. ymmv

As noted above, Audio typically, being much smaller in bits (bandwidth) than video, processes much quicker. IF audio is slower than video, my suspicion is an overloaded PC. You mentioned CPU load not being that high, but with a U model laptop, it is possible thermal throttling is impacting you (ie 60% CPU is actually 100% of available performance?? no idea what actual limit is under sustained load for your system) Make sure good airflow is available, if any air vents on bottom of laptop that they aren't blocked (ie laptop lifted so at least 15mm open space below air vents... but then again a U model, running at low power may not have air vents... )
Another possibility is an overloaded USB Root Hub (in which case, re-arranging which USB ports are used for video capture vs audio? or are you using a docking station?

The
The load of CPU and GPU I have from the Windows display (Task Manager) and should be correct. The CPU load of OBS shows me something completely different, it is much too low.
OBS Stat CPU load is indicating the OBS main process ONLY CPU utilization... and really, for the most part who cares? It is overall system load with other apps, plugins, cameras, filters/effects that matters. So I ignore the OBS Stats window in regards to H/W resource utilization. But I do watch that Stat display for encoding or rendering lag, and other details.

As for Wed vs Sun service streams: what is different? are you using Teams/Zoom or something on Wed, and not on Sunday? How often is the PC rebooted? With a clean, locked down PC, my rule-of thumb is logging out (not locking/hibernating) daily, with a weekly reboot. With our HoW dedicated streaming PC, it is shut down after each service (with a script I wrote that allows time (hours) for cloud sync of that service's locally recorded video) . And that PC is booted up 2 hours before a service, allowing plenty of time for all background processes (ex App and Windows Update to check, etc). Is there something in the boot time/process between Wed and Sun services? I mention these as one of many possible reasons your PC will behave differently on one day vs the other. Things that have nothing to do with OBS.. just food for thought

Good luck

Tomorrow night will be Christmas pageant rehearsal, which we haven't done indoor with livestreaming... ever [our last year's Christmas Eve service was outdoors], so needing to plan out camera angles, lighting, etc. My fun will be balancing those wanting to service like done in years prior, and livestream tech team having to 'educate' and reality of capturing that service with camera, mics, etc for a remote audience [and that works in person doesn't always work for remote viewers]... ah, if its not one thing, its another...
 

Organist

New Member
Hy Lawrence,
Thank you for your very detailed feedback.
There are a lot of suggestions, which I think I have already taken into account.
Whether the latency on Youtube would have an impact would be my last hope. But it seems that it is only the image quality. And like have no feedback from online viewers either. Therefore, it doesn't matter.
We don't use teams etc in parallel. Only Youtube.
The computer is always started half an hour before the start, it is always turned off properly.
It was said by me wrong at first: audio is slower. However, it is like everywhere, faster.
I can still increase the CPU load to 100% permanently by opening more programs, it does not end by overloading the temperature at 50%. But I have only 5 programs open, which utilize the CPU 30% to 40%.
USB utilization: No change has been made either. The grabber is connected directly and audio shares a hub with the keyboard and mouse. Nothing else going on. Would be worth a thought though. Computer is connected with LAN, some worshippers are connected via WLAN but don't use much bandwidth.

I now noticed the following when testing today:
When I close and open OBS, I get alternating latency of 200ms or 1400ms.
So I can quite regularly open and close the program. Once with large and small video image delay. Always alternating.
At the same time I do not change or close any other program.

I find that extraordinary.

Translated with www.DeepL.com/Translator (free version)
 

Organist

New Member
I restartet the computer, only OBS running. Every new start we have different latency. Starting with long latency.
It seams to be a bug of the newest software..
 
Top