Friday, August 04, 2006

Make mplayerplug-in work with Opera

If you have installed mplayerplug-in (3.25) and Opera (9.00) from portage, you'll find that the plug-ins work with mozilla-firefox but not Opera. To make it work, you need to compile it manually. First, unpack the source somewhere:
# tar xzvf /usr/portage/distfiles/mplayerplug-in-3.25.tar.gz -C /tmp
# cd /tmp/mplayerplug-in

Then you need to edit a file:
# nano -w plugingate/np_entry.cpp
Look for lines 108 and 109 - the ones like the following:

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

Comment them out by inserting "//" in front of each line:

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

# ./configure --enable-x && make
To avoid mixing up the mplayerplug-ins in /opt/netscape/plugins (which work with mozilla-firefox), it's a good idea to install them in /opt/opera/lib/opera/plugins instead:
# cp -vi *.so *.xpt /opt/opera/lib/opera/plugins
and link the other plug-ins in /opt/netscape/plugins there:
# cd /opt/opera/lib/opera/plugins
# ls /opt/netscape/plugins
# ln -s /opt/netscape/plugins/flashplayer.xpt .
# ln -s /opt/netscape/plugins/ .
# ln -s /opt/netscape/plugins/ .
Then you need to prevent Opera from searching plug-ins in /opt/netscape/plugins. To do this, as a user:
$ nano -w ~/.opera/pluginpath.ini
Change the value for "/opt/netscape/plugins=" to 2 or 0.

To test it, start Opera, go to If your mplayer has been compiled with right USE flags, you should be able to watch these trailers in Opera now.


Post a Comment

<< Home