Audio going out of sync when switching scenes

Bodo_in_ZA

New Member
Hi Team OBS!

I'm experiencing a very strange phenomenon which, by all accounts of how "it just runs" simple OBS works, is difficult to troubleshoot. Any assistance will be highly appreciated.

Our setup at church for remote streaming during lockdown
1. Windows, i7, 16GB RAM. PC adequately specc'd without a doubt. Cellular router gives me 10Mbps upload, OBS configured so far that I don't have 1 single dropped frame for a 90 minute broadcast. (Felt quite chuffed with figuring out the settings!)
2. 2x Dahua security cameras, of which one is a PTZ. I've added both successfully as RTSP locations, and can view the camera.
3. Audio from the Xenyx X222USB mixing desk is coming into the PC via USB cable, and is the only audio source enabled in OBS. This is to ensure we have one single feed of audio _into_ the stream from all the different mics in the church, including the ambient mics.

Problems experienced (2 separate issues)
a. If I start a stream from OBS, and I stick to ONE scene, then the audio stays 100% in sync. As soon as I change between scenes (whether to the static "welcome" image, or to the other IP camera), there is an audio delay that I can't correct other than by to shut down the stream and start again. Needless to say, I can't do this _during_ the church service.
b. If I change between the 2 security cameras, it appears as if within a few seconds after the switch, the video goes "black" until I "refresh" the "source" in OBS (right-click on the source entry in the scene, select "properties", and then just click "ok" again).

I believe the 2 issues listed above are not related, as the audio sync issue arises even if I start with the static "welcome scene", and then switch to the PTZ camera or the static camera.

I've illustrated the problem on this Youtube video --> https://www.youtube.com/watch?v=UqurQRJ8yAU
1. The audio is in sync up to 36 seconds into the video (walking in sync with audio) --> shot from the static IP camera
2. Ignore the ringing of the church bells (was a test to see if it would pick up adequately on the boundary mics)
3. At 1:22, I'm swopping to other scenes, including the static image, and camera is blacking out, and thereafter the "walk sync test" illustrates that audio is out of sync.

ANY thoughts / suggestions to troubleshoot will be very welcome!

Thanx in advance for the support!
 

Attachments

  • 2020-12-30 07-43-48.txt
    14.5 KB · Views: 28

Lawrence_SoCal

Active Member
Is this right, a 10 yr old PC with an Intel Core i7-740QM @ 1.73GHz ??
I tried streaming with a 5yr old gaming laptop, with a nVidia GTX GPU that supported NVENC (I think) and that failed miserably for a HoW stream. Hardware video encoding is hard, really hard. Trying to do modern video streaming on a 10yr old PCIev2 system?? congrats on getting that very old PC to stream at all. if I got that right, that system just isn't powerful enough

My thoughts
1. if there is $0 for a more powerful PC, recognize that someone is going to have to spend a fair amount of time becoming an expert at optimizing OBS (and your Win10 operating system) to minimize hardware resource utilization. [analogy is trying to participate in a car race with a soap box derby contraption]
2. If you have budget (we asked for donations), and prefer to focus on the worship experience, it is time for a more recent PC, and there are a number of recent threads on PC configs (which I've commented on a number of them)... short version is it depends on budget, and how long you want to PC to realistically perform, and what level of warranty/support you want (if buying new). I spent this summer $1,500 delivered for a Tier 1 OEM business class PC 8c/16t, GTX 1660Super with a 5yr next business day on-site support, and US based phone support. The GTX 1650 Super was my desired GPU, but wasn't offered with the rest of what I wanted, so spend a little extra on that. I had spent a little more on a SSD for the OS (leaving HDD for storage). Without enhanced warranty/support, the same system could purchased new for around $1,000 (or a little less for consumer level quality). My target was 5 years life, and the ability to stream edit the videos if needed. Locally, for $300-500 I could get a used 3 yr old 4c/8t 16GB RAM, GTX GPU (with NVENC support) PC that should work to stream reliably and not force stream operator to be an expert on hardware utilization optimization

sorry to be the bearer of bad news.
 

Bodo_in_ZA

New Member
Hi Lawrence,

Point taken, though I have to say that I'm using x264 encoding (and not the hardware encoding), and the PC is not struggling at all. Prior streams have worked flawless (0 frames dropped) as long as I stuck to a single source.
 

BluePeer

Member
i have a similary issue with "out of sync" of "audio"
Thats not realy a issue of OBS its a issue of the source

have a mic (usb) thats all time Only in OBS going out of sync over time
the true story behind this issue, the hardware tells it works at 10 but the signal is at 9.2 or 11.02
so the signal run out of sync

for my issue it is only on the "monitoring" not on the "stream/record"

if you have issue on this side it is related to a hardware "issue" or better called "not supported feature"

only just for fun
go to a system with hardware not older then 3 years, i am 85% true that this issue is not happen
But before start try other stuff simply check out to run OBS right
run OBS and all include stuff with "Administrator" Rights and take a look on the hardware use CPU, GPU, Memory all needs to be Below 90% of usage , if you are over 90% in 1 Part, this can be the reason for this issue
 

Bodo_in_ZA

New Member
Update on issue "b" (black out when switching between the 2 security cameras)

Kudos to Stephen Ballast from Ballast Media, who suggested to install VLC 64-bit on the PC as well, and add the video as a "VLC source" and not a "media source". It seems OBS cannot in all instances re-establish the direct RTSP connection to the cameras when added as "media source".

Method is listed at https://www.youtube.com/watch?t=450&v=i_Cncshlc6g (By the way, this particular video talks so much to our setup [PC, LAN, security cameras, USB audio] that it is a good explanation for a relatively simple IP setup).

It seems to switch without fail between the 3 sources I've got listed now (Static image, PTZ IP camera, static IP camera) that I'll have to drive to church to see if the audio sync issue is also now resolved.... Will send an update as soon as I've had a chance to do that!
 

Bodo_in_ZA

New Member
Update on issue "a" (audio sync)

It seems like I've managed to get relative stability, but this can obviously only _really_ be confirmed by live testing (full church service).

In any case, for what its worth, here are some further tips to ensure that audio is in sync (if someone wants to use it as a checklist of items which can potentially cause audio sync issues)
1. Ensure the properties on ALL video sources are set to "Always play even when not visible" (my interpretation is that the video is "always available" and should remain in sync with audio [all sources are running in parallel]. The alternative is to start pulling video when swopping scene, and sometimes the video and audio could therefore go out of sync?)
2. Ensure the audio input that you want to use is not set to "default", but rather select the actual device here. (my interpretation is that "default" will revert to the windows settings, where you can potentially set another mic as default. If you "force" the device in OBS, the windows selections are therefore ignored).
3. Ensure under the "audio" settings that the sample rate is set to that of your source device, as this could potentially cause the audio to go "out of sync" over time (Refer to https://www.youtube.com/watch?t=510&v=yTt5IxFWaEM for more info)
4. Use the "audio video sync test" (if you are streaming from a camera) to determine the "sync offset" that you need to set on "advanced audio properties" for the audio input source that you have selected.

So far for now. Now for real-life testing. Holding thumbs!
 
Top