MediaCoder on Linux/WINE

Share with other users your experience in using MediaCoder.
User avatar
thibeaz
Amateur
Amateur
Posts: 76
Joined: Tue May 29, 2007 2:17 am

:D

Post by thibeaz » Thu Jul 12, 2007 8:53 am

I could provide you with a guide as I use mediacoder with linux via wine.
would you prefer having a compiled txt file or post it in the forum. Personally I would go with txt file as it would be better then reading a long post on a forum ;)
EDIT:
I got it uploaded to my website at http://www.linkprophecy.com/mediacoder/mediacoder.txt

B!ink
Expert
Expert
Posts: 1275
Joined: Sun Nov 26, 2006 9:08 am

Post by B!ink » Thu Jul 12, 2007 10:00 am

Let me know SirAuron if thibeaz setup works.

darklotus
Amateur
Amateur
Posts: 16
Joined: Mon Jul 02, 2007 4:13 pm

Post by darklotus » Thu Jul 12, 2007 2:21 pm

I had no issues getting it installed.

I have the latest Wine installed. sudo apt-get wine
Exe's are by default opened with wine
i just ran the installer, then ran the program, had no issues getting it installed or running.

Just the mp4box error :(

User avatar
SirAuron
Expert
Expert
Posts: 798
Joined: Thu Feb 08, 2007 1:39 am
Location: Germany

Post by SirAuron » Thu Jul 12, 2007 10:58 pm

thank you thibeaz, will try it out. if it works I'll sticky it.


edit: the installation seems to work fine (no symbol in the wine menu though) but when I try starting MediaCoder I get a "Microsoft Visual C++ Runtime Error: Runtime Error! Program C:\Programme\MediaCoder\mediacoder.exe

R6034
An application has made an attempt to load the C Runtime Library incorrectly. Please contact the application's support team for more information.


Edit2: I see, seems there is already a workaround for this. It should be added to the guide. After installing Firefox and unzipping the files from the link BlinkN provided it works. I will edit your guide and then post it as an announcement.


Stanley: maybe you could include the files from the zip file in the installation or if you think it takes too much space maybe you could make an installation for linux with firefox and the missing dlls inside of it. Would make it much easier for simple folks like me:)
MediaCoder settings:

x264 (backend/source: mencoder, fps: 23,976, Fabio Sonatti's settings) + nero aac 64 in matroska

User avatar
SirAuron
Expert
Expert
Posts: 798
Joined: Thu Feb 08, 2007 1:39 am
Location: Germany

Post by SirAuron » Fri Jul 13, 2007 12:49 am

I can't seem to get my favorite combination x264, nero aac and mp4 working properly. It does output a playable file but it it is extremly async. I use mencoder as backend and source. When I change the codec to xvid everything works fine so the problem has to be x264.
MediaCoder settings:

x264 (backend/source: mencoder, fps: 23,976, Fabio Sonatti's settings) + nero aac 64 in matroska

B!ink
Expert
Expert
Posts: 1275
Joined: Sun Nov 26, 2006 9:08 am

Post by B!ink » Fri Jul 13, 2007 3:54 am

I know why some users receive R6034 error and other don't. It's due to the manifest file within MediaCoder directory. If you open Microsoft.VC80.CRT.manifest in notepad, this is what you will see inside the manifest file that comes bundled with each release of MediaCoder.

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <noInheritable></noInheritable>
    <assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50727.762" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    <file name="msvcr80.dll" hash="10f4cb2831f1e9288a73387a8734a8b604e5beaa" hashalg="SHA1"><asmv2:hash xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:Transforms><dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity"></dsig:Transform></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod><dsig:DigestValue>n9On8FItNsK/DmT8UQxu6jYDtWQ=</dsig:DigestValue></asmv2:hash></file>
    <file name="msvcp80.dll" hash="b2082dfd3009365c5b287448dcb3b4e2158a6d26" hashalg="SHA1"><asmv2:hash xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:Transforms><dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity"></dsig:Transform></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod><dsig:DigestValue>0KJ/VTwP4OUHx98HlIW2AdW1kuY=</dsig:DigestValue></asmv2:hash></file>
    <file name="msvcm80.dll" hash="542490d0fcf8615c46d0ca487033ccaeb3941f0b" hashalg="SHA1"><asmv2:hash xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:Transforms><dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity"></dsig:Transform></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod><dsig:DigestValue>YJuB+9Os2oxW4mY+2oC/r8lICZE=</dsig:DigestValue></asmv2:hash></file>
</assembly>
If you notice, all three files msvcr80.dll, msvcp80.dll and msvcm80.dll has a publicKeyToken assigned to them. When you run MediaCoder, this will look into the manifest and see what runtime library it needs to run. In this case MediaCoder is always looking for msvcr80.dll. Here's an excerpt taken from a website.
The publicKeyToken attributes tell the loader in a Windows XP/2003/Vista system to look into the SxS storage for the needed DLLs. So, if we remove the publicKeyToken entries from the manifest, the program will no longer use the public installed files. It has been changed to use the requested assemblies private and application local.

Source: Create projects easily with private MFC, ATL and CRT assemblies
After following the guide at that website, this is what the manifest file should look like when removing schema hints (unnecessary stuff) and publicTokenKey.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<noInheritable></noInheritable>
<assemblyIdentity type="win32"
name="Microsoft.VC80.CRT" version="8.0.50727.762"
processorArchitecture="x86"></assemblyIdentity>
<file name="msvcr80.dll" hash="10f4cb2831f1e9288a73387a8734a8b604e5beaa"
hashalg="SHA1"/>
<file name="msvcp80.dll" hash="b2082dfd3009365c5b287448dcb3b4e2158a6d26"
hashalg="SHA1"/>
<file name="msvcm80.dll" hash="542490d0fcf8615c46d0ca487033ccaeb3941f0b"
hashalg="SHA1"/>
</assembly>
This will no longer look into the side by side (SxS) storage. In other words, this won't look for the runtime library under....

"X:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700"

If you notice the bold text, that's the exact same publicTokenKey assigned in the original manifest file. If this folder does not exist with the runtime file under the users computer, this will case MediaCoder to display R6034 error message or startup problem (0xc0150002) encountered. That's why Visual C++ 2005 Redistributable Package is needed in order for the program.

The link I found awhile back works because the manifest file that's included, was modified without a publicKeyToken being asigned. However, those runtime files are out-of-date.

One more thing..
Why should we not use the original manifests?

What would happen if you used the unchanged manifests in the application directory? Wouldn't it work?

Yes! It would work. Unfortunately, you can't control what assemblies are loaded. If the needed assemblies are in the SxS storage too, then the loader of the OS will choose the files from there. If the files are not installed in the SxS storage, then the local files in the application folder will be used. If a new service pack is installed in the side by side storage, i.e. SP2, these files will be loaded and executed. The application local files are ignored. So, using the files in this way is a kind of fallback solution. However, it is possible to get some kind of xcopy installation this way.

Thanks to my co-MVP Hans Dietrich for pointing this out.

Source: Create projects easily with private MFC, ATL and CRT assemblies
Their's more to it, but I've gone into this long enough. Feel free to read the rest of the article.

User avatar
thibeaz
Amateur
Amateur
Posts: 76
Joined: Tue May 29, 2007 2:17 am

Maybe

Post by thibeaz » Fri Jul 13, 2007 4:48 am

Maybe this should go into the MediaCoder Tutorial you recently Just stickied in Step 4 I believe

B!ink
Expert
Expert
Posts: 1275
Joined: Sun Nov 26, 2006 9:08 am

Post by B!ink » Fri Jul 13, 2007 4:55 am

It can be done manually, but that's a pain in the butt. Stanley needs to change something in Visual Studio 2005 where it's built as a private assembly (to remove the publicKeyToken from the manifest file) every time he compiles MediaCoder. I don't think I'm explaining this right. Hopefully when stanley reads this, he might understand what I'm saying or not.

User avatar
thibeaz
Amateur
Amateur
Posts: 76
Joined: Tue May 29, 2007 2:17 am

...

Post by thibeaz » Fri Jul 13, 2007 5:03 am

Gotcha ;)

tosiara
Amateur
Amateur
Posts: 12
Joined: Thu Aug 06, 2009 12:53 am

Re: MediaCoder on Linux/WINE

Post by tosiara » Mon Sep 07, 2009 8:02 pm

Hello

I found that MediaCoder fails to work correctly if you are running over vnc session:

Code: Select all

err:module:attach_process_dlls "opengl32.dll" failed to initialize, aborting
err:module:LdrInitializeThunk Main exe initialization for L"C:\\Program Files\\MediaCoder\\codecs\\mplayer.exe" failed, status c0000005
err:seh:raise_exception Unhandled exception code c0000005 flags 0 addr 0x7e2adda8
This happens only if you are connected to virtual vnc session (vncserver).

If you are connecting through x11vnc to real graphic session, then everything works fine.



Is this a normal behavior or whose this bug is: wine or MediaCoder?

Thank you

(cross posted from openSUSE forum)

Post Reply