4814
- 收藏
- 点赞
- 分享
- 举报
live555移植笔记一 ubuntu下live555+SMplayer在本机搭建rtsp服务器并验证
本帖最后由 microcreat 于 2013-1-7 09:05 编辑
环境:
ubuntu-11.04-desktop-amd64.iso
一,前期准备:
1,下载live555
下载源码:[url]http://www.live555.com/liveMedia/public[/url]
可以下载最新的,我下载的版本是:live.2012.12.24.tar.gz
2,安装live555
root@microcreat:/workdir/private# ls
live555-latest.tar.gz
root@microcreat:/workdir/private# tar -zxvf live555-latest.tar.gz
root@microcreat:/workdir/private# ls
live live555-latest.tar.gz
root@microcreat:/workdir/private/live# ls
BasicUsageEnvironment config.freebsd config.solaris-32bit Makefile
config.aix config.iphoneos config.solaris-64bit Makefile.head
config.alpha config.irix config.sunos Makefile.tail
config.armeb-uclibc config.linux config.uClinux mediaServer
config.armlinux config.linux-64bit configure proxyServer
config.avr32-linux config.linux-gdb COPYING README
config.bfin-linux-uclibc config.macosx fix-makefile testProgs
config.bfin-uclinux config.macosx-32bit genMakefiles UsageEnvironment
config.bsplinux config.macosx-before-version-10.4 genWindowsMakefiles win32config
config.cris-axis-linux-gnu config.mingw genWindowsMakefiles.cmd win32config.Borland
config.cygwin config.openbsd groupsock WindowsAudioInputDevice
config.cygwin-for-vlc config.qnx4 liveMedia
root@microcreat:/workdir/private/live# ./genMakefiles linux
root@microcreat:/workdir/private/live# make
这样就编译完成了。
3,安装SMplayer
sudo add-apt-repository ppa:rvm/smplayer
sudo apt-get update
sudo apt-get install smplayer smtube smplayer-themes
注:如果下面的错误:
root@microcreat:/workdir/private# sudo apt-get install smplayer smtube smplayer-themes
Reading package lists... Error!
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/cn.archive.ubuntu.com_ubuntu_dists_natty_restricted_i18n_Translation-en
E: The package lists or status file could not be parsed or opened.
解决方法是:
sudo rm /var/lib/apt/lists/* -vf
sudo apt-get update
这样SMplayer就安装OK了。
可以用"Applications -> Sound & Video -> MPlayer Movie Player"来运行mplayer。
二,用本机搭建RTSP服务器
2.1其实很简单,就是利用刚刚编译成功的live555的源码。
root@microcreat:/workdir/private/live/mediaServer# pwd
/workdir/private/live/mediaServer
root@microcreat:/workdir/private/live/mediaServer# ls
COPYING DynamicRTSPServer.hh in.264 live555MediaServer.cpp Makefile Makefile.tail
DynamicRTSPServer.cpp DynamicRTSPServer.o live555MediaServer live555MediaServer.o Makefile.head version.hh
在此项目中放入一个in.264的文件,然后启动服务器:
root@microcreat:/workdir/private/live/mediaServer# ./live555MediaServer
LIVE555 Media Server
version 0.75 (LIVE555 Streaming Media library version 2012.09.27).
Play streams from this server using the URL
[url]rtsp://192.168.196.128:8554/[/url]
where is a file present in the current directory.
Each file's type is inferred from its name suffix:
".264" => a H.264 Video Elementary Stream file
".aac" => an AAC Audio (ADTS format) file
".ac3" => an AC-3 Audio file
".amr" => an AMR Audio file
".dv" => a DV Video file
".m4e" => a MPEG-4 Video Elementary Stream file
".mkv" => a Matroska audio+video+(optional)subtitles file
".mp3" => a MPEG-1 or 2 Audio file
".mpg" => a MPEG-1 or 2 Program Stream (audio+video) file
".ts" => a MPEG Transport Stream file
(a ".tsx" index file - if present - provides server 'trick play' support)
".wav" => a WAV Audio file
".webm" => a WebM audio(Vorbis)+video(VP8) file
See [url]http://www.live555.com/mediaServer/[/url] for additional documentation.
(We use port 8000 for optional RTSP-over-HTTP tunneling, or for HTTP live streaming (for indexed Transport Stream files only).)
2.2 另外开一个终端:来启动SMplayer
root@microcreat:~# mplayer [url]rtsp://192.168.196.128:8554/in.264[/url]
mplayer: Symbol `ff_codec_bmp_tags' has different size in shared object, consider re-linking
MPlayer 1.0rc4-4.5.2 (C) 2000-2010 MPlayer Team
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 [url]rtsp://192.168.196.128:8554/in.264.[/url]
Resolving 192.168.196.128 for AF_INET6...
Couldn't resolve name for AF_INET6: 192.168.196.128
Connecting to server 192.168.196.128[192.168.196.128]: 8554...
rtsp_session: unsupported RTSP server. Server type is 'unknown'.
STREAM_LIVE555, URL: [url]rtsp://192.168.196.128:8554/in.264[/url]
Stream not seekable!
file format detected.
Initiated "video/H264" RTP subsession on port 48870
demux_rtp: Guessed the video frame rate as 30 frames-per-second.
(If this is wrong, use the "-fps" option instead.)
VIDEO: [H264] 0x0 0bpp 30.000 fps 0.0 kbps ( 0.0 kbyte/s)
open: No such file or directory
[MGA] Couldn't open: /dev/mga_vid
open: No such file or directory
[MGA] Couldn't open: /dev/mga_vid
[VO_TDFXFB] This driver only supports the 3Dfx Banshee, Voodoo3 and Voodoo 5.
[VO_3DFX] Unable to open /dev/3dfx.
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
[vdpau] Error when calling vdp_device_create_x11: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Audio: no sound
Starting playback...
Movie-Aspect is undefined - no prescaling applied.
VO: [xv] 160x128 => 160x128 Planar YV12
V: 17.4 592/592 1% 1% 0.0% 0 0
Exiting... (Quit)
这样rtsp服务器就搭建完成!
环境:
ubuntu-11.04-desktop-amd64.iso
一,前期准备:
1,下载live555
下载源码:[url]http://www.live555.com/liveMedia/public[/url]
可以下载最新的,我下载的版本是:live.2012.12.24.tar.gz
2,安装live555
root@microcreat:/workdir/private# ls
live555-latest.tar.gz
root@microcreat:/workdir/private# tar -zxvf live555-latest.tar.gz
root@microcreat:/workdir/private# ls
live live555-latest.tar.gz
root@microcreat:/workdir/private/live# ls
BasicUsageEnvironment config.freebsd config.solaris-32bit Makefile
config.aix config.iphoneos config.solaris-64bit Makefile.head
config.alpha config.irix config.sunos Makefile.tail
config.armeb-uclibc config.linux config.uClinux mediaServer
config.armlinux config.linux-64bit configure proxyServer
config.avr32-linux config.linux-gdb COPYING README
config.bfin-linux-uclibc config.macosx fix-makefile testProgs
config.bfin-uclinux config.macosx-32bit genMakefiles UsageEnvironment
config.bsplinux config.macosx-before-version-10.4 genWindowsMakefiles win32config
config.cris-axis-linux-gnu config.mingw genWindowsMakefiles.cmd win32config.Borland
config.cygwin config.openbsd groupsock WindowsAudioInputDevice
config.cygwin-for-vlc config.qnx4 liveMedia
root@microcreat:/workdir/private/live# ./genMakefiles linux
root@microcreat:/workdir/private/live# make
这样就编译完成了。
3,安装SMplayer
sudo add-apt-repository ppa:rvm/smplayer
sudo apt-get update
sudo apt-get install smplayer smtube smplayer-themes
注:如果下面的错误:
root@microcreat:/workdir/private# sudo apt-get install smplayer smtube smplayer-themes
Reading package lists... Error!
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/cn.archive.ubuntu.com_ubuntu_dists_natty_restricted_i18n_Translation-en
E: The package lists or status file could not be parsed or opened.
解决方法是:
sudo rm /var/lib/apt/lists/* -vf
sudo apt-get update
这样SMplayer就安装OK了。
可以用"Applications -> Sound & Video -> MPlayer Movie Player"来运行mplayer。
二,用本机搭建RTSP服务器
2.1其实很简单,就是利用刚刚编译成功的live555的源码。
root@microcreat:/workdir/private/live/mediaServer# pwd
/workdir/private/live/mediaServer
root@microcreat:/workdir/private/live/mediaServer# ls
COPYING DynamicRTSPServer.hh in.264 live555MediaServer.cpp Makefile Makefile.tail
DynamicRTSPServer.cpp DynamicRTSPServer.o live555MediaServer live555MediaServer.o Makefile.head version.hh
在此项目中放入一个in.264的文件,然后启动服务器:
root@microcreat:/workdir/private/live/mediaServer# ./live555MediaServer
LIVE555 Media Server
version 0.75 (LIVE555 Streaming Media library version 2012.09.27).
Play streams from this server using the URL
[url]rtsp://192.168.196.128:8554/[/url]
where
Each file's type is inferred from its name suffix:
".264" => a H.264 Video Elementary Stream file
".aac" => an AAC Audio (ADTS format) file
".ac3" => an AC-3 Audio file
".amr" => an AMR Audio file
".dv" => a DV Video file
".m4e" => a MPEG-4 Video Elementary Stream file
".mkv" => a Matroska audio+video+(optional)subtitles file
".mp3" => a MPEG-1 or 2 Audio file
".mpg" => a MPEG-1 or 2 Program Stream (audio+video) file
".ts" => a MPEG Transport Stream file
(a ".tsx" index file - if present - provides server 'trick play' support)
".wav" => a WAV Audio file
".webm" => a WebM audio(Vorbis)+video(VP8) file
See [url]http://www.live555.com/mediaServer/[/url] for additional documentation.
(We use port 8000 for optional RTSP-over-HTTP tunneling, or for HTTP live streaming (for indexed Transport Stream files only).)
2.2 另外开一个终端:来启动SMplayer
root@microcreat:~# mplayer [url]rtsp://192.168.196.128:8554/in.264[/url]
mplayer: Symbol `ff_codec_bmp_tags' has different size in shared object, consider re-linking
MPlayer 1.0rc4-4.5.2 (C) 2000-2010 MPlayer Team
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 [url]rtsp://192.168.196.128:8554/in.264.[/url]
Resolving 192.168.196.128 for AF_INET6...
Couldn't resolve name for AF_INET6: 192.168.196.128
Connecting to server 192.168.196.128[192.168.196.128]: 8554...
rtsp_session: unsupported RTSP server. Server type is 'unknown'.
STREAM_LIVE555, URL: [url]rtsp://192.168.196.128:8554/in.264[/url]
Stream not seekable!
file format detected.
Initiated "video/H264" RTP subsession on port 48870
demux_rtp: Guessed the video frame rate as 30 frames-per-second.
(If this is wrong, use the "-fps
VIDEO: [H264] 0x0 0bpp 30.000 fps 0.0 kbps ( 0.0 kbyte/s)
open: No such file or directory
[MGA] Couldn't open: /dev/mga_vid
open: No such file or directory
[MGA] Couldn't open: /dev/mga_vid
[VO_TDFXFB] This driver only supports the 3Dfx Banshee, Voodoo3 and Voodoo 5.
[VO_3DFX] Unable to open /dev/3dfx.
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
[vdpau] Error when calling vdp_device_create_x11: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Audio: no sound
Starting playback...
Movie-Aspect is undefined - no prescaling applied.
VO: [xv] 160x128 => 160x128 Planar YV12
V: 17.4 592/592 1% 1% 0.0% 0 0
Exiting... (Quit)
这样rtsp服务器就搭建完成!
我来回答
回答4个
时间排序
认可量排序
认可0
认可0
认可0
认可0
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币
Markdown 语法
- 加粗**内容**
- 斜体*内容*
- 删除线~~内容~~
- 引用> 引用内容
- 代码`代码`
- 代码块```编程语言↵代码```
- 链接[链接标题](url)
- 无序列表- 内容
- 有序列表1. 内容
- 缩进内容
- 图片
相关问答
-
2013-01-07 09:15:13
-
2013-01-07 09:03:33
-
2014-12-15 09:29:44
-
2013-08-23 10:55:38
-
2018-08-23 16:21:26
-
2020-07-16 16:28:29
-
2015-04-30 17:17:11
-
2013-01-07 09:26:32
-
2016-04-07 09:56:44
-
2018-11-25 11:08:57
-
2013-01-30 00:14:56
-
2013-06-26 13:05:05
-
2017-08-29 11:12:48
-
2017-01-21 15:59:16
-
2014-08-09 15:15:11
-
2013-08-20 11:49:37
-
2017-11-28 11:46:30
-
2017-07-12 17:27:35
-
2018-08-06 16:04:39
无更多相似问答 去提问

点击登录
-- 积分
-- E币
提问
—
收益
—
被采纳
—
我要提问
切换马甲
上一页
下一页
举报反馈
举报类型
- 内容涉黄/赌/毒
- 内容侵权/抄袭
- 政治相关
- 涉嫌广告
- 侮辱谩骂
- 其他
详细说明
提醒
你的问题还没有最佳答案,是否结题,结题后将扣除20%的悬赏金
取消
确认
提醒
你的问题还没有最佳答案,是否结题,结题后将根据回答情况扣除相应悬赏金(1回答=1E币)
取消
确认