Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-evaluate WMP fixes #111

Open
11 of 29 tasks
Root-Core opened this issue Aug 27, 2024 · 27 comments
Open
11 of 29 tasks

Re-evaluate WMP fixes #111

Root-Core opened this issue Aug 27, 2024 · 27 comments

Comments

@Root-Core
Copy link
Contributor

Root-Core commented Aug 27, 2024

Perhaps we should re-evaluate all game fixes that involve WMP.
As @layercak3 wrote in #82 (comment), there have been changes to winegstreamer that fix issues with WMP.

Currently used by 19 fixes:

  • 12210 - GTA IV
  • 33990 - Alternativa
  • 39690 - ArcaniA
  • Working with 7.0-6 and 8.0-5, broken since 9.0-2
  • 65610 - ArcaniA: Fall of Setarrif
  • Probably the same as ArcaniA
  • 200490 - Memento Mori
  • 204450 - Call of Juarez: Gunslinger
  • Working with 7.0-6 and 8.0-5 (without 'intro'), full with 9.0-2 / Exp - no Sound in GE9-11
  • 211420 - Dark Souls Prepare To Die Edition
  • 237890 - Agarest: Generations of War
  • 256330 - WRC 4
  • 260130 - Agarest Zero
  • 388750 - Chronophantasma Extend
  • 460120 - Megadimension Neptunia VII
  • 638160 - Moero Chronicle
  • 740550 - Record of Agarest War Mariage
  • 888790 - Sabbat of the Witch
  • 1097880 - Super Naughty Maid 2
  • 1113000 - Persona 4 Golden (wmp9 + klite)
  • 1144400 - Senren * Banka
  • 1230140 - ATRI -My Dear Moments-
  • 1277930 - Riddle Joker
  • 1829980 - Café Stella and the Reaper's Butterflies
  • 2458530 - Sanoba Witch FHD Edition

And additionally, there are some fixes using wmp9_x86_64, which isn't in winetricks.

  • 211420 - Dark Souls Prepare To Die Edition
  • 388750 - Chronophantasma Extend
  • 1097880 - Super Naughty Maid 2

Others to evaluate:

  • 15740 - Oddworld: Munch's Oddysee (klite - for WMP)
  • 23460 - Ceville (Videos not working?)
  • 497360 - Gabriel Knight 3: Blood of the Sacred, Blood of the Damned (klite)
  • 1681970 - 神都不良探 Underdog Detective (klite + winegstreamer DLL override)
@R1kaB3rN
Copy link
Member

R1kaB3rN commented Aug 28, 2024

Just tested 1144400 (Senren * Banka) against GE-Proton9-11 and can confirm media playback works without the protonfix. I'm pretty confident that the result will be the same for the other Yuzusoft titles as well.

@Root-Core
Copy link
Contributor Author

Root-Core commented Aug 28, 2024

CC @CreeperofDoom, since you own the YUZUSOFT games and worked on the fixes.


The ArcaniA games are a bit iffy.. that might get fixed upstream though.
CoJ:G has no sound, just like Bully. And it can be fixed the same way.. #113.


EDIT: Added the wmp9_x86_64 titles to the common list

@CreeperofDoom
Copy link
Contributor

CreeperofDoom commented Aug 28, 2024

CC @CreeperofDoom, since you own the YUZUSOFT games and worked on the fixes.

The ArcaniA games are a bit iffy.. that might get fixed upstream though. CoJ:G has no sound, just like Bully. And it can be fixed the same way.. #113.

I only own Yuzusoft’s Riddle Joker through Steam, another title also had the Same Protonfix which i don’t have through Steam. The WMP Video Playback in Riddle Joker doesn’t work and will simply skip playback without the fix on GE-Proton 9-11.

though, when upgrading GE-Proton it will break and skip as it did before unless you clear the Compatibility Data with the current fix

@layercak3
Copy link

layercak3 commented Aug 28, 2024

Please attempt with media converter disabled for reasons described in here (disable_protonmediaconverter() or set variables), and if possible a 100% CG save in case of different codecs being used. They work with it disabled, except I didn't test 2458530.

  • 888790 also needs -vomstyle=overlay in game arguments to avoid occasional script error in OP
  • 1277930 also needs -vomstyle=mfevr to fix pixelation in OP if 1080p window (due to upscaled 720p video being selected otherwise)

I'm actually not entirely sure if I recommend changing them for protonfixes just yet, considering the changes are only in bleeding-edge (some not in upstream wine too) and these only started working in recent versions. Things might potentially break again by the time GE-Proton9-12 or so is released. Though, I don't have any contact with the devs or know what changes they have planned, I'm just bringing it up out of caution. Native libraries are certainly a more predictable option across different wine versions.

@CreeperofDoom
Copy link
Contributor

CreeperofDoom commented Aug 28, 2024

Please attempt with media converter disabled for reasons described in here (disable_protonmediaconverter() or set variables), and if possible a 100% CG save in case of different codecs being used. They work with it disabled, except I didn't test 2458530.

  • 888790 also needs -vomstyle=overlay in game arguments to avoid occasional script error in OP
  • 1277930 also needs -vomstyle=mfevr to fix pixelation in OP

I'm actually not entirely sure if I recommend changing them for protonfixes just yet, considering the changes are only in bleeding-edge (some not in upstream wine too) and these only started working in recent versions. Things might potentially break again by the time GE-Proton9-12 or so is released. Though, I don't have any contact with the devs or know what changes they have planned, I'm just bringing it up out of caution. Native libraries are certainly a more predictable option across different wine versions.

What exactly is suppose to be done and what for?

must i need to add the "disable_ protonmediaconverter" on top of the existing Protonfix Commands into the Fix and then Change GE-Proton versions?. My save has all Video files unlocked and available

Or do i remove the WMP related stuff in the fix and only use the disable_protonmediaconverter instead and see what occurs

@layercak3
Copy link

layercak3 commented Aug 28, 2024

Or do i remove the WMP related stuff in the fix and only use the disable_protonmediaconverter instead and see what occurs

Yes, replace with that, you can grep for disable_protonmediaconverter to see what other gamefixes do. Replace the main function with

def main():
    util.disable_protonmediaconverter()

"Compatibility Data"/wineprefix should be wiped to remove existing wmp11, please back up savedata.

And add -vomstyle=mfevr to the launch options if you see pixelation.

@CreeperofDoom
Copy link
Contributor

CreeperofDoom commented Aug 28, 2024

Or do i remove the WMP related stuff in the fix and only use the disable_protonmediaconverter instead and see what occurs

Yes, replace with that, you can grep for disable_protonmediaconverter to see what other gamefixes do. Replace the main function with

def main():
    util.disable_protonmediaconverter()

"Compatibility Data"/wineprefix should be wiped to remove existing wmp11, please back up savedata.

And add -vomstyle=mfevr to the launch options if you see pixelation.

Replacing all the prior fix commands with the new "disable_protonmediaconverter" commands and Video Playback works, with a few minor audio bugs, doesn’t seem like it’s pixelated.

If i use the requested -vomstyle=mfevr Launch Command into Steam for the title: Video playback either wont work or make all Video Files have wacky audio and excessive stuttering

I cleared the Proton Data before doing this

i also did try adding "disable_protonaudioconverter" and it didn’t seem to fix the audio issues during video playback

@CreeperofDoom
Copy link
Contributor

CreeperofDoom commented Aug 28, 2024

Must i need to create a new Pull Request for Riddle Joker's ProtonFix once i find a full solution?, In preparation for the next release. and for the other affected YuzuSoft titles, i only have Riddle Joker,

so if somebody else owns a Yuzusoft title they will be the one to confirm if the disablemediaconverter command does anything and if the launch command (s) doesn't break Video Playback afterward

@layercak3
Copy link

layercak3 commented Aug 28, 2024

What do you mean by "minor audio bugs"? With winegstreamer in general, sometimes I can hear a single audio sample being played before a video plays, but that's about it.

According to gstreamer logs the pixelation was because there was a 720p wmv video. It was probably upscaled using a nearest neighbour filter to the application's configured 1080p window. With mfevr it makes it actually play a 1080p h264 video. On the steam deck internal display (800p) you would not have this problem.

My comment says all yuzusoft currently in protonfixes works with media converter disabled except I didn't test 2458530.

@CreeperofDoom
Copy link
Contributor

CreeperofDoom commented Aug 28, 2024

What do you mean by "minor audio bugs"? With winegstreamer in general, sometimes I can hear a single audio sample being played before a video plays, but that's about it.

According to gstreamer logs the pixelation was because there was a 720p wmv video. It was probably upscaled using a nearest neighbour filter to the application's configured 1080p window. With mfevr it makes it actually play a 1080p h264 video. On the steam deck you cannot notice it.

My comment says all yuzusoft currently in protonfixes works with media converter disabled except I didn't test 2458530.

On mine the audio during Video Playback rapidly goes seconds behind where its suppose to. I have no clue what to add or do to alleviate the Pixelation elsewhere, because the launch command breaks it

@GreenLe4f
Copy link

GreenLe4f commented Aug 29, 2024

Can confirm for ATRI -My Dear Moments- (1230140) that video playback is working with GE 9-11 and mediaconverter disabled. Nekopara 1/2 also work (there are not in the list because they didn't have a protonfix before but also used to need wmp9; maybe create a pull request to add them ?).
But I had to set -vomstyle=overlay for playback to work. Layer would crash and mf/mixer would just skip playback. I didn't have any audio issues in those games on Ubuntu 24.04.

@R1kaB3rN
Copy link
Member

R1kaB3rN commented Aug 29, 2024

Can confirm for ATRI -My Dear Moments- (1230140) that video playback is working with GE 9-11 and mediaconverter disabled.

Do you mind sharing logs and a screenshot to support that statement? After a clean install and testing this on my end on the Steam Deck by manually changing the video renderer to overlay and disabling the protonfix, media playback does not work for the initial OP.


steam-1230140.log : https://gist.github.com/R1kaB3rN/dd65f0e02b0761c2fca086dc18e93639

appmanifest_1230140.acf:

"AppState"
{
	"appid"		"1230140"
	"Universe"		"1"
	"name"		"ATRI -My Dear Moments-"
	"StateFlags"		"4"
	"installdir"		"ATRI -My Dear Moments-"
	"LastUpdated"		"1724957199"
	"LastPlayed"		"1724961094"
	"SizeOnDisk"		"4154317326"
	"StagingSize"		"0"
	"buildid"		"7599887"
	"LastOwner"		"76561198160098006"
	"UpdateResult"		"0"
	"BytesToDownload"		"3843521168"
	"BytesDownloaded"		"3843521168"
	"BytesToStage"		"4154317326"
	"BytesStaged"		"4154317326"
	"TargetBuildID"		"7599887"
	"AutoUpdateBehavior"		"0"
	"AllowOtherDownloadsWhileRunning"		"0"
	"ScheduledAutoUpdate"		"0"
	"InstalledDepots"
	{
		"1230141"
		{
			"manifest"		"4004992322941680472"
			"size"		"4154317326"
		}
	}
	"UserConfig"
	{
		"language"		"english"
	}
	"MountedConfig"
	{
		"language"		"english"
	}
}

This is true by disabling media converter as well.

steam-1230140-disabled-mediaconverter.log: https://gist.github.com/R1kaB3rN/adcd544545be28d49f3829113b0ed9ab

@GreenLe4f
Copy link

GreenLe4f commented Aug 30, 2024

Do you mind sharing logs and a screenshot to support that statement? After a clean install and testing this on my end on the Steam Deck by manually changing the video renderer to overlay and disabling the protonfix, media playback does not work for the initial OP.

Sure. Last time I tried only using the Extra menu to play the videos again so this time I tried during actual gameplay.
I tested on a brand new prefix, and just to be sure I deleted the cache so I had no transcoded_video.foz
Also just to be sure, we're talking about this OP that plays a little while into the game ?
https://gist.github.com/GreenLe4f/050c41b8565d434a4f8dc36b5b5a6a83

screenshot

@R1kaB3rN
Copy link
Member

Thanks! Hmm, I can confirm it works, but things become weird when reaching the initial OP in the SteamOS gamescope session compared to desktop mode in a Windowed mode. Getting the video to appear would require me to move some input device, otherwise the game would sorta just stay in the previous scene. In my testing, it's only the touchpad that would make it appear.

R1kaB3rN added a commit that referenced this issue Aug 31, 2024
- Currently works without installing any winetricks verbs. Instead, the proton media converter should be disabled and the engine's video renderer should be configured to 'overlay'. In the SteamOS gamescope session, oddly, it's observed that moving the trackpad seems to be required to get the video to appear.

- Related to #111
@CreeperofDoom
Copy link
Contributor

CreeperofDoom commented Sep 9, 2024

IMG_5658
I get this when attempting to play one of the Video Files in Riddle Joker. GE-Proton 9-13 Used.
I tried clearing the Proton Data and that didn’t fix it. Why doesn’t it work anymore? In The prior version 9-12 it worked and when i wrote the New Fix to test it worked

@TintedKiwi
Copy link

I can confirm that Sabbat of the Witch(888790) works fine on GE 9-12. There's a brief stutter during playback of the opening video with the YuzuSoft logo, though this seems to be an issue with the video itself as it happens on Windows as well.

GE 9-13 generally works fine as well, however, the video that plays at the end of the prologue has no audio. Backtracking via the Backlog and trying to have it play again causes the game to freeze. The scene background music continues playing over a black screen and the mouse cursor can still be moved but the game is otherwise frozen.

I'm using Arch and tried each version using a new prefix and cleared shader cache.
I also tried clearing the proton data.

GE 9-13 Log

GE 9-12 Log

The GE 9-13 log has the following error entries for protonmediaconverter:

0:00:00.122313093 23125 0xb2901000 ERROR   protonmediaconverter audioconv.c:689:audio_conv_state_create: Failed to create fozdb from /home/tintedkiwi/.local/share/Steam/steamapps/shadercache/888790/transcoded_audio.foz, ret -4.
0:00:00.122360560 23125 0xb2901000 ERROR   protonmediaconverter audioconv.c:876:audio_conv_change_state: Failed to create audio conv state, ret -4.
0:00:00.151272921 23125 0xb2901000 ERROR   protonmediaconverter audioconv.c:1004:audio_conv_chain: Failed to push buffer <0xb36d0000> to src pad <audioconv0:src>

0:00:00.185014527 23125 0xb2901000 ERROR   protonmediaconverter audioconv.c:1004:audio_conv_chain: Failed to push buffer <0xb36d01f8> to src pad <audioconv0:src>
0:00:00.191629573 23125 0xb056dba0 ERROR   protonmediaconverter fossilize.c:540:fozdb_read_entry_data: Wrong check sum.

0:00:00.244621689 23125 0xb056dba0 ERROR   protonmediaconverter audioconv.c:689:audio_conv_state_create: Failed to create fozdb from /home/tintedkiwi/.local/share/Steam/steamapps/shadercache/888790/transcoded_audio.foz, ret -4.
0:00:00.244649075 23125 0xb056dba0 ERROR   protonmediaconverter audioconv.c:876:audio_conv_change_state: Failed to create audio conv state, ret -4.

0:00:14.072313415 23125 0xb056dba0 ERROR   protonmediaconverter fossilize.c:540:fozdb_read_entry_data: Wrong check sum.

@layercak3
Copy link

strings winegstreamer.so | grep PROTON_ on the release build of GE-Proton9-13 returns no matches, but does in my personal build. Seems GloriousEggroll messed up the build somehow and didn't apply the media-converter gate patch. I always compile my own builds and it works ok.

If "GE 9-13 generally works fine as well", then maybe Steam's transcode cache is now being used for more games (but seems partially broken, according to your report). That's a potential avenue you all can explore for protonfixes, but I will not provide any help with it since I have absolutely zero interest in that solution.

@CreeperofDoom
Copy link
Contributor

strings winegstreamer.so | grep PROTON_ on the release build of GE-Proton9-13 returns no matches, but does in my personal build. Seems GloriousEggroll messed up the build somehow and didn't apply the media-converter gate patch. I always compile my own builds and it works ok.

If "GE 9-13 generally works fine as well", then maybe Steam's transcode cache is now being used for more games (but seems partially broken, according to your report). That's a potential avenue you all can explore for protonfixes, but I will not provide any help with it since I have absolutely zero interest in that solution.

I assume that means this will be fixed in 9-14? because this error acts as a roadblock for the affected title (s)

@Root-Core
Copy link
Contributor Author

Maybe CC @GloriousEggroll or post the issue on the Proton-GE discord?

@TintedKiwi
Copy link

TintedKiwi commented Sep 10, 2024

strings winegstreamer.so | grep PROTON_ on the release build of GE-Proton9-13 returns no matches, but does in my personal build. Seems GloriousEggroll messed up the build somehow and didn't apply the media-converter gate patch. I always compile my own builds and it works ok.

If "GE 9-13 generally works fine as well", then maybe Steam's transcode cache is now being used for more games (but seems partially broken, according to your report). That's a potential avenue you all can explore for protonfixes, but I will not provide any help with it since I have absolutely zero interest in that solution.

Thanks, I compiled the latest git tag and all videos are working correctly now.

Custom GE 9-13 Log

@layercak3
Copy link

Sorry for not notifying you earlier, but wmv will be broken in 9-14 unless this patch is applied. Otherwise you'd want to revert 888790/1230140/1277930. 1277930 you can also use -vomstyle=mfevr to force h264.

@CreeperofDoom
Copy link
Contributor

CreeperofDoom commented Sep 24, 2024

Sorry for not notifying you earlier, but wmv will be broken in 9-14 unless this patch is applied. Otherwise you'd want to revert 888790/1230140/1277930. 1277930 you can also use -vomstyle=mfevr to force h264.

I would not suggest reverting those fixes. The older fixes had some problems like with it breaking when upgrading GE-Proton versions and long installation times, To fix those ones with the older fix would require you to delete its CompatData everytime...

Did once state the Launch Command completely breaks Video Playback in Riddle Joker (1277930)

Using 9-14 in Riddle Joker when trying to play a Video it is completely blank, with audio playing and it softlocks the game. It can also show the same error i listed some time ago. Riddle Joker also sometimes doesn’t open on 9-14

@R1kaB3rN
Copy link
Member

Sorry for not notifying you earlier, but wmv will be broken in 9-14 unless this patch is applied. Otherwise you'd want to revert 888790/1230140/1277930. 1277930 you can also use -vomstyle=mfevr to force h264.

No problem. You're neither obligated nor should feel responsible to notify anyone here. Since GE-14 already released, we'll just have to wait until that patch gets merged in Valve's wine branch.

1277930 you can also use -vomstyle=mfevr to force h264.

If setting that option would always make media playback work, I wonder if it would be a good idea to force h264 for all KiriKiri-based games. In protonfixes, we'll just need to detect the engine.

@layercak3
Copy link

If setting that option would always make media playback work, I wonder if it would be a good idea to force h264 for all KiriKiri-based games. In protonfixes, we'll just need to detect the engine.

I think this is a quirk with this specific application, so it shouldn't be applied everywhere. Besides, the majority will not have h264 content. If anything I'd recommend setting the disable media converter environment variables within umu-launcher, as nobody using umu is going to use the media converter and proton wine is known to not fallback to the normal gstreamer plugins when media converter is triggered and fails or has an empty cache in various cases (wmv, but they might have fixed it for h264 by now). It would increase the chances of video playback just working without any fiddling for anyone using umu with GE-Proton to run their application.

@CreeperofDoom
Copy link
Contributor

Video Playback in the 4 Kirikiri titles such as Riddle Joker still have broken video playback on versions of GE-Proton above 9-13. with it erroring out and forcing the game to quit

@layercak3
Copy link

layercak3 commented Dec 3, 2024

Some applications requires cherry pick from upstream:

diff --git a/dlls/mfplat/mediatype.c b/dlls/mfplat/mediatype.c
index 3944d64849e..916ab77408d 100644
--- a/dlls/mfplat/mediatype.c
+++ b/dlls/mfplat/mediatype.c
@@ -3992,6 +3992,7 @@ HRESULT WINAPI MFInitMediaTypeFromVideoInfoHeader2(IMFMediaType *media_type, con
     else
         FIXME("dwInterlaceFlags %#lx not implemented\n", vih->dwInterlaceFlags);
 
+    if (size > sizeof(*vih)) mediatype_set_blob(media_type, &MF_MT_USER_DATA, (BYTE *)(vih + 1), size - sizeof(*vih), &hr);
     return hr;
 }
 
@@ -4010,10 +4011,13 @@ HRESULT WINAPI MFInitMediaTypeFromVideoInfoHeader(IMFMediaType *media_type, cons
         .AvgTimePerFrame = vih->AvgTimePerFrame,
         .bmiHeader = vih->bmiHeader,
     };
+    HRESULT hr;
 
     TRACE("%p, %p, %u, %s.\n", media_type, vih, size, debugstr_guid(subtype));
 
-    return MFInitMediaTypeFromVideoInfoHeader2(media_type, &vih2, sizeof(vih2), subtype);
+    hr = MFInitMediaTypeFromVideoInfoHeader2(media_type, &vih2, sizeof(vih2), subtype);
+    if (size > sizeof(*vih)) mediatype_set_blob(media_type, &MF_MT_USER_DATA, (BYTE *)(vih + 1), size - sizeof(*vih), &hr);
+    return hr;
 }
 
 /***********************************************************************

@layercak3
Copy link

layercak3 commented Dec 13, 2024

Be careful with ValveSoftware/wine@bad2114 and potential future additions to that array, it can break playback when media-converter is off. I don't know what protonfixes wants to do about this, I don't have any recommendations. If you reject the media-converter (and upstream wine/native libraries doesn't work) then you should not be setting steamgameid, or you should just replace the array contents with a bogus entry.

Also if the first few audio samples don't play and there are desync issues with the audio being too ahead, install wmp instead, it's a regression with wine-9.13 (and any recent valve wine commit which is based on that winegstreamer) on some applications. Such as 1230140 iirc, No, I'm misremembering

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants