# Stream video in Opera/Firefox-bin on AMD64 (mplayerplug-in)

## Joffer

Stream video in Opera/Firefox-bin on AMD64 (mplayerplug-in)

Update:This mini-HOWTO also work for mozilla-firefox-bin using method in 4a. Should work with 4b, but I haven't tested, and I'm not going to either. Feel free to test and confirm it

Update2:There might be some problems with the plugin.. Not sure if it's related to Opera, mplayerplug-in or anything else. Please read on. Will update this post if I find a fix/solution/reason.

First I'd like to thank forumusers (in no particular order) Aries-Belgium, rwf, Sloden, Ravenlost and Slegge for posts and partial solutions in the forum which helped me finally get Opera to play streaming video from Apple's Trailers etc.

I've got an AMD64 X2 4200+ system with 1GB RAM, running 64bit. I'm also an Opera Browser fan, which means I'm running a 32-bit browser at the moment, since Opera hasn't released a 64bit version yet. Not that it would have helped at the moment, since most plugins are still 32bit. I also have mozilla-firefox (64bit) and mozilla-firefox-bin (32-bit) installed just in case (& because of dependencies).

So, here is a mini-HOWTO on how to get streaming video (and probably audio-only which I haven't tested).

mini-HOWTO

We need the gecko-sdk and mplayerplug-in sources. Lets fetch and get them ready:

gecko-sdk:

```
cd /tmp

wget http://ftp.mozilla.org/pub/mozilla.org/mozilla/nightly/latest-1.7/gecko-sdk-i686-pc-linux-gnu.tar.gz 

cd /emul/linux/x86/usr/lib

tar zxvf /tmp/gecko-sdk-i686-pc-linux-gnu.tar.gz
```

mplayerplug-in:

```
cd /var/tmp/

emerge -avf mplayerplug-in

tar zxvf /usr/portage/distfiles/mplayerplug-in-3.25.tar.gz
```

Now we need to make mplayerplug-in accept Opera. By default it just accept mozilla browsers. Lets change the code:

```
cd mplayerplug-in/plugingate/

vi np_entry.cpp
```

Look up lines 108 and 109 - the ones looking like this:

```
if(aNPNFuncs->size < sizeof(NPNetscapeFuncs))         

      return NPERR_INVALID_FUNCTABLE_ERROR;
```

Comment them out like this:

```
// if(aNPNFuncs->size < sizeof(NPNetscapeFuncs))

//   return NPERR_INVALID_FUNCTABLE_ERROR;
```

Lets configure and compile mplayerplug-in:

```
cd ..

./configure --enable-x --with-gecko-sdk=/emul/linux/x86/usr/lib/gecko-sdk/ --enable-x86_64 --x-libraries=/emul/linux/x86/usr/lib32/

make
```

When this is done we need to install the plugins. I like to keep the 32bit plugins in /usr/lib32/nsbrowser/plugins, and not in /opt/netscape/plugins. This is NOT the default Gentoo way, which puts most of its plugins into /opt/netscape/plugins and then symlinks them into /usr/lib/nsbrowser/plugins. This also messes up the system if you ask me, since on AMD64, /usr/lib/ is just a symlink to /usr/lib64... But this is a completly other subject (which I've posted about here).

My method (which includes removing '/opt/netscape/plugins' as plugin location and adding /usr/lib32/nsbrowser/plugins):

```
cp mplayerplug-in*.{so,xpt} /usr/lib32/nsbrowser/plugins/
```

OR

The default Gentoo way (I think):

```
cp mplayerplug-in*.{so,xpt} /opt/netscape/plugins/

cd /usr/lib32/nsbrowser/plugins/

ln -s /opt/netscape/plugins/mplayerplug-in*.{so,xpt} .
```

Copy the following into '/etc/mplayerplug-in.conf' if you don't already have the file:

```
#debug=0

#vo=xv,x11

#ao=alsa,esd,arts,oss

#download=1

#dload-dir=$HOME/tmp

#keep-download=0

#noembed=0

#cachesize=512

#use-mimetypes=0

#enable-ogg=1

#enable-smil=1

#enable-helix=1

#qt-speed=med

#rtsp-use-tcp=0

#nomediacache=0

#framedrop=0

#autosync=0

#mc=1

#black-background=0

#user-agent=NSPlayer
```

Then change it as you see fit.

Thats it. Give it a try. Surf ot http://www.apple.com/trailers/ and try to watch a trailer.

I was able to play the trailers in mozilla-firefox-bin too, using "my method" (4a). The only place where the plugins is installed on my system is in "/usr/lib32/nsbrowser/plugins"

If you want to do some clean-up, you could delete the gecko-sdk source file in /tmp, and delete the /var/tmp/mplayerplug-in folder. The mplayerplug-in source file is stored in /usr/portage/distfiles. If you don't have space issues, it may as well just stay there. If you later do an "emerge -av  mplayerplug-in" it would be used and you'll end up with a 64bit version of mplayerplug-in which you in theory should be able to use with 64bit browsers with compatible codecs.

Debug info

Starting Opera with --debugplugins resulted in no errors:

```
joffer@armour ~ $ opera --debugplugin &

opera: [plugin probing] /opt/opera/lib/opera/plugins/libnpp.so

opera: [plugin probing] /usr/lib32/nsbrowser/plugins/mplayerplug-in-gmp.so

opera: [plugin probing] /usr/lib32/nsbrowser/plugins/javaplugin.so

opera: [plugin probing] /usr/lib32/nsbrowser/plugins/mplayerplug-in.so

opera: [plugin probing] /usr/lib32/nsbrowser/plugins/mplayerplug-in-qt.so

opera: [plugin probing] /usr/lib32/nsbrowser/plugins/mplayerplug-in-wmp.so

opera: [plugin probing] /usr/lib32/nsbrowser/plugins/nphelix.so

opera: [plugin probing] /usr/lib32/nsbrowser/plugins/libflashplayer.so

opera: [plugin probing] /usr/lib32/nsbrowser/plugins/mplayerplug-in-rm.so

opera: [plugin path   ] #001: /opt/opera/lib/opera/plugins

opera: [plugin path   ] #002: /usr/lib32/nsbrowser/plugins

opera: Search operamotifwrapper: [No] /opt/opera/lib/opera/plugins/operamotifwrapper

opera: Search operamotifwrapper: [No] /opt/opera/lib/opera/plugins/operamotifwrapper-1

opera: Search operamotifwrapper: [No] /opt/opera/lib/opera/plugins/operamotifwrapper-2

opera: Search operamotifwrapper: [Ok] /opt/opera/lib/opera/plugins/operamotifwrapper-3
```

Changelog:

20060417 - Update2: Added a notice about there being some problems and stuff posted below. Also a bit more info on the clean-up part

20060417 - Update: Added info on /etc/mplayerplug-in.conf. Added info about method also working for mozilla-firefox-bin

20060417 - Initial version

----------

## JoKo

Thanks for the HOWTO, it's very helpful indeed... I have just one question: which mplayer package should I emerge, mplayer or mplayer-bin?

Does mplayer work with win32codecs or I should only use mplayer-bin?

Update: Either way, I get Segmentation fault:

```
joko@optimus ~ $ opera -debugplugin

opera: [plugin probing] /opt/opera/lib/opera/plugins/libnpp.so

opera: [plugin probing] /usr/lib32/nsbrowser/plugins/libflashplayer.so

opera: [plugin probing] /usr/lib32/nsbrowser/plugins/mplayerplug-in-gmp.so

opera: [plugin probing] /usr/lib32/nsbrowser/plugins/mplayerplug-in-qt.so

opera: [plugin probing] /usr/lib32/nsbrowser/plugins/mplayerplug-in-rm.so

opera: [plugin probing] /usr/lib32/nsbrowser/plugins/mplayerplug-in-wmp.so

opera: [plugin probing] /usr/lib32/nsbrowser/plugins/mplayerplug-in.so

opera: [plugin path   ] #001: /opt/opera/lib/opera/plugins

opera: [plugin path   ] #002: /usr/lib32/nsbrowser/plugins

opera: Search operamotifwrapper: [No] /opt/opera/lib/opera/plugins/operamotifwrapper

opera: Search operamotifwrapper: [No] /opt/opera/lib/opera/plugins/operamotifwrapper-1

opera: Search operamotifwrapper: [No] /opt/opera/lib/opera/plugins/operamotifwrapper-2

opera: Search operamotifwrapper: [Ok] /opt/opera/lib/opera/plugins/operamotifwrapper-3

/opt/opera/lib/opera/plugins/operamotifwrapper-1: error while loading shared libraries: libXm.so.1: cannot open shared object file: No such file or directory

/opt/opera/lib/opera/plugins/operamotifwrapper-2: error while loading shared libraries: libXm.so.2: cannot open shared object file: No such file or directory

ADDED URL: the_simpsons_movie-tsr_h320.mov

code: 48

 speed 2800

ADDED URL: the_simpsons_movie-tsr_h480.mov

code: 48

 speed 25600

Segmentation fault
```

----------

## rwf

The seg-fault has already been bug reported.

Bug report

If you want to add further information to the bug report, just e-mail it to

bug-203378 at bugs dot opera dot com

----------

## Joffer

 *JoKo wrote:*   

> Thanks for the HOWTO, it's very helpful indeed... I have just one question: which mplayer package should I emerge, mplayer or mplayer-bin?

 

Mplayer-bin

----------

## JoKo

 *rwf wrote:*   

> The seg-fault has already been bug reported.
> 
> Bug report
> 
> If you want to add further information to the bug report, just e-mail it to
> ...

 

This seg-fault report refers to the new, beta Opera 9 and I'm using Opera 8.52...

And apart from that, I'm not so sure that Opera is the problem... Mozilla-firefox-bin doesn't hang like Opera, but neither it plays the video stream (it hangs at 99%)...

----------

## Joffer

Hmm. I checked out the bug report, and went to the simpsons teaser/trailer, and my Opera just borked and crashed as well on that trailer:

```
opera[8188]: segfault at 0000000000000008 rip 00000000f660ab14 rsp 00000000ffffa3f8 error 4

operamotifwrapp[24163]: segfault at 0000000000000000 rip 00000000f7b98c21 rsp 00000000f78c64b0 error 4
```

Is it just The Simpsons trailer? I don't get any problems with other trailers on apple.com. Check this one, it played just fine: http://www.apple.com/trailers/fox/ice_age_2/small.html

Hmm.. Looks like there are a few other issues too. I tried to watch NASA WebTV which uses the rm/ram format from Real (http://www.nasa.gov) and in Opera I get the audio, but no video (just a black square). If I open it directly in Real Player i get audio and video (http://www.nasa.gov/ram/35037main_portal.ram).

I also tried a few other sites with streaming content (trailer links from movies on imdb in wmv/ram format) and had a lot of sound coming through but no video.

Here are some of the errors I got using debug=1 in mplayerplug-in.conf:

```
Build Playlist error opening file 2 : No such file or directory

Build Playlist error opening file 2 : No such file or directory

motifwrapper: X Error: BadWindow (invalid Window parameter)

motifwrapper: X Error: serial=0x3451, request=0x2, request_minor=0x0, resource=0x280005a

motifwrapper: X Error: BadWindow (invalid Window parameter)

motifwrapper: X Error: serial=0x3458, request=0x4, request_minor=0x0, resource=0x280005a

motifwrapper: X Error: BadWindow (invalid Window parameter)

motifwrapper: X Error: serial=0x345d, request=0x4, request_minor=0x0, resource=0x2800059

motifwrapper: X Error: BadWindow (invalid Window parameter)

motifwrapper: X Error: serial=0x34b8, request=0x2, request_minor=0x0, resource=0x2800066

motifwrapper: X Error: BadWindow (invalid Window parameter)

motifwrapper: X Error: serial=0x34bf, request=0x4, request_minor=0x0, resource=0x2800066

motifwrapper: X Error: BadWindow (invalid Window parameter)

motifwrapper: X Error: serial=0x34c4, request=0x4, request_minor=0x0, resource=0x2800065

motifwrapper: X Error: BadWindow (invalid Window parameter)

motifwrapper: X Error: serial=0x3519, request=0x2, request_minor=0x0, resource=0x2800072

motifwrapper: X Error: BadWindow (invalid Window parameter)

motifwrapper: X Error: serial=0x3520, request=0x4, request_minor=0x0, resource=0x2800072

motifwrapper: X Error: BadWindow (invalid Window parameter)

motifwrapper: X Error: serial=0x3525, request=0x4, request_minor=0x0, resource=0x2800071

Calling realplay

playeripc: Got command Version 1

playeripc: Got command Embed name='RealPlayer' id='RealPlayer' type='audio/x-pn-realaudio-plugin' width='1' height='1' controls='HomeCtrl'

** (realplay.bin:24801): WARNING **: Ignoring unknown attribute id

playeripc: Got command Browser 0 'Mozilla/4.78 (X11; Linux x86_64; U; en) Opera 8.52' 0 0

playeripc: Got command SetXID 0 48234518 0 0 1 1 0 0 0 0 1

playeripc: Got command UnsetWindow 0

All consoles have been closed
```

I'm having the same audio/non-video problems in mozilla-firefox-bin.. That said, most .mov movies (QuickTime) works fine inside Opera. Only problem I've encountered yet is the reported Simpson Trailer that completly crashed my Opera.

Also, all the Video links under http://fredrik.hubbe.net/plugger/test.html worked just fine.

----------

## rwf

A couple of comments.

1. Re: the Simpson trailer. I don't care whose fault it is -- no program should seg-fault.  Opera should fix their bug.

2. Let Opera just find the mplayeplug-in.so file and set the mplayerplug-in.conf to not advertise the realplayer file types.

```

cat ~/.mplayer/mplayerplug-in.conf

#debug=1

vo=xv,x11

ao=alsa,oss

#download=1

#dload-dir=$HOME/tmp

#keep-download=0

noembed=1

#cachesize=512

#use-mimetypes=0

#enable-ogg=1

enable-smil=0

enable-helix=0

#qt-speed=med

#rtsp-use-tcp=0

#nomediacache=0

#framedrop=0

#autosync=0

#mc=1

#black-background=0

#user-agent=NSPlayer

```

3. I my case I point opera to ONLY the mplayerplug-in-qt.so and mplayerplug-in-wmp.so files, these plugin's do not advertise support for realplayer. 

Some video's might not play -- but an Opera seg-fault is unacceptable.

Edit: You should problably upgrade to 8.54 -- I think it fixes some security issues in Opera. Opps -- 8.54 isn't in portage! Duh.

----------

## Joffer

rwf:

With 2), do you mean I should remove the mplayerplug-in-rm.{so,xpt} files from the plugin folder? Setting enable-helix=0 doesn't stop Opera from loading the plugin I think:

```
...

opera: [plugin probing] /usr/lib32/nsbrowser/plugins/mplayerplug-in-rm.so

...
```

As your 'edit' says.. I'm one of those waiting for opera 8.54 to hit portage  :Shocked: 

I had enable-helix=1. Changed it to 0. My active mplayerplug-in.conf:

```
vo=xv,x11

ao=alsa

dload-dir=$HOME/tmp

cachesize=512

enable-ogg=1

enable-smil=0

enable-helix=0
```

3) How do you play rm/ram files? Open RealPlayer manually? Automatically? You don't?

---

What I thought was .ram files on nasa webtv looks to be windows media? At least from the output when I start Opera in debug (=10) mode.. Can you (rwf) watch the nasa webtv?

----------

## rwf

1. Screw the .xpt file -- only used by firefox{mozilla}.  Opera only wants the .so file.

2. When I installed realplayer it came w/ a .mime file.  I assigned all file{mime} types to open with realplay and pass web address to realplay. That means .smil, ra, ram, rm, etce, etc...

3. The nphelix.so is assigned to audio/x-pn-realaudio-plugin

```

~% locate realplay.mime

/opt/RealPlayer/share/realplay.mime

```

4. I only really want mplayerplug-in for the wmp and qt file types.

5. After making changes i.e. assigning a different handler for a file type -- I normally exit Opera and re-start it.

Edit: A picture is worth a thousand words.

```

~% grep ram ~/.opera/opera6.ini

application/x-framemaker=,0

application/x-msdos-program=,0

Frame=0

Force Image Frame=0

IFrames=1

Frames Show Active=1

File_types_treeview=""swf", "text", "pdf", "application/pdf", "mov", "rpm", "video/qu", "ogg", "audio/wav", "ram""

ExtAppParamSpaceSubst=0

application/x-framemaker=0,,,,mif,|

application/x-msdos-program=0,,,,exe,bat,pif,com,scr,|

audio/x-pn-realaudio=7,realplay,/home/me/.opera/plugins/mozplugger.so,MozPlugger 1.7.3 handles QuickTime Windows Media Player Plugin,ram,rmm,|Realaudio-plugin resource locator

~% 

```

What is important is the line audio/x-pn-realaudio=7,realplay

----------

## Joffer

 *rwf wrote:*   

> 1. Screw the .xpt file -- only used by firefox{mozilla}.  Opera only wants the .so file.

 

Well, thats probably why it worked in mozilla-firefox-bin then  :Wink:  I'll keep them there for firefox.

 *rwf wrote:*   

> 
> 
> 2. When I installed realplayer it came w/ a .mime file.  I assigned all file{mime} types to open with realplay and pass web address to realplay. That means .smil, ra, ram, rm, etce, etc...

 It's getting late and I'm not probably thinking straight.. Did u make direct use of the mime file or did you make an entry for each extention in the Preference window (under downloads)?

 *rwf wrote:*   

> 
> 
> 3. The nphelix.so is assigned to audio/x-pn-realaudio-plugin
> 
> ```
> ...

 

This file I have...

 *rwf wrote:*   

> 
> 
> 4. I only really want mplayerplug-in for the wmp and qt file types.
> 
> 5. After making changes i.e. assigning a different handler for a file type -- I normally exit Opera and re-start it.
> ...

 

 :Smile: 

 *rwf wrote:*   

> 
> 
> Edit: A picture is worth a thousand words.
> 
> ```
> ...

 

I'll check it out.. probably tomorrow.. getting late here.. a bit tired.. thanks so far.

----------

## rwf

 *Joffer wrote:*   

> It's getting late and I'm not probably thinking straight.. Did u make direct use of the mime file or did you make an entry for each extention in the Preference window (under downloads)?

 

I made an entry for each mime type  in Opera via the Download option.  Nothing automatic about it.

----------

## Joffer

 *rwf wrote:*   

>  *Joffer wrote:*   It's getting late and I'm not probably thinking straight.. Did u make direct use of the mime file or did you make an entry for each extention in the Preference window (under downloads)? 
> 
> I made an entry for each mime type  in Opera via the Download option.  Nothing automatic about it.

 

I went through the realplay.mime file and choose most of the direct real{audio,video} stuff and added the mime and fileextension to opera. Clicking on a real media in opera starts the RealPlayer  :Smile: 

----------

## RAIH

 *Joffer wrote:*   

> Stream video in Opera/Firefox-bin on AMD64 (mplayerplug-in)
> 
> [*]mplayerplug-in:
> 
> ```
> ...

 

When I want to emerge mplayerplug.........................It want to download www.cient/mozilla .................I have a firefox why It want to install mozilla ???

----------

## Requisition

I have no /emu/ directory. How would I create one?

----------

## Joffer

 *Requisition wrote:*   

> I have no /emu/ directory. How would I create one?

 

Are you on an amd64 profile/system? If you are using x86 you should just use the portage mplayerplug-in package.

----------

## jurrie

Hmmm, I really want this to work, but the plugins won't load for me:

```
opera: [plugin failed ] /usr/lib32/nsbrowser/plugins/mplayerplug-in.so, libnspr4.so: cannot open shared object file: No such file or directory
```

It gives me that for all mplayerplug-in files :/ Any ideas? Copying some random libnspr4.so from a 32-bit package didn't help ^^;;

(tried it on 8.54 and a 9.00 beta)

*edit*

Okay, solved. The libnspr4.so and libplds4.so I was missing were found in the gecko-sdk lib folder. I copied them to /lib32 and did an ldconfig and now it works perfectly. Thanks! ^_^

----------

## no4b

Question (opera):

Does mplayer-plugin use mplayer-bin or mplayer in your method? I've installed mplayer-plugin in different way (little simpler I think) with Opera 9 but I can't see video in wmv (which is pretty obvious).

----------

## kanttu

I'd like to show you another solutions for this issue. It isn't that "gentooish" but atleast it's quite easy and works  :Smile: 

1) I downloaded Fedora's mplayerplug-in binary i386 from http://mplayerplug-in.sourceforge.net/download.php

2) I converted mplayerplug-in-3.25-fc5.i386.rpm to tarball with rpm2targz

3) I extracted that tarball into some local folder

4) I copied *.so and *.xpt from that folder to /opt/netscape/plugins/

5) I symlinked those files to /usr/lib32/nsbrowser/plugins/

That's it! If you're using Firefox 1.5 you don't even need to restart it, all works instantly  :Smile: 

Of course you need to have mplayer-bin symlinked to mplayer

----------

## axlotl

Arg, I was getting that libpangocairo problem with mplayerplug-in-3.25 from http://sh.nu/download/ebuilds/mplayer/ (from this HOWTO's originating thread, among other places) so I decided to give the method here (the one at the top) a try in case the 3.21 from portage wasn't linked to libpangocairo, but it bails in the make:

```

[...]

lib/mozilla/include/xpcom -I/usr/lib/mozilla/include/string -I/usr/lib/mozilla/include/nspr   -I/usr/lib/mozilla/include -Iinclude -fPIC    -DX_ENABLED -melf_i386  -L/emul/linux/x86/usr/lib32/  -lX11   -lSM -lICE -lXext -lX11 -lXpm -lXt -L/usr/lib/mozilla -lxpcom -lplds4 -lplc4 -lnspr4 -lpthread -ldl    

/usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.3.4/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/mozilla/libxpcom.so when searching for -lxpcom

/usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.3.4/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lxpcom

collect2: ld returned 1 exit status

make: *** [mplayerplug-in] Error 1

axlotl $

```

I'm partying like it's 1999 here, chasing down obscure build dependencies. Any ideas?

(I also tried the suggestion immediately above with the rpms but still got the libpangocairo failed dependency).

*** edit  ***

A post in that earlier thread finally resolved this in concert with the plugin at http://sh.nu/download/ebuilds/mplayer/ . Here's that comment for reference:

 *kingmanowar wrote:*   

> Hello
> 
> I have just tried to emerge the latest mplayer-bin (1.0_pre8) today and I had the same problem with the pangocairo libs. I finally understood what was the issue and found a fix for it. The 32 bits version of cairo libs are only included in version 2.8.8 of the emul-linux-x86-gtklibs package. However it is masked with ~amd64. Unmask it in package.keywords and emerge it and it should work. You will probably have to unmask and re-emerge some other emul-linux-* packages too because of some dependences.
> 
> I guess the ebuild for mplayerplug-in from http://sh.nu/download/ebuilds/mplayer/ should work the same now.
> ...

 

This works beautifully.

----------

## nutznboltz

So the trick is to use

http://sh.nu/download/ebuilds/mplayer/mplayerplug-in-bin-portdir-20060419.tar.bz2

and

http://sh.nu/download/ebuilds/mplayer/mplayerplug-in-bin-3.25.tbz2

and ignore all the blather at the top of this page:

http://sh.nu/download/ebuilds/mplayer/

----------

## Emopig

It's also a good idea for AMD64 Opera users to extract "mplayer-bin.patch" from Primer's mplayerplug-in-bin archive and applied it manually just before I followed step 2 of Joffer's method so you get win32codec goodness.

I know have Flash and mplayer plugins working in Firefox 32bit, Firefox 64bit and Opera 9   :Twisted Evil:  All of them use mplayer-bin so I don't have to worry about unsupported codecs. I'm thinking of ditching Firefox 64 though because it's flakey as hell.

Thanks for all your hard work guys (and to Opera for making such a cool browser and for fixing those bugs)   :Wink:  Opera users everywhere owe you one.

----------

## flclncc

tried the above and got:

```

# ldd /opt/netscape/plugins/mplayerplug-in-qt.so

        linux-gate.so.1 =>  (0xffffe000)

        libX11.so.6 => /emul/linux/x86/usr/lib/libX11.so.6 (0xf7e95000)

        libSM.so.6 => /emul/linux/x86/usr/lib/libSM.so.6 (0xf7e8c000)

        libICE.so.6 => /emul/linux/x86/usr/lib/libICE.so.6 (0xf7e74000)

        libXext.so.6 => /emul/linux/x86/usr/lib/libXext.so.6 (0xf7e66000)

        libXpm.so.4 => /emul/linux/x86/usr/lib/libXpm.so.4 (0xf7e56000)

        libXt.so.6 => /emul/linux/x86/usr/lib/libXt.so.6 (0xf7e04000)

*       libxpcom.so => not found

*       libplds4.so => not found

*       libplc4.so => not found

*       libnspr4.so => not found

        libpthread.so.0 => /lib32/libpthread.so.0 (0xf7df1000)

        libdl.so.2 => /lib32/libdl.so.2 (0xf7dec000)

        libgtk-x11-2.0.so.0 => /emul/linux/x86/usr/lib/libgtk-x11-2.0.so.0 (0xf7afe000)

        libgdk-x11-2.0.so.0 => /emul/linux/x86/usr/lib/libgdk-x11-2.0.so.0 (0xf7a7f000)

        libatk-1.0.so.0 => /emul/linux/x86/usr/lib/libatk-1.0.so.0 (0xf7a65000)

        libgdk_pixbuf-2.0.so.0 => /emul/linux/x86/usr/lib/libgdk_pixbuf-2.0.so.0 (0xf7a50000)

        libpangocairo-1.0.so.0 => /emul/linux/x86/usr/lib/libpangocairo-1.0.so.0 (0xf7a48000)

        libpango-1.0.so.0 => /emul/linux/x86/usr/lib/libpango-1.0.so.0 (0xf7a11000)

        libcairo.so.2 => /emul/linux/x86/usr/lib/libcairo.so.2 (0xf79c9000)

        libgobject-2.0.so.0 => /emul/linux/x86/usr/lib/libgobject-2.0.so.0 (0xf7991000)

        libgmodule-2.0.so.0 => /emul/linux/x86/usr/lib/libgmodule-2.0.so.0 (0xf798e000)

        libglib-2.0.so.0 => /emul/linux/x86/usr/lib/libglib-2.0.so.0 (0xf790c000)

        libgthread-2.0.so.0 => /emul/linux/x86/usr/lib/libgthread-2.0.so.0 (0xf7907000)

        libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/32/libstdc++.so.6 (0xf7828000)

        libm.so.6 => /lib32/libm.so.6 (0xf7803000)

        libgcc_s.so.1 => /lib32/libgcc_s.so.1 (0xf77f9000)

        libc.so.6 => /lib32/libc.so.6 (0xf76c6000)

        libXau.so.6 => /emul/linux/x86/usr/lib/libXau.so.6 (0xf76c3000)

        libXdmcp.so.6 => /emul/linux/x86/usr/lib/libXdmcp.so.6 (0xf76bd000)

        /lib/ld-linux.so.2 (0x56555000)

        libfontconfig.so.1 => /emul/linux/x86/usr/lib/libfontconfig.so.1 (0xf768f000)

        libXinerama.so.1 => /emul/linux/x86/usr/lib/libXinerama.so.1 (0xf768c000)

        libXi.so.6 => /emul/linux/x86/usr/lib/libXi.so.6 (0xf7684000)

        libXrandr.so.2 => /emul/linux/x86/usr/lib/libXrandr.so.2 (0xf7680000)

        libXcursor.so.1 => /emul/linux/x86/usr/lib/libXcursor.so.1 (0xf7676000)

        libXfixes.so.3 => /emul/linux/x86/usr/lib/libXfixes.so.3 (0xf7671000)

        libpangoft2-1.0.so.0 => /emul/linux/x86/usr/lib/libpangoft2-1.0.so.0 (0xf764c000)

        libfreetype.so.6 => /emul/linux/x86/usr/lib/libfreetype.so.6 (0xf75dc000)

        libz.so.1 => /emul/linux/x86/lib/libz.so.1 (0xf75cb000)

        libXrender.so.1 => /emul/linux/x86/usr/lib/libXrender.so.1 (0xf75c1000)

        libpng12.so.0 => /emul/linux/x86/usr/lib/libpng12.so.0 (0xf759e000)

        libexpat.so.0 => /emul/linux/x86/usr/lib/libexpat.so.0 (0xf757f000)

```

* Those libs that are missing can be found on gecko-sdk, where can I find 32 bits version of them?

----------

## Emopig

 *flclncc wrote:*   

> * Those libs that are missing can be found on gecko-sdk, where can I find 32 bits version of them?

 

The mozilla-firefox-bin package in portage does contain 32-bit versions of those files, they will be emerged into /opt/firefox and then you can add symlinks int /usr/lib32 to resolve the issue. I don't know why Mozilla don't place their libraries in the appropriate directories, I guess it makes the binary package more suited to USB thumbsticks and such. 

```
/usr/lib32 $ ls -l | grep '/opt/firefox'

lrwxrwxrwx 1 root root      24 Jul 11 20:06 libnspr4.so -> /opt/firefox/libnspr4 .so

lrwxrwxrwx 1 root root      23 Jul 11 20:04 libplc4.so -> /opt/firefox/libplc4.so

lrwxrwxrwx 1 root root      24 Jul 11 20:03 libplds4.so -> /opt/firefox/libplds4.so

lrwxrwxrwx 1 root root      24 Jul 11 20:01 libxpcom.so -> /opt/firefox/libxpcom.so

lrwxrwxrwx 1 root root      29 Jul 11 20:07 libxpcom_core.so -> /opt/firefox/lib xpcom_core.so
```

Unless anyone knows a cleaner way?

----------

## flclncc

 *Emopig wrote:*   

>  *flclncc wrote:*   * Those libs that are missing can be found on gecko-sdk, where can I find 32 bits version of them? 
> 
> The mozilla-firefox-bin package in portage does contain 32-bit versions of those files, they will be emerged into /opt/firefox and then you can add symlinks int /usr/lib32 to resolve the issue. I don't know why Mozilla don't place their libraries in the appropriate directories, I guess it makes the binary package more suited to USB thumbsticks and such. 
> 
> ```
> ...

 

Yes, I did that. Now opera detects the plugins fine, but when I try to use them ( at http://www.flightlevel350.com/ ). I get this:

```

(process:17207): GLib-GObject-CRITICAL **: gtype.c:2254: initialization assertion failed, use IA__g_type_init() prior to this function

(process:17207): GLib-GObject-CRITICAL **: gtype.c:2254: initialization assertion failed, use IA__g_type_init() prior to this function

(process:17207): GLib-GObject-CRITICAL **: gtype.c:2254: initialization assertion failed, use IA__g_type_init() prior to this function

(process:17207): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(process:17207): GLib-GObject-CRITICAL **: gtype.c:2254: initialization assertion failed, use IA__g_type_init() prior to this function

(process:17207): GLib-GObject-CRITICAL **: gtype.c:2254: initialization assertion failed, use IA__g_type_init() prior to this function

(process:17207): GLib-GObject-CRITICAL **: gtype.c:2254: initialization assertion failed, use IA__g_type_init() prior to this function

(process:17207): GLib-GObject-CRITICAL **: gtype.c:2254: initialization assertion failed, use IA__g_type_init() prior to this function

(process:17207): GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)' failed

(process:17207): GLib-GObject-CRITICAL **: gtype.c:2254: initialization assertion failed, use IA__g_type_init() prior to this function

(process:17207): Gdk-CRITICAL **: gdk_xid_table_lookup_for_display: assertion `GDK_IS_DISPLAY (display)' failed

opera: Plug-in 17207 is not responding. It will be closed.

opera: Define environment variable OPERA_KEEP_BLOCKED_PLUGIN to keep blocked plug-ins.

```

----------

## Animatrix

Helllo,

I try to use mplayerplug-in, but it I have a problem, because :

libpangocairo-1.0.so.0 => not found

libcairo.so.2 => not found

What can I do ?

I have tried, to add them in /emul/linux/x86/usr/lib/, but the problem is always here...  :Sad: 

----------

## blossa

I am trying to get this working in Opera...

Ok, I get no errors staring Opera 9.00. When I go to a homepage with a movie, the browser buffers the movie but then it just stops. It does not crash Opera or something, it only stops.

When doing the 'emerge stuff' from first post in this thread i looks like I got v.3.21 instead because the only mplayerplug-in file I have in /usr/portage/distfiles is version 3.21.

So, do I have to unmask v.3.25 or will that solve nothing? Or should I go with even newer versions like 3.30 or 3.31? Or, maybe, maybe there is another solution ot there now?  :Smile: 

Any other suggestion?

Thanks in advance.

----------

## Jarda

Hi, thanks for the howto!

In firefox-bin, this works fine for me. Except, I can't turn the video to fullscreen. That's why i tried to configure the plugin with

```
./configure --with-gecko-sdk=/emul/linux/x86/usr/lib/gecko-sdk/ --enable-x86_64 --x-libraries=/emul/linux/x86/usr/lib32/ --enable-gtk1
```

After installing the plugins configured this way, I get the toolbar, and the plugin buffers the video, but then it just stops. Well, I can live without the fullscreen.

Then, I tried the plugin with Opera, but when trying to watch a trailer, the only thing I get is white blank area.

Here's the debugmessage:

```

 ~ $ opera -debugplugin

ERROR: ld.so: object 'libjvm.so' from LD_PRELOAD cannot be preloaded: ignored.

ERROR: ld.so: object 'libawt.so' from LD_PRELOAD cannot be preloaded: ignored.

opera: [plugin path   ] #001: /opt/opera/lib/opera/plugins

opera: [plugin path   ] #002: /usr/lib64/opera/plug-ins

opera: [plugin path   ] #003: /usr/lib32/nsbrowser/plugins

opera: Search operapluginwrapper: [Ok] /opt/opera/lib/opera/plugins/operapluginwrapper

operapluginwrapper: [plugin probing] /opt/opera/lib/opera/plugins/libnpp.so

opera: plugin detection successful: /opt/opera/lib/opera/plugins/libnpp.so

operapluginwrapper: [plugin probing] /usr/lib64/opera/plug-ins/nppdf.so

opera: plugin detection successful: /usr/lib64/opera/plug-ins/nppdf.so

operapluginwrapper: [plugin probing] /usr/lib64/opera/plug-ins/libflashplayer.so

opera: plugin detection successful: /usr/lib64/opera/plug-ins/libflashplayer.so

operapluginwrapper: [plugin probing] /usr/lib32/nsbrowser/plugins/libflashplayer.so

opera: plugin detection successful: /usr/lib32/nsbrowser/plugins/libflashplayer.so

operapluginwrapper: [plugin probing] /usr/lib32/nsbrowser/plugins/nphelix.so

opera: plugin detection successful: /usr/lib32/nsbrowser/plugins/nphelix.so

operapluginwrapper: [plugin probing] /usr/lib32/nsbrowser/plugins/mplayerplug-in-dvx.so

opera: plugin detection successful: /usr/lib32/nsbrowser/plugins/mplayerplug-in-dvx.so

operapluginwrapper: [plugin probing] /usr/lib32/nsbrowser/plugins/mplayerplug-in-qt.so

opera: plugin detection successful: /usr/lib32/nsbrowser/plugins/mplayerplug-in-qt.so

operapluginwrapper: [plugin probing] /usr/lib32/nsbrowser/plugins/mplayerplug-in-rm.so

opera: plugin detection successful: /usr/lib32/nsbrowser/plugins/mplayerplug-in-rm.so

operapluginwrapper: [plugin probing] /usr/lib32/nsbrowser/plugins/mplayerplug-in-wmp.so

opera: plugin detection successful: /usr/lib32/nsbrowser/plugins/mplayerplug-in-wmp.so

operapluginwrapper: [plugin probing] /usr/lib32/nsbrowser/plugins/mplayerplug-in.so

opera: plugin detection successful: /usr/lib32/nsbrowser/plugins/mplayerplug-in.so

opera: [plugin path   ] #001: /opt/opera/lib/opera/plugins

opera: [plugin path   ] #002: /usr/lib64/opera/plug-ins

opera: [plugin path   ] #003: /usr/lib32/nsbrowser/plugins

opera: Search operapluginwrapper: [Ok] /opt/opera/lib/opera/plugins/operapluginwrapper

/opt/opera/lib/opera/plugins/operapluginwrapper: symbol lookup error: /usr/lib32/nsbrowser/plugins/mplayerplug-in-qt.so: undefined symbol: pthread_create

opera: Plug-in 23054 is not responding. It will be closed.

opera: Define environment variable OPERA_KEEP_BLOCKED_PLUGIN to keep blocked plug-ins.

```

Any suggestions what to check?

----------

## rwf

Stadard disclaimer: I don't run an AMD64 system -- strictly x86 architecture.

The modifications to np_entry.cpp are only needed if you are running Opera 8.54. If you have Opera 9.mumble, then the mods

```

// if(aNPNFuncs->size < sizeof(NPNetscapeFuncs))

//   return NPERR_INVALID_FUNCTABLE_ERROR;

```

are not needed.

Most people have more success w/ mplayerplug-in 3.21 vs newer versions of mplayerplug-in.

Some sites just don't work i.e. the video/audio crap at http://news.yahoo.com. They don't work for me with either Opera of Firefox.

If you don't get Opera and Mplayerplug-in to work, it's always a good idea to post the url where it doesn't work.

Opera gives a lot of debugging information if you set the environment variable OPERA_PLUGINWRAPPER_DEBUG, possible debugging values are 0 to 20. I normally set to 10.

--enable-x versus --enable-gtk1 or --enable-gtk2. Opera and mplayerplug-in will not work if enable-{gtk1,gtk2}, if mplayerplug-in is compiled with these options. Clearly firefox needs gtk. This means you need two (2) binaries of mplayerplug-in, one that firefox uses and another that Opera finds.

This thread seems to indicate that someone had 'some' success with a gtk enabled version of mplayerplug-in and Opera http://my.opera.com/community/forums/topic.dml?id=154160

The above link was posted by somebody on a x86 system, not AMD64. I never bothered to try it out, since I don't think much of mplayerplug-in.

The no controls issue. You won't get any controls when mplayerplug-in is compiled with --enable-x.  You can try setting the noembedded option in /etc/mplayerplug-in.conf to 1. That way you might be able to use the keyboard to control mplayer (see man mplayer).

The undefined symbol: pthread_create issue. I also get the error when using mplayerplug-in version 3.31. pthread_create is in libpthread.so so I preloaded this library (LD_PRELOAD set to /lib/libpthread.so.0). Not sure what's going on, but since I'm in the middle of update to gcc-4.1.1 and glibc-2.4, probably a week to finish emerge -ave system and world, I'm not too concerned.

If you use the LD_PRELOAD trick, make sure you load the 32-bit library.

You can always get architecture of a .so library by using

```

~% objdump -a /lib/libpthread.so.0

/lib/libpthread.so.0:     file format elf32-i386

/lib/libpthread.so.0

~% file -L /lib/libpthread.so.0

/lib/libpthread.so.0: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, not stripped

~%

```

----------

## Disparu

this guide has really been a day maker and life saver. i thank you soooooo much!!!!

----------

## float-

a little off topic, sorry..

im trying to watch nasa tv in mplayer (-bin).

as http://www.nasa.gov/multimedia/nasatv/live_tv.html

just gave me a screen with buffering 0%, then immediately stops.

i thought this might not be a mplayerplug-in error, so i tried

mplayer-bin rtsp://a1914.l1857058329.c18570.g.lq.akamaistream.net/D/1914/18570/v0001/reflector:52211

but got the following result

```

mplayer-bin rtsp://a1914.l1857058329.c18570.g.lq.akamaistream.n

et/D/1914/18570/v0001/reflector:52211

MPlayer 1.0pre8-3.4.5 (C) 2000-2006 MPlayer Team

CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ (Family: 15, Model: 75, Step

ping: 2)

CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1

Compiled with runtime CPU detection.

93 audio & 211 video codecs

Setting up LIRC support...

mplayer: could not connect to socket

mplayer: No such file or directory

Failed to open LIRC support.

You will not be able to use your remote control.

Playing rtsp://a1914.l1857058329.c18570.g.lq.akamaistream.net/D/1914/18570/v0001

/reflector:52211.

STREAM_RTSP, URL: rtsp://a1914.l1857058329.c18570.g.lq.akamaistream.net/D/1914/1

8570/v0001/reflector:52211

Resolving a1914.l1857058329.c18570.g.lq.akamaistream.net for AF_INET6...

Couldn't resolve name for AF_INET6: a1914.l1857058329.c18570.g.lq.akamaistream.n

et

Resolving a1914.l1857058329.c18570.g.lq.akamaistream.net for AF_INET...

Connecting to server a1914.l1857058329.c18570.g.lq.akamaistream.net[213.248.112.

90]: 554...

rtsp_session: Not a Real server. Server type is 'QTSS-Akamai/5.0.2 (Build/452.2.

1; Platform/Linux; Release/Panther; )'.

STREAM_HTTP(2), URL: rtsp://a1914.l1857058329.c18570.g.lq.akamaistream.net/D/191

4/18570/v0001/reflector:52211

Resolving a1914.l1857058329.c18570.g.lq.akamaistream.net for AF_INET6...

Couldn't resolve name for AF_INET6: a1914.l1857058329.c18570.g.lq.akamaistream.n

et

Resolving a1914.l1857058329.c18570.g.lq.akamaistream.net for AF_INET...

Connecting to server a1914.l1857058329.c18570.g.lq.akamaistream.net[213.248.112.

90]: 80...

Server returned 503: error

File not found: 'a1914.l1857058329.c18570.g.lq.akamaistream.net/D/1914/18570/v00

01/reflector:52211'

Failed to open rtsp://a1914.l1857058329.c18570.g.lq.akamaistream.net/D/1914/1857

0/v0001/reflector:52211.

Exiting... (End of file)

```

anyone who has an idea?

----------

## rwf

It played for me using the vlc plugin w/ Opera 9.10-507(.1)

It appears to be an application/x-mplayer2 file type.

Note: I run x86 not AMD 64 

```

~% emerge -pv vlc

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild     U ] media-video/vlc-0.8.6 [0.8.5-r5] USE="X a52 alsa bidi cdda cddb dts dvd flac gnutls httpd live matroska mp3 mpeg ncurses nsplugin ogg opengl png sdl shout stream svga theora vcd vlm vorbis win32codecs wxwindows xml xv -3dfx -aalib (-altivec) -arts -avahi -corba -daap -debug -directfb -dvb -esd -fbcon -ggi -hal -libcaca -libnotify% -lirc -mod -optimisememory -oss -rtsp -samba -seamonkey -skins -speex -svg -truetype -upnp -v4l -xinerama -xosd" 10,268 kB 

Total size of downloads: 10,268 kB

~% 

```

----------

