Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Streaming Media (HOW-TO)
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
Ryan@warpfive
n00b
n00b


Joined: 04 Sep 2003
Posts: 11
Location: Kettering, UK

PostPosted: Sun Aug 01, 2004 5:55 pm    Post subject: Streaming Media (HOW-TO) Reply with quote

A few days ago I posted a message asking for help in getting streaming media working using mplayer & RealPlayer as I wasn't having much luck. I got a few pointers and after a weekend of messing around I've managed to get it working. Here is what I've done and if anyone wants to make suggestions etc please feel free to do so.

My configuration is

AMD 2600+ (Barton)
512Mb RAM
60GB IDE Hard disk
ABIT NFORCE-2 mother board
NVIDIA MX400 based graphics card

Running Xorg & the latest ~x86 builds of the Nvidia kernel & X drivers.

All of this needs to be done as root, and only appears to work with firefox or mozilla.

1. Getting Portage Setup

The first step is to make the right packages available in portage as some of them are masked and a few are still marked ~x86
Code:
cd /etc/portage

If the directory doesn't exist then create it as this is where the portage override files need to go. The next thing to do is create the keywords file which will allow ~x86 packaged to be emerged.
Code:
nano -w package.keywords

The add the line
Quote:
net-www/mplayerplug-in ~x86
and save the changes. This will allow mplayerplug-in version 2.66 to be built otherwise you get version 0.91 which crashes Firefox. The next file to create is the unmask file.
Code:
nano -w package.unmask

The add the lines:
Code:
media-video/realplayer
media-plugins/realvideo-codecs

to release realplayer and the appropriate codecs. When you emerge this you will get RealPlayer 8 but the codecs pack will allow it to play version 9 and 10 streams as well.

2. Use flags

The use flags for mplayer are very important. If you use flags don't contain some of the following then you will have trouble playing streaming media. I needed to add the following to my use flags in make.conf
Code:

3dnow      : Adds support for 3dnow multimedia processor instructions
divx4linux : Adds support for divx.com's DivX(tm) mpeg4 libary
directfb     : Adds support for DirectFB layer (library for FB devices)
fbdev        : Enable FBDev render support
live           : Enables live.com streaming media support
mmx        : Adds support for optimizations for Pentium MMX and Athlon class processors
nas          : Adds support for network audio sound
network    : Enables network streaming support
rtc           : Enables usage of the linux real time clock.  The alternative is software emulation of rtc.
sse         : fast floating point optimization for PentiumIII+ class chips

If you want a full list of flags for mplayer emerge gentoolkit and then run etcat uses mplayer

3. Emerging the packages

Now the use flags are setup and the package overrides are setup it's time to start emerging the packages. You need to do this in order as it will save you having to emerge a package again for example if you mplayer before realplayer then mplay will not support realplayer streams.

The plugins only seem to work with Mozilla or Firefox so we'll start there. I like firefox so
Code:
emerge mozilla-firefox

and go an read a good book. The follow this up with realplayer.
Code:
emerge realplayer

Note the ebuild will not automatically download the binary for you as you have to fill your details in on Real's website first, so follow what the ebuild tells you to do. It will however automitically download the codec pack for you. Now do mplayer
Code:
emerge mplayer

again read a book if your on a slow machine. Finally emege the mplayerplug-in
Code:
emerge mplayerplug-in

Once all that is done run Firefox or Mozilla and in the address bar enter
Quote:
about:plugins
and if all has worked you should get a list like this:
Code:

QuickTime Plug-in 6.0, Windows Media Player Plugin are supported by mplayerplug-in

    File name: mplayerplug-in.so
    mplayerplug-in 2.66

    Video Player Plug-in for QuickTime, RealPlayer and Windows Media Player streams using MPlayer
    JavaScript Enabled

MIME Type    Description    Suffixes    Enabled
video/quicktime    Quicktime    mov    Yes
video/x-quicktime    Quicktime    mov    Yes
image/x-quicktime    Quicktime    mov    Yes
video/quicktime    Quicktime    mp4    Yes
video/quicktime    Quicktime - Session Description Protocol    sdp    Yes
application/x-quicktimeplayer    Quicktime    mov    Yes
video/x-ms-asf-plugin    Windows Media    asf,asx    Yes
video/x-msvideo    AVI    avi    Yes
video/msvideo    AVI    avi    Yes
application/x-mplayer2    WMV    wmv    Yes
video/x-ms-wm    MSNBCPlayer    asf    Yes
video/x-ms-asf    Windows Media    asf,asx    Yes
video/x-ms-wmv    Windows Media    wmv    Yes
video/x-ms-wmp    Windows Media    wmp    Yes
video/x-ms-wvx    Windows Media    wvx    Yes
audio/x-ms-wax    Windows Media    wax    Yes
audio/x-ms-wma    Windows Media    wma    Yes
application/x-drm-v2    Windows Media    asx    Yes
audio/wav    Microsoft wave file    wav    Yes
audio/x-wav    Microsoft wave file    wav    Yes
video/mpeg    MPEG    mpg,mpeg    Yes
audio/mpeg    MPEG    mpg,mpeg    Yes
video/x-mpeg    MPEG    mpg,mpeg    Yes
video/x-mpeg2    MPEG2    mpv2,mp2ve    Yes
audio/mpeg    MPEG    mpg,mpeg    Yes
audio/x-mpeg    MPEG    mpg,mpeg    Yes
audio/mpeg2    MPEG audio    mp2    Yes
audio/x-mpeg2    MPEG audio    mp2    Yes
audio/mpeg3    MPEG audio    mp3    Yes
audio/x-mpeg3    MPEG audio    mp3    Yes
audio/mp3    MPEG audio    mp3    Yes
video/mp4    MPEG 4 Video    mp4    Yes
video/fli    FLI animation    fli,flc    Yes
video/x-fli    FLI animation    fli,flc    Yes
video/vnd.vivo    VivoActive    viv,vivo    Yes
rpnp.so

    File name: rpnp.so

MIME Type    Description    Suffixes    Enabled
audio/x-pn-realaudio-plugin    RealPlayer Plugin Metafile    rpm    Yes
Default Plugin

    File name: libnullplugin.so
    The default plugin handles plugin data for mimetypes and extensions that are not specified and facilitates downloading of new plugins.

MIME Type    Description    Suffixes    Enabled
*    All types    .*    Yes



Then try a site with media like http://www.apple.com/trailers

4. Problems

The only issues I have so far are

1. RealPlayer takes about a minute to become functional when starting it up from the command line ... but this might be down to having a left over file from some of the many packages I've tried over the weekend.

2. mplayer seems to be dropping frames in Xorg. I'm not sure if I have missed an option here for the mplayer ebuild or I haven't got something configured properly in X.

I hope this help you and have fun
Ryan
Back to top
View user's profile Send private message
fctk
Veteran
Veteran


Joined: 28 Jan 2004
Posts: 1424
Location: Milan, Italy, EU

PostPosted: Mon Aug 02, 2004 10:28 am    Post subject: Reply with quote

is it possible to use Realplayer10 instead of that one in the portage? RP10 has gtk2 support...
Back to top
View user's profile Send private message
cokey
Advocate
Advocate


Joined: 23 Apr 2004
Posts: 3355

PostPosted: Mon Aug 02, 2004 10:31 am    Post subject: Reply with quote

well the good thing is that the BBC are making their own format up soon and that should be the definitive in streaming video shortly
_________________
https://otw20.com/ OTW20 The new place for off the wall chat
Back to top
View user's profile Send private message
bernard604
n00b
n00b


Joined: 25 Mar 2003
Posts: 51

PostPosted: Tue Aug 03, 2004 3:22 am    Post subject: mlb.com and mplayer Reply with quote

Thanks for the mplayer plugin how-to.

I followed your procedures, and got most things to work, like movie trailers from the above link.
But I have not gotten the video from MLB.com to work, I just get the
audio.

Is this possible using mplayer plugins ?
Back to top
View user's profile Send private message
Ateo
Advocate
Advocate


Joined: 02 Jun 2003
Posts: 2021
Location: Republic of California

PostPosted: Tue Aug 03, 2004 4:57 am    Post subject: Reply with quote

fctk wrote:
is it possible to use Realplayer10 instead of that one in the portage? RP10 has gtk2 support...


Absolutely. It's what I use.
Back to top
View user's profile Send private message
fctk
Veteran
Veteran


Joined: 28 Jan 2004
Posts: 1424
Location: Milan, Italy, EU

PostPosted: Tue Aug 03, 2004 10:32 am    Post subject: Reply with quote

Ateo wrote:
Absolutely. It's what I use.

but... do you installed it from an ebuild or from the binary?
and... is it possible to use both rp10 and the Ryan@warpfive's guide?

rp8 is horrible and realone doesn't want to be installed on my system... :roll:
Back to top
View user's profile Send private message
Psycam
n00b
n00b


Joined: 26 Jun 2004
Posts: 17

PostPosted: Tue Aug 03, 2004 1:50 pm    Post subject: Reply with quote

thanks for the howto! Firefox plays media fine now.
Back to top
View user's profile Send private message
damsos
Tux's lil' helper
Tux's lil' helper


Joined: 13 Apr 2004
Posts: 142
Location: PARIS

PostPosted: Tue Aug 03, 2004 1:59 pm    Post subject: Reply with quote

cokehabit wrote:
well the good thing is that the BBC are making their own format up soon and that should be the definitive in streaming video shortly


what makes you saying that ?
_________________
so much to do, so little time.
Back to top
View user's profile Send private message
cokey
Advocate
Advocate


Joined: 23 Apr 2004
Posts: 3355

PostPosted: Tue Aug 03, 2004 9:34 pm    Post subject: Reply with quote

because the BBC says they are going to make their own format soon...
_________________
https://otw20.com/ OTW20 The new place for off the wall chat
Back to top
View user's profile Send private message
Ryan@warpfive
n00b
n00b


Joined: 04 Sep 2003
Posts: 11
Location: Kettering, UK

PostPosted: Tue Aug 03, 2004 9:38 pm    Post subject: Reply with quote

Hi fctk,

Sorry for not replying sooner. I should imaging you can use RealPlayer 10, all you would need to do is download the binary from real.com and then do
Code:
ln -s <path to realplayer10 install>/mozilla/nphelix.so /usr/lib/nsbrowser/plugins/nphelix.so
ln -s <path to realplayer10 install>/mozilla/nphelix.xpt /usr/lib/nsbrowser/plugins/nphelix.xpt

This will enable the plugin in mozilla or firefox. Which is what the ebuild does for you if I read the code correctly.

By the way on a side note I did try to get this working in Konqueror by going Settings -> Configure Konqueror. Then selecting plugins adding the /usr/lib/nsbrowser/plugins/ directory to the list of scan folders. When I click the "Scan for New Plugins" button I can get the plugins listed but they don't seem to work when browsing webpages. If anyone has any ideas as to why please let me know and if I can get it workig I'll update the HOW-TO.

Ryan


Last edited by Ryan@warpfive on Tue Aug 03, 2004 10:18 pm; edited 1 time in total
Back to top
View user's profile Send private message
Ryan@warpfive
n00b
n00b


Joined: 04 Sep 2003
Posts: 11
Location: Kettering, UK

PostPosted: Tue Aug 03, 2004 10:04 pm    Post subject: Reply with quote

Hi bernard604,

I've had a look at mlb.com and it appears that all the video is coded up using the Windows Media 9. mplayer which is what the mplayerplug-in calls to display the video has support for Windows Media 9 codecs on x86 platforms. The only thing I can't tell is how new the codecs are as I don't understand what the ${PN} means in the ebuild for the win32codec package. The only reason I mention this is if you go to http://www4.mplayerhq.hu/homepage/design7/codecs.html you'll see the Win32 (complete) codec package is dated 20040703.

You could try backing up you current codec directory /usr/lib/win32 and putting whats in that file in there and trying again. If it breaks then restore the backup.

Hope this helps
Ryan
Back to top
View user's profile Send private message
bernard604
n00b
n00b


Joined: 25 Mar 2003
Posts: 51

PostPosted: Wed Aug 04, 2004 1:44 am    Post subject: mlb.com Reply with quote

Thanks for the suggestion. It did not work, but it was a good idea.
Back to top
View user's profile Send private message
damsos
Tux's lil' helper
Tux's lil' helper


Joined: 13 Apr 2004
Posts: 142
Location: PARIS

PostPosted: Wed Aug 04, 2004 7:09 am    Post subject: Reply with quote

cokehabit wrote:
because the BBC says they are going to make their own format soon...

why would it be the definitive format for streaming video ?
_________________
so much to do, so little time.
Back to top
View user's profile Send private message
cokey
Advocate
Advocate


Joined: 23 Apr 2004
Posts: 3355

PostPosted: Wed Aug 04, 2004 7:38 am    Post subject: Reply with quote

ah-ha, ask the right question then you might get the right answer!

Well they are a non-profit organisation paid for by the British taxpayer so they are not trying to make money out of it (have a look on the website, tell me how many adverts you see). And they are not out to make a fast buck

When they do something they tend to do it right otherwise there is a huge backlash from the British public because they have just wasted a load of our money.

They have one of the biggest archives of videos for viewing on the web (in sheer number, not MB) and they want to get it all working right.
_________________
https://otw20.com/ OTW20 The new place for off the wall chat
Back to top
View user's profile Send private message
mlsfit138
Guru
Guru


Joined: 20 Sep 2003
Posts: 406
Location: Washington

PostPosted: Fri Aug 06, 2004 8:10 am    Post subject: Reply with quote

I think xiph has been working on this as well.
_________________
"Everytime you justify
another good in you dies"

-Converge, The Saddest Day, Petitioning the Empty Sky
Back to top
View user's profile Send private message
fctk
Veteran
Veteran


Joined: 28 Jan 2004
Posts: 1424
Location: Milan, Italy, EU

PostPosted: Sat Aug 07, 2004 2:01 pm    Post subject: Re: Streaming Media (HOW-TO) Reply with quote

Ryan@warpfive wrote:
2. Use flags

The use flags for mplayer are very important. If you use flags don't contain some of the following then you will have trouble playing streaming media. I needed to add the following to my use flags in make.conf
Code:

3dnow      : Adds support for 3dnow multimedia processor instructions
divx4linux : Adds support for divx.com's DivX(tm) mpeg4 libary
directfb     : Adds support for DirectFB layer (library for FB devices)
fbdev        : Enable FBDev render support
live           : Enables live.com streaming media support
mmx        : Adds support for optimizations for Pentium MMX and Athlon class processors
nas          : Adds support for network audio sound
network    : Enables network streaming support
rtc           : Enables usage of the linux real time clock.  The alternative is software emulation of rtc.
sse         : fast floating point optimization for PentiumIII+ class chips

are all that use flag necessary? can i omit someone?
Back to top
View user's profile Send private message
Ryan@warpfive
n00b
n00b


Joined: 04 Sep 2003
Posts: 11
Location: Kettering, UK

PostPosted: Mon Aug 09, 2004 8:20 am    Post subject: Re: Streaming Media (HOW-TO) Reply with quote

fctk wrote:
are all that use flag necessary? can i omit someone?


No you can leave some out. I think the most important ones are live, network and nas for streaming media .... everything else is optional.

Ryan
Back to top
View user's profile Send private message
fctk
Veteran
Veteran


Joined: 28 Jan 2004
Posts: 1424
Location: Milan, Italy, EU

PostPosted: Mon Aug 09, 2004 10:51 am    Post subject: Reply with quote

but... why should i recompile mplayer? maybe in order to be able to play streams directly with mplayer? isn't better to use realplayer for that?
Back to top
View user's profile Send private message
Ryan@warpfive
n00b
n00b


Joined: 04 Sep 2003
Posts: 11
Location: Kettering, UK

PostPosted: Mon Aug 09, 2004 11:06 am    Post subject: Reply with quote

fctk,

If all you’re interested in is RealPayer streams then you don't need to have mplayer on your system at all. All you would have to do is download RealPlayer 10 from http://www.real.com and install it. Once it is installed the plugins for mozilla and firefox are in the wrong place so you need to do the manual step of
Code:

ln -s <path to realplayer10 install>/mozilla/nphelix.so /usr/lib/nsbrowser/plugins/nphelix.so
ln -s <path to realplayer10 install>/mozilla/nphelix.xpt /usr/lib/nsbrowser/plugins/nphelix.xpt

then things are up and running for RealPlayer streams.

By adding mplayer and mplayerplug-in you add the ability to watch QuickTime, Windows Media, MPEG plus a few other formats. BUT to make mplayer support these formats as streaming media you need to have live, network and nas in your use variable.

Ryan
Back to top
View user's profile Send private message
TheWoopWoop
n00b
n00b


Joined: 10 Feb 2004
Posts: 30

PostPosted: Sat Aug 14, 2004 5:03 am    Post subject: Reply with quote

Great thread. Thanks for the help!
Back to top
View user's profile Send private message
Cartroo
n00b
n00b


Joined: 04 Aug 2004
Posts: 41

PostPosted: Sat Aug 14, 2004 5:35 pm    Post subject: Not embedding? Reply with quote

I've managed to get mplayer working fine, but it seems to refuse to embed itself in a web page. Is this normal? The download bar appears in the page, and when it's finished the controls go there, but the video itself appears in a new window instead of in the web page. Is there any way to stop this?

My mplayerplug-in.conf is:

Code:
#debug=0
#logfile=$HOME/mpp.log
vo=gl2,x11
#ao=arts,esd,oss
#download=1
#dload-dir=$HOME/tmp
#keep-download=0
#noembed=0
#cachesize=256
#use-mimetypes=0
enable-real=0
enable-wm=1
enable-qt=1
enable-mpeg=1
#qt-speed=med
#rtsp-use-tcp=0
#nomediacache=0
fileonly-embed=0


I think I've tried all the combinations of fileonly-embed and noembed and they didn't seem to make any difference.

Thanks for the info, by the way, it makes life so much easier having all you helpful people out there :)
Back to top
View user's profile Send private message
Wi1d
Apprentice
Apprentice


Joined: 15 Mar 2004
Posts: 282
Location: USA, Iowa

PostPosted: Sun Aug 22, 2004 6:57 pm    Post subject: Reply with quote

Thanks alot for the howto. Worked like a charm.
Back to top
View user's profile Send private message
Wi1d
Apprentice
Apprentice


Joined: 15 Mar 2004
Posts: 282
Location: USA, Iowa

PostPosted: Tue Aug 24, 2004 6:44 pm    Post subject: Reply with quote

Cartroo wrote:
I've managed to get mplayer working fine, but it seems to refuse to embed itself in a web page. Is this normal? The download bar appears in the page, and when it's finished the controls go there, but the video itself appears in a new window instead of in the web page. Is there any way to stop this?

Did you ever find a solution to getting mplayer to embed? Does anyone else know how to get it to embed?
Back to top
View user's profile Send private message
paranode
l33t
l33t


Joined: 06 Mar 2003
Posts: 679
Location: Texas

PostPosted: Fri Sep 10, 2004 2:16 pm    Post subject: Reply with quote

Wi1d wrote:
Cartroo wrote:
I've managed to get mplayer working fine, but it seems to refuse to embed itself in a web page. Is this normal? The download bar appears in the page, and when it's finished the controls go there, but the video itself appears in a new window instead of in the web page. Is there any way to stop this?

Did you ever find a solution to getting mplayer to embed? Does anyone else know how to get it to embed?

Sorry to bump an old thread, but I was trying to find this out myself. It is the gl2 driver. If you switch it back to xv it will embed itself in the page.
_________________
Meh.
Back to top
View user's profile Send private message
chrisdupre
Tux's lil' helper
Tux's lil' helper


Joined: 30 May 2003
Posts: 120

PostPosted: Fri Sep 10, 2004 2:32 pm    Post subject: Reply with quote

Ryan@warpfive,
I tried what you said about downloading it from the realplayer site and extracting .bz2 file. I symlinked the files you said to symlink, but still no go? I really want to use realplayer instead of mplayerplug-in or mplayer. I use mozilla-firefox 0.9.3.
code:
ln -s /home/chris/realplayer/RealPlayer/mozilla/nphelix.so /usr/lib/nsbrowser/plugins/nphelix.so

ln -s /home/chris/realplayer/RealPlayer/mozilla/nphelix.xpt /usr/lib/nsbrowser/plugins/nphelix.xpt

I checked the directories and they are their nphelix.so and nphelix.xpt.

I went to apple.com and tried the trailers, but it says I have to download quicktime?

Thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum