obsproject / obs-studio

OBS Studio - Free and open source software for live streaming and screen recording
https://obsproject.com
GNU General Public License v2.0
60.37k stars 7.99k forks source link

Hotswappable video source performance regression #6279

Closed SavageJacek20 closed 2 years ago

SavageJacek20 commented 2 years ago

Operating System Info

Windows 10

Other OS

No response

OBS Studio Version

27.2.4

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/LzCAITYTrphGxmDG

OBS Studio Crash Log URL

No response

Expected Behavior

In previous updates (27.1.x and before), I could play a prerendered video source with "Restart playback when active", "Show nothing when playback ends", and "Close file when inactive" and it would work successfully.

Current Behavior

Now the video lags randomly and oft desyncs the audio and video after a few seconds of playback. My only solution is to play it beforehand to "cache" it, which makes no sense as it worked for literal years beforehand. This is a regression.

Steps to Reproduce

  1. Livestream to twitch
  2. Play a game for a little while (~3 hours)
  3. End stream and play pre-rendered outro (which is a video source that loads when source is active)
  4. Video lags horribly ...

Anything else we should know?

Before you ask, the video and the OS are on the same NVMe drive, which should be more than fast enough to load a 13MB video.

RytoEX commented 2 years ago

I'd much prefer to see the OBS log from the session where this occurred. Do you have that one available?

SavageJacek20 commented 2 years ago

2022-04-05 19-43-58.txt

SavageJacek20 commented 2 years ago

2022-04-09 02-01-52.txt @RytoEX I have more additional evidence here and it seems to be audio stuttering for my Intro. This is super easy to replicate!

  1. Add short media source (1080p60fps with audio) with settings mentioned above ( "Restart playback when active", "Show nothing when playback ends", and "Close file when inactive" all checked)
  2. Make a separate empty scene to close OBS on.
  3. Close OBS and restart PC.
  4. Open OBS after boot and switch from the empty scene to the one with the Media Source. 90% of the time, it will lag horribly and generate audio stutters! These will generate in the log.
  5. If you don't get audio lag, repeat steps 3 & 4.

Again, this shouldn't happen as the media file is super small (9MB), and it doesn't happen to an audio file that is 110MB. It is a video/audio syncing issue. Hope this helps!

RytoEX commented 2 years ago

Can you please provide sample files?

SavageJacek20 commented 2 years ago

@RytoEX: Intro (9MB), note the first 5 seconds are blank on purpose to allow the stream to sync to twitch: https://user-images.githubusercontent.com/103090419/162640387-4beb382a-36eb-465e-a7cc-d4912deb573b.mov

Outro (13MB), too big for github: https://drive.google.com/file/d/13puz6Yy-dyq6WSGvsYdS2acJ-wm6oSCy/view?usp=sharing

Video proof of Audio/Video desync on stream (note how it skips unlike the above videos themselves): Intro: https://www.youtube.com/watch?v=DnWs47fEkVo Intro again: https://www.youtube.com/watch?v=Gcoh9GSSyPo Outro: https://www.youtube.com/watch?v=uwW5yTnhspU

SavageJacek20 commented 2 years ago

2022-04-14 18-59-21.txt Another interesting error I had. I readded the media sources and it locked up OBS and I had to force kill it.

I also reinstalled windows and still had the issue.

SavageJacek20 commented 2 years ago

Was a hardware issue

RytoEX commented 2 years ago

Was a hardware issue

Thank you for following up on this. What exactly was the issue?

sneakernets commented 2 years ago

I'm still seeing this happening on streams with videos from browser sources.