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

Media Foundation needs enhancements #1132

Open
Ahmed-E-86 opened this issue Nov 12, 2018 · 50 comments
Open

Media Foundation needs enhancements #1132

Ahmed-E-86 opened this issue Nov 12, 2018 · 50 comments
Labels
enhancement Request for an enhancement help wanted Bugs that other contributors (or new ones) are requested to help with patch Bugs with a patch available

Comments

@Ahmed-E-86
Copy link

Ahmed-E-86 commented Nov 12, 2018

When I try installing MF using Winetricks, it installs only mf.dll file (native, builtin), but some games needs more files like:

mferror.dll
mfplat.dll
mfreadwrite.dll
msmpeg2adec.dll
msmpeg2vdec.dll
sqmapi.dll

You can get more information from this comment from a related issue:
ValveSoftware/Proton#1102 (comment)

@lieff
Copy link

lieff commented Nov 12, 2018

I've already tried to make winetricks PR, but I've failed to find KB update or other download containing this files. Original media foundation downloads contains delta files except for win10. But win10 versions do not works with wine.

@Ahmed-E-86
Copy link
Author

Ahmed-E-86 commented Nov 12, 2018

What if I changed Windows version to 10 from Wine configurations and tried win10 version of MF. Would that make any difference?

@lieff
Copy link

lieff commented Nov 12, 2018

Nope, It uses functions unsupported by wine like RtwqUnlockWorkQueue.

@Ahmed-E-86 Ahmed-E-86 changed the title Media Fountain needs enhancements Media Foundation needs enhancements Nov 16, 2018
@austin987 austin987 added enhancement Request for an enhancement help wanted Bugs that other contributors (or new ones) are requested to help with labels Dec 4, 2018
@Ahmed-E-86
Copy link
Author

Any new news regarding MF?

@austin987
Copy link
Contributor

I'm not aware of a download for it, so no.

@f0rmatme
Copy link

https://github.com/jzengc/wine/tree/proton_3.16_mf

@Ahmed-E-86
Copy link
Author

@james-munson Thanks, but did you try it yourself?

@Glog78
Copy link

Glog78 commented Jan 25, 2019

Lutris seem to use win7-sp1 for extraction of the files -> https://lutris.net/games/install/10999/view . Maybe that could help.

@austin987
Copy link
Contributor

So I added what I could from win7sp1, but still missing several. If you're affected, please test
austin987@5d653bf

@austin987 austin987 added the patch Bugs with a patch available label Feb 5, 2019
@Ahmed-E-86
Copy link
Author

Ahmed-E-86 commented Feb 5, 2019

There is one workaround works for some games like Danganronpa V3: Killing Harmony, Resident Evil 7 Biohazard, Resident Evil 2 Remake, and Darksiders Warmastered Edition.

So this MF workaround provides:

mf.dll
mfplate.dll
mfreadwrite.dll
wmadmod.dll
wmvdecod.dll

and there is another MF workaround provides:

mf.dll
mferror
mfplate.dll
mfreadwrite.dll
msmpeg2adec.dll
msmpeg2vdec.dll
sqmapi.dll

and there is also some registry files needs to be imported as well, and that works with other games like Shadows: Awakening, and Thronebreaker: The Witcher Tales ... etc

All the info are in this post >>> ValveSoftware/Proton#1102 (comment)

And someone upload a prefix for Thronebreaker: The Witcher Tales can be found here >>> doitsujin/dxvk#728 (comment)

And there is also some games that need MF + WMP, and WMP can only be installed in 32bit prefix.

All the list of games that requires MF, WMP, or quartz can be found here >>> ValveSoftware/Proton#1464

@Ahmed-E-86
Copy link
Author

So I added what I could from win7sp1, but still missing several. If you're affected, please test
austin987@5d653bf

Is that commit in the main branch?

@austin987
Copy link
Contributor

No, it's in a branch on my fork.

@Ahmed-E-86
Copy link
Author

Ahmed-E-86 commented Feb 5, 2019

No, it's in a branch on my fork.

If I use git from terminal to download this branch what it will be?

@Ahmed-E-86
Copy link
Author

It doesn't has these files:

msmpeg2adec.dll
msmpeg2vdec.dll
mferror

@austin987
Copy link
Contributor

Yes, that's noted in the commit. Those are in win7sp1, or anywhere else public I found.

@yooohoohello
Copy link

Please pardon me. I have worked it for a day to publish this.
https://gist.github.com/yooohoohello/fde4f9ed6aafc96a32c0d2739389ea7f

@ryao
Copy link

ryao commented Sep 14, 2019

@austin987 It would be somewhat heavy handed, but you can likely extract the necessary DLLs from one of Microsoft’s Windows 10 developer VM downloads:

https://developer.microsoft.com/en-us/windows/downloads/virtual-machines

A Windows 10 ISO download might also work.

@develop7
Copy link

@ryao speaking of VMs, there are Win7 & Win8.1 VMs on https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/

@Kreyren
Copy link
Contributor

Kreyren commented Oct 26, 2019

No, it is not a valid upstream bug.

@austin987 elaborate? afaik wine has mfplat and based on provided info it lacks mfplat.dll.MFGetConfigurationDWORD

@jarrard

I used this url which installs MF correctly and works for TOW. https://github.com/z0z0z/mf-install

could you try provided MR too? It has z0z0z's mirror implemented and is fetching the libraries from M$ files that we can download and cabextract.

@jarrard
Copy link

jarrard commented Oct 26, 2019

could you try provided MR too?

To be honest I don't really know how to use that modified code with winetricks. Manually edit the winetricks script file?

@Kreyren
Copy link
Contributor

Kreyren commented Oct 26, 2019

@jarrard referencing https://github.com/Winetricks/winetricks/wiki/How-to-make-a-side-fork

ping me on irc.freenode.net as kreyren if you need a help + testing is appreciated

@chewi
Copy link

chewi commented Oct 26, 2019

afaik wine has mfplat and based on provided info it lacks mfplat.dll.MFGetConfigurationDWORD

When trying to play Catherine Classic, I get a crash with an error about that symbol being missing even though I'm using mf-installcab or kreytricks. mf-install doesn't make it crash but it doesn't fix the game either. Am I doing something wrong or is this just a game that these fixes don't cover?

@austin987
Copy link
Contributor

For reference: https://bugs.winehq.org/show_bug.cgi?id=47758

The mixture of native and builtin doesn't work. If the problem is introduced by native components, it's generally not a Wine bug, particularly when you've overridden this many dlls.

Anyway, if you're using native mfplat.dll, by definition it can't be a Wine bug. It's a bug in the dlls themselves, or more likely, a sign that they can't be made to work on Wine standalone. Much like overriding IE dlls is hard and never quite worked properly, compared to something like vcrun*, which Microsoft explicitly made available as a standalone component.

@Kreyren
Copy link
Contributor

Kreyren commented Oct 26, 2019

DISCLAIMER: I'm not sure what i'm doing, trying to share my results so take that with a grain of salt since my results should be verified.

@chewi

I get a crash with an error about that symbol being missing even though I'm using mf-installcab or kreytricks. mf-install doesn't make it crash but it doesn't fix the game either.

I'm not sure why but z0z0z's script seems to have different outcome from my kreytricks implementation even when i'm sure that i've done the same thing as z0z0z so you might want to try that.. I guess that some combination of these libs (since my implementation is trying to extract them from M$ installers) or by using winetricks changes something in the result.

The results on my end were that z0z0z's script made wineapp working where my patch didn't. (thanks for testing though, i'm investigating why atm)

z0z0z's repo: https://github.com/z0z0z/mf-install

EDIT: For these libraries upstream states that these are grabbed from M$ where i don't have reliable way to check what the libraries are actually doing, waiting for WhiteHat to check them

Also lutris seems to provide different mfplat.dll which shasum doesn't match the one that we have available so it may be some winelib with a hack?

Ping @tannisroot requesting more info ^


@austin987

Anyway, if you're using native mfplat.dll, by definition it can't be a Wine bug. It's a bug in the dlls themselves, or more likely, a sign that they can't be made to work on Wine standalone.

Based on my testing it seems that wineapps that require mf also need much more then just mfplat where it seems that wine doesn't have stubs to capture which functions are called. (Makng the debugging harder)

I tried to export mfplat only and disable other mf-related libraries which just results in no output from wine and then trying to capture which makes the difference, but so far i spent 5 hours on it and got nowhere unless all libs are used.


As a sidenote winedevs that i've talked to seems to believe that this should be fixed in mono where some bug for tracking this should be made since it can be anything from small patch to a large hell (based on info that i've gathered)

@chewi
Copy link

chewi commented Oct 27, 2019

I'm not sure why but z0z0z's script seems to have different outcome from my kreytricks implementation even when i'm sure that i've done the same thing as z0z0z so you might want to try that.. I guess that some combination of these libs (since my implementation is trying to extract them from M$ installers) or by using winetricks changes something in the result.

To be clear, z0z0z's mf-installcab had the same outcome as your implementation. It was mf-install that behaved differently but none of them actually worked.

@Kreyren
Copy link
Contributor

Kreyren commented Oct 27, 2019

@chewi

To be clear, z0z0z's mf-installcab had the same outcome as your implementation. It was mf-install that behaved differently but none of them actually worked.

Noted

Do we know which functions are actually called in these libs? Having stubs in wine to trigger if the function is called would be helpful.

@ismail
Copy link

ismail commented Nov 15, 2019

I did install MF DLL's using mf-install method (mf-installcab has the same results) but when I try an app which uses MF to play mp3 I get

0037:err:ole:CoGetClassObject class {a82e50ba-8e92-41eb-9df2-433f50ec2993} not registered
0037:err:ole:CoGetClassObject no class object {a82e50ba-8e92-41eb-9df2-433f50ec2993} could be created for context 0x1

I double checked and wmf.reg is in the registry already. Any ideas what would be the reason?

@PietJankbal
Copy link
Contributor

Hi, I wrote script to get most of these files installed, don`t know if one needs more.
See script here:
https://raw.githubusercontent.com/PietJankbal/temporary_stuff/master/wmf62.txt

It downloads and extracts the dlls from msu-file, so nothing is registered, so that part is not complete....
The msu-file contains lots of other xml and cat files, maybe one can find some info there what registry keys are needed, I didn`t look at them.

I will do a pull request for the "expand" part, if someone would like to finish the WMF part (registering the dlls, adding keys etc) that would be nice.
I currently only need the expand-part for another script im working on, so i dont think i will look into WMF part soon

@tannisroot
Copy link
Contributor

@PietJankbal that's so cool! could you make a PR with that?

@PietJankbal
Copy link
Contributor

Hi tannisroot,

As I said, ill do a pull request for the first part (the expand stuff) The last part is in current state really still crappy, and to polish it up really takes quite some time, and id rather work now on another script i`m trying to finish.

So if someone else could step in, please do so.

@tannisroot
Copy link
Contributor

Oh whoops, I got so excited about the verb (even though it's incomplete) that I somehow missed that part of your comment :D

@PietJankbal
Copy link
Contributor

The dlls installed from the script in my previous comment seem to be too "new", too many crashes, no luck...

I did another attempt (dlls from win7 service packs) , at least it allows me to start Resident Evil demo, but i dunno if there are videos to played (???for me it doesnt at least)); At least it allows me to start the demo instead of crashing

If someone `d like to try: save
https://raw.githubusercontent.com/PietJankbal/wmf_winetricks/master/wmf_winetricks
to winetricks, and do "winetricks wmf_install"

Dont try on a prefix thats precious to you, because of written regkeys that cannot be undone.
Also, first time run takes more than 10 minutes (!) because of three downloads and extraction is really slow....

@mirh
Copy link

mirh commented Apr 18, 2020

For the records, Media Feature Pack should be able to install just fine by itself starting with wine 5.6

@tomlittrell
Copy link

Would this solution also work for RE7 running on an M1 Mac via CrossOver? If so, how would I implement it?

@fastrizwaan
Copy link

Unreal Engine 4 (UE4) games needs all mf files,
https://en.wikipedia.org/wiki/List_of_Unreal_Engine_games#Unreal_Engine_4

e.g., Raji game with mf-install from z0z0z https://youtu.be/mf8kckEr3EQ

z0z0z's mf install works

@austin987
Copy link
Contributor

@kevin01523
Copy link

some stuff from this repo did fix one if the problems i had with media foundation it might help here https://github.com/b-fission/vn_winestuff

@kevin01523
Copy link

kevin01523 commented Mar 30, 2024

i think this version of media feature pack is better as its closer to windows 10 https://www.microsoft.com/en-us/download/details.aspx?id=42503

it seems this list contains the extensive list of media feature pack from win 7 to win 10

https://support.microsoft.com/en-us/topic/media-feature-pack-list-for-windows-n-editions-c1c6fffa-d052-8338-7a79-a4bb980a700a

this blog
https://www.winhelponline.com/blog/windows-media-player-windows-10/
explains what the installer contains
or modules
List of Media Feature Pack Modules COLORCNV.DLL CastingShellExt.dll CoreMmRes.dll DMRServer.dll DiagPackage.dll DolbyDecMFT.dll LAPRXY.DLL MFCaptureEngine.dll MFMediaEngine.dll MFPlay.dll MFWMAAEC.DLL MP3DMOD.DLL MP43DECD.DLL MP4SDECD.DLL MPG4DECD.DLL MSAC3ENC.DLL MSAMRNBDecoder.dll MSAMRNBEncoder.dll MSAMRNBSink.dll MSAMRNBSource.dll MSAlacDecoder.dll MSAlacEncoder.dll MSAudDecMFT.dll MSFlacDecoder.dll MSFlacEncoder.dll MSHEIF.dll MSMPEG2ENC.DLL MSOpusDecoder.dll MSPhotography.dll MSRAWImage.dll MSVP9DEC.dll MSVPXENC.dll MSVideoDSP.dll MSWebp.dll PlayToReceiver.dll PortableDeviceApi.dll PortableDeviceClassExtension.dll PortableDeviceConnectApi.dll PortableDeviceStatus.dll PortableDeviceTypes.dll PortableDeviceWiaCompat.dll RESAMPLEDMO.DLL VIDRESZR.DLL WMADMOD.DLL WMADMOE.DLL WMASF.DLL WMNetMgr.dll WMPMediaSharing.dll WMPNSSUI.dll WMSPDMOE.DLL WMVCORE.DLL WMVDECOD.DLL WMVENCOD.DLL WMVSDECD.DLL WMVSENCD.DLL WMVXENCD.DLL WPDShServiceObj.dll WPDSp.dll WebcamUi.dll Windows.Media.Audio.dll Windows.Media.Editing.dll Windows.Media.Renewal.dll Windows.Media.Streaming.dll Windows.Media.Streaming.ps.dll Windows.Media.dll WmpDui.dll WpdFs.dll WpdMtp.dll WpdMtpDr.dll WpdMtpIP.dll WpdMtpUS.dll WpdMtpbt.dll Wpdcomp.dll asferror.dll audiodev.dll cewmdm.dll dlnashext.dll dxmasf.dll evr.dll gnsdk_fp.dll mf.dll mfAACEnc.dll mfasfsrcsnk.dll mfaudiocnv.dll mfcore.dll mfds.dll mfdvdec.dll mferror.dll mfh263enc.dll mfh264enc.dll mfmjpegdec.dll mfmkvsrcsnk.dll mfmp4srcsnk.dll mfmpeg2srcsnk.dll mfnetcore.dll mfnetsrc.dll mfperfhelper.dll mfplat.dll mfps.dll mfreadwrite.dll mfsrcsnk.dll mfsvr.dll mftranscode.dll mfvdsp.dll mfvfw.dll mpvis.DLL msmpeg2adec.dll msmpeg2vdec.dll msvproc.dll mswmdm.dll spwmp.dll sqlcecompact40.dll sqlceoledb40.dll sqlceqp40.dll sqlcese40.dll sqmapi.dll winmde.dll wmcodecdspps.dll wmdmlog.dll wmdmps.dll wmerror.dll wmidx.dll wmp.dll wmpdxm.dll wmpeffects.dll wmploc.DLL wmpnssci.dll wmpps.dll wmpshell.dll wmvdspa.dll wpd_ci.dll wpdbusenum.dll wpdshext.dll

the only problem i see i how to extract the needed selected dll files from the cab files since MS did make it complicated to extract and rigt registry tweaks etc

@shmerl
Copy link

shmerl commented Jul 4, 2024

So can this be used? Trying to play Blood West in upstream Wine and it's failing due to the mfplat mess and the game using these garbage codecs.

@austin987
Copy link
Contributor

So can this be used? Trying to play Blood West in upstream Wine and it's failing due to the mfplat mess and the game using these garbage codecs.

As I said in #1132 (comment), it would be useful for someone to test it and let me know (or at the very least, point to a game with a free download that is affected).

@mrdc
Copy link

mrdc commented Aug 10, 2024

So can this be used? Trying to play Blood West in upstream Wine and it's failing due to the mfplat mess and the game using these garbage codecs.

As I said in #1132 (comment), it would be useful for someone to test it and let me know (or at the very least, point to a game with a free download that is affected).

I can test. How can I install msu files in wine?

@austin987
Copy link
Contributor

So can this be used? Trying to play Blood West in upstream Wine and it's failing due to the mfplat mess and the game using these garbage codecs.

As I said in #1132 (comment), it would be useful for someone to test it and let me know (or at the very least, point to a game with a free download that is affected).

I can test. How can I install msu files in wine?

wine start example.msu

@mrdc
Copy link

mrdc commented Aug 18, 2024

So can this be used? Trying to play Blood West in upstream Wine and it's failing due to the mfplat mess and the game using these garbage codecs.

As I said in #1132 (comment), it would be useful for someone to test it and let me know (or at the very least, point to a game with a free download that is affected).

I can test. How can I install msu files in wine?

wine start example.msu

Thanks, I'm using Whisky app on macOS and unfortunately, it's not running msu files. When I try to start the msu via Whisky cli, which uses wine under the hood, it's also not working. Mainly I need Media Foundation for several Win x86 games I want to test on macOS, so running msu in "plain" wine and not in Whisky is not what I need for tests.
I've made an issue for Whisky concerning running msu files in it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Request for an enhancement help wanted Bugs that other contributors (or new ones) are requested to help with patch Bugs with a patch available
Projects
None yet
Development

No branches or pull requests