目前主流的流媒体服务器有微软的windows media
server、RealNetworks的Helixserver和苹果公司的Darwin Streaming Server. 微软的windows
media server只能在windows2000 server和windows 2003
server下使用,不在考虑之列。RealNetworks的Helixserver是一款跨平台的软件,功能也很强大,但并非免费软件,只能cut掉
了。苹果公司的Darwin
StreamingServer是一款跨平台的开源流媒体服务器软件,由苹果公司出品,其品质不用怀疑了,而且还免费。所以在架设流媒体服务器时就选择了
DarwinStreaming Server.
Darwin Streaming
Server使用标准的实时传输协议/实时流媒体协议(RTP/RTSP),通过互联网实时传送媒体。Darwin Streaming Server
也能提供对传送 H.264、MPEG-4 和3GPP 文件的固有支持——因此,你可以在 Mac 和
Linux、Windows上的任何与标准兼容的媒体播放器上执行你的内容,当然还包括手机和接收盒等各种兼容标准的设备。不仅如此,它还允许你使用
Icecast兼容协议,通过 HTTP 传送标准的 MP3 文件到 MP3 客户端。
一、软件安装
首先上http://dss.macosforge.org/下载源代码,当前最新版本为6.0.3,但我选择了5.5.5版本,因为这个版本提供
了针对linux的安装脚本。下载DarwinStreamingSrvr5.5.5-Linux.tar.gz文件后,解压缩,然后运行如下命令安装:
-
~/tmp/DarwinStreamingSrvrlinux-Linux$ chmod +x Install
-
~/tmp/DarwinStreamingSrvrlinux-Linux$ sudo ./Install
-
[sudo] password for keensword007:
-
Installing Darwin Streaming Server
-
Checking for and Killing currently running Darwin Streaming Server
-
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
-
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
-
Removing previous versions of Darwin Streaming Server
-
Backing up previous config files
-
Inserting path to perl into scripts..
-
Creating unprivileged user to run the
server
=
"qtss"
.
-
copying DarwinStreamingServer to /usr/local/sbin/DarwinStreamingServer
-
copying PlaylistBroadcaster to /usr/local/bin/PlaylistBroadcaster
-
copying MP3Broadcaster to /usr/local/bin/MP3Broadcaster
-
copying qtpasswd to /usr/local/bin/qtpasswd
-
creating /usr/local/sbin/StreamingServerModules directory
-
copying createuserstreamingdir to /usr/local/bin/createuserstreamingdir
-
creating /etc/streaming directory
-
Generating a new prefs file at /etc/streaming/streamingserver.xml
-
INFO: Module Loaded...QTSSRefMovieModule [dynamic]
-
INFO: Module Loaded...QTSSHomeDirectoryModule [dynamic]
-
INFO: Module Loaded...QTSSFileModule [static]
-
INFO: Module Loaded...QTSSReflectorModule [static]
-
INFO: Module Loaded...QTSSRelayModule [static]
-
INFO: Module Loaded...QTSSAccessLogModule [static]
-
INFO: Module Loaded...QTSSFlowControlModule [static]
-
INFO: Module Loaded...QTSSPosixFileSysModule [static]
-
INFO: Module Loaded...QTSSAdminModule [static]
-
INFO: Module Loaded...QTSSMP3StreamingModule [static]
-
INFO: Module Loaded...QTSSAccessModule [static]
-
WARNING: No users file found at /etc/streaming/qtusers.
-
WARNING: No groups file found at /etc/streaming/qtgroups.
-
chown: invalid user: `qtss'
-
copying relayconfig.xml-Sample to /etc/streaming/relayconfig.xml-Sample
-
copying qtusers to /etc/streaming/qtusers
-
chown: invalid user: `qtss'
-
copying qtgroups to /etc/streaming/qtgroups
-
chown: invalid user: `qtss'
-
copying readme.txt to /var/streaming/readme.txt
-
copying 3rdPartyAcknowledgements.rtf to /var/streaming/3rdPartyAcknowledgements.rtf
-
creating /usr/local/movies directory
-
creating /var/streaming/playlists directory
-
copying sample_100kbit.mov into /usr/local/movies/sample_100kbit.mov
-
copying sample_300kbit.mov into /usr/local/movies/sample_300kbit.mov
-
copying sample_100kbit.mp4 into /usr/local/movies/sample_100kbit.mp4
-
copying sample_300kbit.mp4 into /usr/local/movies/sample_300kbit.mp4
-
copying sample.mp3 into /usr/local/movies/sample.mp3
-
copying sample_50kbit.3gp into /usr/local/movies/sample_50kbit.3gp
-
copying sample_h264_100kbit.mp4 into /usr/local/movies/sample_h264_100kbit.mp4
-
copying sample_h264_300kbit.mp4 into /usr/local/movies/sample_h264_300kbit.mp4
-
copying sample_h264_1mbit.mp4 into /usr/local/movies/sample_h264_1mbit.mp4
-
copying StreamingLoadTool to /usr/local/bin/StreamingLoadTool
-
copying streamingloadtool.conf to /etc/streaming/streamingloadtool.conf
-
copying streamingadminserver.pl into /usr/local/sbin/streamingadminserver.pl
-
copying Admin HTML to /var/streaming/AdminHtml directory
-
chown: invalid user: `qtss'
-
chown: invalid user: `qtss'
-
chown: invalid user: `qtss'
-
Launching streamingadminserver.pl
-
Cannot switch to group qtss
-
Installation Complete
-
Darwin Streaming Server Setup
-
Inorder to administer the Darwin Streaming Server you must
create anadministrator user [Note: The administrator user name
cannot containspaces, or single or double quote characters, and
cannot be more than255 characters long].
-
Please enter a new administrator user name: keensword007
-
Youmust also enter a password for the administrator user [Note:
Theadministrator password cannot contain spaces, or quotes,
either singleor double, and cannot be more than 80 characters long].
-
Please enter a new administrator Password:
-
Re-enter the new administrator password:
-
Adding userName keensword007
-
chown: invalid user: `qtss'
-
Setup Complete!
|
从提示信息上看,应该是qtss用户未能创建造成的,查看了一下Install脚本,发现创建用户的脚本是这样的:
-
if [ $
INSTALL_OS
=
"Linux"
]; then
-
/usr/sbin/useradd -M qtss
>
/dev/null 2
>
&1
-
else
-
/usr/sbin/useradd qtss
>
/dev/null 2
>
&1
-
fi
|
但是useradd并没有-M的命令行参数,应该为-m,将-M修改成-m后,再执行Install脚本,安装成功。此时服务已经启动,可以使用如下命令确定服务是否已经启动:
-
~/tmp/DarwinStreamingSrvrlinux-Linux$ ps aux | grep Darwin
-
root 10963 0.0 0.0 4368 456 ? Ss 21:23 0:00 /usr/local/sbin/DarwinStreamingServer
-
qtss 10964 0.0 0.0 38032 2456 ? Sl 21:23 0:00 /usr/local/sbin/DarwinStreamingServer
-
1000 11003 0.0 0.0 3004 760 pts/1 R+ 21:24 0:00 grep Darwin
|
如果希望机器启动后自动运行流媒体服务器,输入如下命令:
-
~/tmp/DarwinStreamingSrvrlinux-Linux$ cd /etc/rc3.d
-
/etc/rc3.d$ sudo ln -s /usr/local/sbin/streamingadminserver.pl s20streamingserver
|
如果要手动启动服务,运行streamingadminserver.pl程序。
二、配置
Darwin Streaming Server采用了web管理模式,可以在本机的浏览器中输入:http://127.0.0.1:1220 。然后输入在安装流媒体服务器时设置的用户名称和密码。
第一次登录时,接着会出现设置向导。首先是一个MP3 广播密码设置对话框,在其“New Password”和“Re-enter New Password”输入自己想设置的密码。然后点击“Next”按钮继续。
为了保证数据传输的安全需要您可以在这里钩选“Secure Administration(SSL)”(安全管理),前提是您已经有了可用的SSL 证书。一般可以不选。直接点击“Next”按钮继续。
接下来要设置的是媒体文件的存放主目录。这个目录要记住,在服务器中以后添加媒体文件时就要加在这个目录中。设置完毕点击“Next”按钮继续。
最后设置默认传输端口,如果设置了“Streaming on
Port80”则此服务器的访问可以突破防火墙,但如果您在此服务器上同时建有Apache
等占用80端口的服务。则建议您不要设置此端口。这里如果您没有什么特殊要求的话,使用缺省配置即可。直接点击“Finish”按钮。
自此流媒体服务器的设置就告一段落,如果您要作进一步的设置,可以通过此管理页面,在其左侧点击相应的选项,进行设置。也可以通过此对前面所做的设置进行更改。
三、在线播放
流媒体服务器部署完毕后,我们就可以使用自己喜欢的播放器在线播放了。例如,在本机上打开Movie Player, 在地址栏输入:
-
rtsp://127.0.0.1/sample_100kbit.mp4
|
就可以看到一段QuickTime演示视频。
分享到:
相关推荐
本文介绍如何在Ubuntu下使用Darwin Streaming Server实现流媒体服务器搭建。主要分三大搭建步骤,分别是软件安装、配置与在线播放。
用于Ubuntu下架设PPTP服务器。方便搭建人员使用。
ubuntu-12.10-server 流媒体服务器安装设置
公司在做编码器,需要和rtmp服务器对接,nginx-rtmp实在是太复杂,不方便调试,所以做了一个简单rtmp...参与这个项目的几个朋友,说不仅仅想实现流媒体源站功能,还想写出漂亮的代码,成为“国人软件代码之典范”。
Ubuntu下FTP服务器搭建+DNS服务器搭建 Ubuntu下FTP服务器搭建+DNS服务器搭建 Ubuntu下FTP服务器搭建+DNS服务器搭建 Ubuntu下FTP服务器搭建+DNS服务器搭建
ubuntu下使用SDL和FFmpeg进行播放视频文件和实时流媒体
DarwinStreamingSource6.0.3-and-2patch在Ubuntu16.04上安装达尔文流媒体服务器,需要两个补丁文件dss-6.0.3.patch和dss-hh-20081021-1.patch,另外,需要修改DarwinStreamingSrvr6.0.3-Source/Makefile.POSIX中第9...
Ubuntu下FTP服务器搭建+DNS服务器搭建教程
Ubuntu下git服务器的搭建和基本使用[参考].pdf
Ubuntu服务器安装SQL[Linux基础环境/软件]Linux下安装mysql
ubuntu 下用ssh 方式登入远程服务器的设置方法。
Ubuntu下nfs服务器的搭建,手把手的搭建服务器,很详细
ubuntu下 服务器 客户端 log日志 断线重连 等等
比较全面的Ubuntu服务器入门指南,文字版哦~
ubuntu16 下搭建svn服务器的搭建详细步骤,发现网上很多教程不够详细,或者是简单粘贴,文档内容绝对亲测,放心使用
NULL 博文链接:https://shoukii0721.iteye.com/blog/1626661
ubuntu FTP 服务器搭建 主用户+匿名用户 ubuntu FTP 服务器搭建 主用户+匿名用户 ubuntu FTP 服务器搭建 主用户+匿名用户
总结了ubuntu下配置apache服务器的方法,步骤
Ubuntu下Git服务器打搭建 客户端的使用教程和git学习资料等,资源分虽然要了10分但是这是我一周总结的,现在没分了想坑一点积分。有积分后我就免费下载了,下载的人不要为要积分而喷。也谢谢大家给我积分
Ubuntu上搭建SVN服务器详细步骤。 目 录 1 概述 1 2 安装Ubuntu 9.10服务器 1 3 安装Apache服务器 1 4 创建SVN服务器 1 4.1 安装SVN 1 4.2 增加组 2 4.3 创建SVN仓库 2 4.4 配置Apache服务器 2 5 配置SSL 3 6 远程...