分享
 
 
 

HOWTO Rip Streams With MPlayer

王朝other·作者佚名  2006-01-27
窄屏简体版  字體: |||超大  

Contents

[hide]

1 Introduction

2 Codecs

2.1 Quicktime

2.2 Real Media

2.2.1 Default way

2.2.2 Alternative way

2.3 Live.com

3 Installation

4 Testing

4.1 Working streams

4.1.1 Real Media

4.1.2 Quicktime

4.1.3 Windows Media

4.2 Problematic streams

5 Ripping

6 Playing

7 Useful links

[edit]

Introduction

The aim of this howto is to rip (i. e. save on the hard disk) audio/video streams using MPlayer.

MPlayer can handle most of the streaming formats that are used on the Internet: Real Media, Windows Media and Quicktime are the most important ones.

[edit]

Codecs

[edit]

Quicktime

If you want the support for Quicktime movies, compile MPlayer with the win32codecs USE flag, then issue the following command:

# emerge -pv mplayer

and check that the win32codecs package is going to be compiled with the quicktime USE flag. If it isn't the syntax to compile it in is:

# USE="quicktime,win32codecs" emerge -av mplayer

[edit]

Real Media

Real Media codecs are provided by two different packages: realplayer and win32codecs. By default, realplayer's ones are used due to security issues with the latter, but in my experience some streams can be correctly played only if you use win32codecs. The default behaviour can be eventually changed with a little tweak, which anyway makes things slightly more difficult. So, if you really care security proceed with the default way, otherwise carry on with the alternative way.

[edit]

Default way

This is the easiest way, as you only need to compile MPlayer with the real USE flag. Portage will install realplayer as a required dependency. Codecs will be installed in /opt/RealPlayer/codecs/ directory.

[edit]

Alternative way

We need to tweak MPlayer's ebuild. Before proceeding, let's copy it and some other required files to the overlay directory. In this example, we'll assume your PORTDIR_OVERLAY is set to /etc/portage.

If you don't know what an overlay is or you don't have it yet, please read this howto.

# mkdir -p /etc/portage/media-video/mplayer/files

# cp -Rv /usr/portage/media-video/mplayer/* /etc/portage/media-video/mplayer/

Now open /etc/portage/media-video/mplayer/mplayer-1.0_pre7-r1.ebuild with your favourite editor.

File: /etc/portage/media-video/mplayer/mplayer-1.0_pre7-r1.ebuild

We don't need realplayer, so comment it out:

...

#x86? ( real? ( >=media-video/realplayer-10.0.3 ) )

...

MPlayer should look for win32codecs, not for those provided by realplayer:

...

pkg_setup() {

if use real && use x86; then

#REALLIBDIR="/opt/RealPlayer/codecs"

REALLIBDIR="/usr/lib/win32"

fi

}

...

Finally, create the digest file:

# ebuild mplayer-1.0_pre7-r1.ebuild digest

Before emerging MPlayer, make sure it will be compiled with the win32codecs and real USE flags. You have to enable the real USE flag for win32codecs package, too:

# echo "media-libs/win32codecs real" >> /etc/portage/package.use

[edit]

Live.com

Since some streams need Live.com support, it is recommended that you compile MPlayer with the live USE flag, otherwise you may get an error like this:

Playing rtsp://realserver.kataweb.it/katanew/news_ansa/1099310401142_Mondo_20041101125647_low.rm.

Resolving realserver.kataweb.it for AF_INET...

Couldn't resolve name for AF_INET: realserver.kataweb.it

Not a Realmedia rtsp url. Trying standard rtsp protocol.

RTSP support requires the "LIVE.COM Streaming Media" libraries!

Unabl to open URL: rtsp://realserver.kataweb.it/katanew/news_ansa/1099310401142_Mondo_20041101125647_low.rm

[edit]

Installation

This is simple:

# emerge -av mplayer

[edit]

Testing

The best way to see if everything went well is to play some movies before trying to rip them. All you need is to find the URLs of some streams and launch them with MPlayer:

$ mplayer "<url>"

If you have problems you can try to add the -playlist option:

$ mplayer -playlist "<url>"

If you still can't view your video, try to use wget and cat commands. For example:

$ wget "http://www.br-online.de/cgi-bin/ravi?v=alpha/centauri/v/&g2=1&f=041027.rm"

$ cat "ravi?v=alpha%2Fcentauri%2Fv%2F&g2=1&f=041027.rm"

This will show you:

Code: $ cat "ravi?v=alpha%2Fcentauri%2Fv%2F&g2=1&f=041027.rm"

rtsp://ravi.br-online.de:5050/ravi/alpha/centauri/v/041027.rm

--stop--

pnm://ravi.br-online.de/ravi/alpha/centauri/v/041027.rm

Grab the first URL and play it with MPlayer:

$ mplayer rtsp://ravi.br-online.de:5050/ravi/alpha/centauri/v/041027.rm

Note: if you can choose, always prefer the rtsp://, http:// or mms:// protocols over the pnm://, as the latter is not well supported by MPlayer yet.

[edit]

Working streams

The following streams are guaranteed to work with MPlayer:

[edit]

Real Media

rtsp://ravi.br-online.de:5050/ravi/alpha/centauri/v/041027.rm

http://pdl.warnerbros.com/wbol/us/whv/med/matrix/collection/ultimate_matrix_collection_sizzle_tlr_100.rm

rtsp://a157.v59133.c5913.g.vr.akamaistream.net/ondemand/7/157/5913/418966df/whitehouse.download.akamai.com/5913/20041103-3.v.rm

rtsp://real.nasa-global.speedera.net/real.nasa-global/ascan_2004/hq_050604_spacedays.rm

rtsp://a1496.v78706.c7870.g.vr.akamaistream.net/ondemand/7/1496/7870/v0001/mitstorage.download.akamai.com/7870/8/8.03/f04/video/ocw-8.03-lec-mit-30sep2004-0007-220k.rm

rtsp://rmlivev8.bbc.net.uk/farm/*/ev7/live24/worldservice/livenews_v8.ra

pnm://rm.bbc.net.uk/news/media/audio/40386000/rm/_40386563_mol.rm

The following movie also works, but you have to play it with -vc rv20 and -fps 30 options:

rtsp://137.78.25.101:554/Video-Galileo-AVC-2003-182.rm

The following movie works with -vfm realvid option:

pnm://rm.bbc.net.uk/news/media/video/39688000/rm/_39688671_leeds23_gilmore_vi.rm

The following movies works if you add the -playlist option:

http://www.dreamworks.com/trailers/island/island_trlr3_rm_750.ram

http://www.ifilm.com/RealPlaylist?l=-2087040320&ifilmId=2669030&bandwidth=300

http://www.kusc.org/streams/kusc96.ram

http://play.rbn.com/?url=nfl/nfl/open/packers/demand/TrainingCamp05/050805sherman_300.rm&proto=rtsp

[edit]

Quicktime

http://movies.apple.com/movies/newline/blade_trinity/blade_trinity-tlr2_240.mov

[edit]

Windows Media

http://www.penguinbomb.com/omniscaper/WIPS/trench.wmv

mms://vip1.yacast.fr/encodereurope1

[edit]

Problematic streams

Unfortunately there are some movies we can't display correctly:

rtsp://realserver.kataweb.it/katanew/news_ansa/1099310401142_Mondo_20041101125647_low.rm

pnm://a1496.v78706.c7870.g.vr.akamaistream.net/ondemand/7/1496/7870/v0001/mitstorage.download.akamai.com/7870/8/8.03/f04/video/ocw-8.03-lec-mit-30sep2004-0007-220k.rm

http://moviesaskew.com/movies2/par.mov (no audio)

To solve audio problems, compile with aac, mmxext and sse2 USE flags (can't remember if they are all neccessary). Swift 11:31, 3 October 2005 (GMT)

http://www.exploratorium.edu/rafiles/cycling/r_braking.ram

http://64.236.34.4:5190/stream/1003

http://images.apple.com/movies/us/hd_gallery/gl1800/480p/the_brothers_grimm_m480pa.mov

http://www.the-mario-opera.com/mariopera_high.mov

Works for me, try AAC use flag --24.20.144.231 23:24, 16 October 2005 (GMT)

Please edit this howto if you know how to play any of them.

[edit]

Ripping

$ mplayer -dumpstream "<url>" -dumpfile <file>

or eg

$ mplayer -playlist "<url>" -dumpstream -dumpfile <file>

[edit]

Playing

If when trying to play a ripped Real Audiofile mplayer exits with a

Playing .RMF.

File not found: '.RMF'

Failed to open .RMF

create a textfile called .ram

rippedfile.ram

with the location of the ripped file as content, eg

rippedfile.rm

if both files are in the same directory

[edit]

Useful links

From MPlayer's homepage:

Documentation

Binary Codecs for MPlayer

Codec Status Table

Streaming from network or pipes

Samples

From Gentoo Wiki:

HOWTO Emerge MPlayer

From Gentoo Discussion Forums:

Streaming Media (HOW-TO)

Mplayer without realplayer

Others:

HOWTO connect to Ffmpeg, QuickTime, Icecast, Ogg/Vorbis and Icecast Theora streams from Linux, Mac and Windows

NPR show streaming

RealAudio and RealVideo Test Clips

RTSP/RTP streaming support for MPlayer

Live Media Streaming Libary

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有