分页: 1 / 1
[原创]在 Ubuntu 中使用 mplayer 下载流媒体 [内附春晚链接]
发表于 : 2007-02-18 6:15
由 Ray
用mplayer下载流媒体文件的命令格式:
代码: 全选
mplayer -dumpstream -dumpfile 本地文件名 rtsp://连接地址
或者:
代码: 全选
mplayer -dumpstream -dumpfile 本地文件名 mms://连接地址
比如我们下载2007年春晚:
代码: 全选
mplayer -dumpstream -dumpfile zt2006012801.rm rtsp://real.people.com.cn/1/zht/zt2006012801.rm
如果只对某个节目感兴趣的也可以单独下载:
比如相声《免费电话》
代码: 全选
mplayer -dumpstream -dumpfile 003.rm rtsp://real.people.com.cn/7/zht/2007chunwan/003.rm
小品《送礼》
代码: 全选
mplayer -dumpstream -dumpfile 007.rm rtsp://real.people.com.cn/7/zht/2007chunwan/007.rm
其他的请到这里去找:
http://av.people.com.cn/GB/28140/76746/78473/index.html
以上链接来自人民网。
-----------------
测试环境: Ubuntu 6.10 DeskTop
http://www.lirui.name
发表于 : 2007-02-18 6:37
由 Ray
再补几个:
小品《将爱情进行到底》
mplayer -dumpstream -dumpfile 013.rm rtsp://real.people.com.cn/7/zht/2007chunwan/013.rm
小品《考验》
mplayer -dumpstream -dumpfile 015.rm rtsp://real.people.com.cn/7/zht/2007chunwan/015.rm
武术《行云流水》
mplayer -dumpstream -dumpfile 019.rm rtsp://real.people.com.cn/7/zht/2007chunwan/019.rm
小品《策划》
mplayer -dumpstream -dumpfile 028.rm rtsp://real.people.com.cn/7/zht/2007chunwan/028.rm
发表于 : 2007-02-18 9:49
由 flyinflash
很好啊。
不过不知道网速慢的能不能流畅地欣赏。
发表于 : 2007-02-18 10:33
由 Ray
flyinflash 写了:很好啊。
不过不知道网速慢的能不能流畅地欣赏。
你可以等下载完毕以后再看啊?
发表于 : 2007-02-18 11:31
由 yysq009
楼主这些命令那里找到的阿???好多命令手册上都没有。。。有点默然了!
发表于 : 2007-02-18 11:46
由 Ray
yysq009 写了:楼主这些命令那里找到的阿???好多命令手册上都没有。。。有点默然了!
好多?翻来覆去不就一条命令吗,参数都一样。嘿嘿
其实man里面有
代码: 全选
-dumpaudio (MPlayer only)
Dumps raw compressed audio stream to ./stream.dump (useful with
MPEG/AC3). If you give more than one of -dumpaudio, -dumpvideo,
-dumpstream on the command line only the last one will work.
-dumpfile <filename> (MPlayer only)
Specify which file MPlayer should dump to. Should be used to‐
gether with -dumpaudio / -dumpvideo / -dumpstream.
-dumpstream (MPlayer only)
Dumps the raw stream to ./stream.dump. Useful when ripping from
DVD or network. If you give more than one of -dumpaudio,
-dumpvideo, -dumpstream on the command line only the last one
will work.
-dumpvideo (MPlayer only)
Dump raw compressed video stream to ./stream.dump (not very us‐
able). If you give more than one of -dumpaudio, -dumpvideo,
-dumpstream on the command line only the last one will work.
-dvbin <options> (DVB only)
Pass the following parameters to the DVB input module, in order
to override the default ones:
card=<1-4>
Specifies using card number 1-4 (default: 1).
file=<filename>
Instructs MPlayer to read the channels list from <file‐
name>. Default is ~/.mplayer/chan‐
nels.conf.{sat,ter,cbl,atsc} (based on your card type)
or ~/.mplayer/channels.conf as a last resort.
timeout=<1-30>
Maximum number of seconds to wait when trying to tune a
transponder before giving up (default: 3).
-dvd-device <path to device> (DVD only)
Specify the DVD device (default: /dev/dvd). You can also speci‐
fy a directory that contains files previously copied directly
from a DVD (with e.g. vobcopy). Note that using -dumpstream is
Manual page mplayer(1) line 788
发表于 : 2007-02-18 12:15
由 zhwlyfx
Opening joystick device /dev/input/js0
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
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://real.people.com.cn/7/zht/2007chunwan/003.rm.
STREAM_RTSP, URL: rtsp://real.people.com.cn/7/zht/2007chunwan/003.rm
Resolving real.people.com.cn for AF_INET6...
Couldn't resolve name for AF_INET6: real.people.com.cn
Resolving real.people.com.cn for AF_INET...
Connecting to server real.people.com.cn[202.99.23.203]: 554...
Cache size set to 640 KBytes
就停在这个地方不动了,请问怎么回事阿
发表于 : 2007-02-18 12:25
由 Ray
zhwlyfx 写了:Opening joystick device /dev/input/js0
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
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://real.people.com.cn/7/zht/2007chunwan/003.rm.
STREAM_RTSP, URL: rtsp://real.people.com.cn/7/zht/2007chunwan/003.rm
Resolving real.people.com.cn for AF_INET6...
Couldn't resolve name for AF_INET6: real.people.com.cn
Resolving real.people.com.cn for AF_INET...
Connecting to server real.people.com.cn[202.99.23.203]: 554...
Cache size set to 640 KBytes
就停在这个地方不动了,请问怎么回事阿
一切正常,文件已经开始下载了。没有进度条的。
发表于 : 2007-02-18 12:49
由 bones7456
呵呵,不错!顶!
发表于 : 2007-02-18 14:14
由 zhwlyfx
楼上的,我怎么找不到要下载的文件名阿,比方说你怎么知道《策划》的地址是 rtsp://real.people.com.cn/7/zht/2007chunwan/028.rm
并且文件名是028.rm
发表于 : 2007-02-18 15:50
由 Ray
zhwlyfx 写了:楼上的,我怎么找不到要下载的文件名阿,比方说你怎么知道《策划》的地址是 rtsp://real.people.com.cn/7/zht/2007chunwan/028.rm
并且文件名是028.rm
在左边的节目列表中选个节目,点一下。
如果你用FF,会新开一个标签页。在标签页面上找“
若不能自动播放,请点击此处收看\听”
把鼠标放在上面——鼠标右键——复制链接地址…………
剩下不用说了吧?
发表于 : 2007-02-18 23:35
由 5luoya
可惜没有韩红和郝歌合唱的《在那遥远的地方》。
发表于 : 2007-02-19 0:08
由 millenniumdark
一直不知道mplayer还可以这样用。
mplayer果然是老牌劲旅啊!
发表于 : 2007-02-19 11:50
由 zhwlyfx
3q阿