Setting libavcodec as the default media codec handler

Questions about Wine on Linux
Post Reply
bgc
Newbie
Newbie
Posts: 3
Joined: Mon Aug 08, 2022 5:29 pm

Setting libavcodec as the default media codec handler

Post by bgc »

Is it possible to make Wine use libavcodec as the default handler for media codecs? I am building from the main branch, and I managed to get an old game almost fully working: the music wouldn't play due to a missing Windows Media codec. I tried installing wmp9 with winetricks but it failed because I am using a WoW64 installation Wine prefix.

Through some analysis, I think the game is using the IBaseFilter interface of the Windows Media Source filter (documented here: https://learn.microsoft.com/en-us/windo ... rce-filter), to play the WMA files, if that helps.
bgc
Newbie
Newbie
Posts: 3
Joined: Mon Aug 08, 2022 5:29 pm

Re: Setting libavcodec as the default media codec handler

Post by bgc »

As I'm unable to edit my post, the old game in question is the original version of Monopoly Tycoon. When I built the WOW64 version of Wine, I built the 32bit version of Wine without FFMPEG, which actually helped bypass a codec (known as "MPEG-1 System Stream"), preventing the intro video, and the game from running.
Baustein
Level 1
Level 1
Posts: 6
Joined: Thu Jun 19, 2025 3:53 pm

Re: Setting libavcodec as the default media codec handler

Post by Baustein »

bgc wrote: Sat Jun 14, 2025 4:40 am Is it possible to make Wine use libavcodec as the default handler for media codecs?
Probably not. If Wine could just use ffmpeg, there would be no need to keep codec verbs around in winetricks.
bgc wrote: Sat Jun 14, 2025 4:40 am the music wouldn't play due to a missing Windows Media codec
Check this answer.
bgc wrote: Sat Jun 14, 2025 4:40 am but it failed because I am using a WoW64 installation Wine prefix
WoW64 is still experimental, duh. You can create a parallel 32-bit or 64-bit wineprefix by specifying the path to it with the WINEPREFIX environment variable (place it in front of every “wine” command). I use 8 and a shell script to select prefix at runtime. On the other hand, you can try opening the installer .exe with an archiver (like engrampa) and see, if you can just extract DLLs from there to your prefix. Then you’ll only have to place overrides (built-in – native) as necessary. Stuffing the prefix with ordinary codecs should probably be the first step, though (see the link above).
bgc wrote: Sat Jun 14, 2025 4:40 am Through some analysis, I think the game is using the IBaseFilter interface
Sounds like you too are on a good trip to make DirectShow work. Good luck. (No, really. It’s possible.)
bgc wrote: Sat Jun 14, 2025 4:40 am WMA
After installing Direct media DLLs, as described in the post by the link, pay close attention to ffdshow.ax, wmadmod and wmvdmod. Try setting them to native, if this doesn’t work – to built-in, if this doesn’t work either, then set them as disabled. In the worst case, unless your game is extremely picky, it should run with these DLLs disabled, only without videos.
Post Reply