Kevga / BeatSaberCinema

A Beat Saber plugin for PC that allows you to sync up videos to play in the background of your maps.
GNU General Public License v3.0
66 stars 9 forks source link

Videos don't play or only play once until a restart of the application #30

Open bennybroseph opened 3 years ago

bennybroseph commented 3 years ago

1. Bug description

When loading BeatSaber, videos load and play correctly when a song is selected. If that song is picked for playback, the video does not play. Selecting any other song which has a downloaded video does not play the video. Going back to the originally selected video afterwards also does not play the video. The video only plays the first time that song is selected and then never again until BeatSaber is restarted.

I believe this is some sort of config error as I had to move the install of BeatSaber to another harddrive (using Steam, not a copy/paste) while I reinstalled Windows 10 on my main drive. I have attempted uninstalling and reinstalling BeatSaber as well as ensuring no additional mods have been installed since it was last working. Is there maybe a file that is not inside of the Steam folder that is pointing to an incorrect file path? Or possibly an additional download outside of the game that needs to be done first (.Net or similar)?

2. BSIPA log

_latest.log

Kevga commented 3 years ago

The file paths look good, the videos are being found and loaded but the Microsoft Media Foundation encounters an error starting with the second video file. This issue has affected someone before (see #20). At least I believe that this is the same issue. It's likely something on the system level, especially if it only started happening for you when you reinstalled Windows. I spent a good amount of time researching this when this was last reported, but couldn't find much info about anything. It could be some weird incompatibility between codecs, drivers and the specific Unity version the game uses or something. Sadly it's nothing I can fix.

nrewkowski commented 3 years ago

I had this issue suddenly pop up yesterday after a few weeks of not playing BS (last play was when 16.4 came out). You'll probably notice that in other VR apps--e.g. Youtube, VRChat, Unity itself--videos are breaking, too (or in my case, freezing the game entirely). I believe it is caused by a Windows update corrupting video/audio codecs. I tried uninstalling K-Lite codecs, Windows VP9 extensions, uninstalling VLC/Adobe programs, debugging the Cinema code, etc. but could never get it working again without refreshing Windows (the option that keeps your files but resets the OS) and installing K-Lite on the refreshed OS--it works fine now after this process.

Kevga commented 3 years ago

Thanks for your input, that's very interesting. You didn't happen to try it after resetting Windows and before installing the codec pack? I'm wondering whether the codec pack has anything to do with this issue or if it is unrelated. That said, resetting Windows is probably a bit excessive and not something I could recommend to fix this issue.

NNaso commented 2 years ago

I was having this same issue. Identical logging and behavior.

Digging through unity's videoplayer documentation was less than useful and only found one sad cry for help on unity support relating to videoplayer throwing error 10.

an os reset/reinstall working hints at some software or driver related issue. I tried a bunch of things in isolation (updating k-lite codecs, latest windows updates, etc)

finally I was able to get cinema working by fully removing my nvidia drivers via ddu in safemode. Then rebooting and installing Geforce Experience & the latest drivers.

Peteskies11 commented 2 years ago

Exact same issue here.

finally I was able to get cinema working by fully removing my nvidia drivers via ddu in safemode. Then rebooting and installing Geforce Experience & the latest drivers.

Sadly, this doesn't work for me.

The error in player.log:

WindowsVideoMedia error 0xc00d36b4 while reading C:/Program Files (x86)/Steam/steamapps/common/Beat Saber/Beat Saber_Data/CustomLevels/13df6 (I'm a Mess - [xavier])/Bebe Rexha - I'm A Mess [Official Music Video].mp4

Context: IMFSourceReader::WaitForSample in StepAllStreams Error details: The data specified for the media type is invalid, inconsistent, or not supported by this object. Track types: Unreadable Track

I'm using an ASUS TUF 3080ti.

Kevga commented 2 years ago

Did you change any settings in the Nvidia Control Panel or Geforce Experience after reinstalling and before trying again?

Peteskies11 commented 2 years ago

Just high performance power setting, and GSync on (I've tried turning it off).

ehefk commented 2 years ago

I was having this same issue. Identical logging and behavior.

Digging through unity's videoplayer documentation was less than useful and only found one sad cry for help on unity support relating to videoplayer throwing error 10.

an os reset/reinstall working hints at some software or driver related issue. I tried a bunch of things in isolation (updating k-lite codecs, latest windows updates, etc)

finally I was able to get cinema working by fully removing my nvidia drivers via ddu in safemode. Then rebooting and installing Geforce Experience & the latest drivers.

Just wanted to say that I had this identical issue and these steps fixed it for me.

Didn't really try anything else other than reloading all my plugins a few times. Was gonna give up and wait for the next update if this didn't fix it.

Cheers!

Peteskies11 commented 2 years ago

Latest patch fixed this for me!!

PnfrlEnm commented 2 years ago

I've also been having this exact issue, still on the latest version of Cinema. I've tried changing and uninstalling different drivers and changing NVIDIA Control Panel settings and nothing seems to be working. Also yes, specifically the first video works and then it never works again until restarting the game.

tinypawb commented 2 years ago

I feel dumb that this has been the cause of all my headaches but hopefully, it can help someone.

Was receiving the error "Video player error: VideoPlayer cannot play URL" nonstop and had no video showing in song or menu. Turns out my Vertical sync setting in the Nvidia Control Panel was set to "fast" at some point. Switching it to "Use the 3D application setting" solved the error and Cinema works just as intended.

Kevga commented 2 years ago

Thanks for reporting your findings! I can confirm that after enabling Fast Sync I am able to reproduce the issue myself. I would guess the other mentioned solutions (Windows reset and clean install via DDU) are just roundabout ways of resetting the VSync option to default.

For anyone else who encounters this problem, set the highlighted setting in the screenshot of the NVIDIA Control Panel below to anything other than "Fast".

image