YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
22 stars 8 forks source link

In-Game: [Windows VM] Longer videos have their audio go out-of-sync if CPU speed is low #5920

Closed shichen85 closed 2 weeks ago

shichen85 commented 4 months ago

Description

We have a cutscene in mp4 format that has the duration of 02:41. Players with slow CPU reports that when they play the video, the audio is desynced. We were able to replicate this issue by throttling CPU with tools like Process Lasso: https://bitsum.com/download-process-lasso/

Steps To Reproduce

  1. Open the sample project and run for Windows VM
  2. Open Process Lasso and find the Runner exe Runner.exe process
  3. Set the CPU affinity to always use only 1 core 1 core
  4. Left click the runner to play the video "opening.mp4". Notice that at video position 10/161, the sound effect of the photo popping up is desynced from the actual animation. If you let the video play till the end, video gradually desyncs even more, and you will see that video position will exceed 161, which is the maximum length of the video.
  5. Left click again to toggle to play the video "opening_Trim.mp4". Notice there is no desync

Which version of GameMaker are you reporting this issue for?

IDE v2024.400.0.556 Runtime v2024.400.0.571

Which operating system(s) are you seeing the problem on?

Windows 10.0.22000.0

Which platform(s) are you seeing the problem on?

Windows

8c82f984-645c-4a02-8319-132d226d737c

shichen85 commented 4 months ago

This is the codec for the 02:41 mp4 video vlc_HW1bMvJYua

shichen85 commented 4 months ago

Just to check if playing this video in other apps would also have this issue, we tried playing the video in VLC Media Player and throttling the CPU affinity of the player. The audio desync did not happen, so this issue is probably specific to the runner.

shichen85 commented 4 months ago

Tried to replicate the issue with a different codec and still experiencing the desync issue: vlc_69KR7Mbopq

shichen85 commented 3 months ago

https://github.com/YoYoGames/GameMaker-Bugs/assets/35857473/82808323-85ff-4533-a043-564a6a78f036

An example of the desynced video for references. Starts happening around 00:10 where the SFX of photo is desynced from the animation.

In comparison, the functional version of the video can be seen at: https://www.youtube.com/watch?v=ztL-q9LNizc

shichen85 commented 1 month ago

@jackerley @YYDan Hello, just want to check the timeline on this issue. Please let us know what to expect for this one. Thanks!

jackerley commented 1 month ago

Hi @shichen85 I've just been looking at this today, I'm going to try a bit of a re-write of the Windows Video player to see if I can get it to behave itself. It is still flagged as an August issue, so should be resolved soon.

shichen85 commented 1 month ago

Hi @shichen85 I've just been looking at this today, I'm going to try a bit of a re-write of the Windows Video player to see if I can get it to behave itself. It is still flagged as an August issue, so should be resolved soon.

Awesome! Thank you. We had a bit of an embarrassing marketing moment when an influencer made a video about our cutscene being desynced from the audio when he was playing our demo build on his laptop, so we vowed that we will address this issue in the official release. 😅

shichen85 commented 2 weeks ago

Hello, we have requested the fixing for this issue per https://help.gamemaker.io/hc/en-us/requests/217720 as we are gearing up for a delivery deadline. Please let us know if you need any more information. Thanks!

jackerley commented 2 weeks ago

Hi @shichen85 just to let you know I should have a fix for this in a build tomorrow for you to test. I've just got some clean up to sort out.

jackerley commented 2 weeks ago

@shichen85 That's the fixes in, unfortunately they just missed today's public beta but I'll kick off another build once that's released so you can pick them up from the internal feed

cameron-home commented 1 week ago

Verified fixed in Beta IDE v2024.1100.0.626 Runtime v2024.1100.0.652