`

使用开源的DSS架设流媒体服务器(Windows下)

阅读更多

DSS,全称:Darvin Streaming Server,是Apple公司的一款开源的流媒体服务器。而且其使用的是RTSP(Real-Time Streaming Protocal)协议.

1、首先到<!-- [if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:PunctuationKerning/> <w:DrawingGridVerticalSpacing>7.8 磅</w:DrawingGridVerticalSpacing> <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery> <w:DisplayVerticalDrawingGridEvery>2</w:DisplayVerticalDrawingGridEvery> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:SpaceForUL/> <w:BalanceSingleByteDoubleByteWidth/> <w:DoNotLeaveBackslashAlone/> <w:ULTrailSpace/> <w:DoNotExpandShiftReturn/> <w:AdjustLineHeightInTable/> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> <w:DontGrowAutofit/> <w:UseFELayout/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!-- [if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]--><!-- [if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:普通表格; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style> <![endif]-->http://dss.macosforge.org/downloads/下载windows版本的DSS。

2、下载完成后解压,运行install.bat文件。

3、完成后,其安装在C:\Program Files\Darvin Streaming Server目录下,同时在Windows 服务中会出现一个Darvin Streaming Server服务,这个就是DSS的RTSP服务器。

4、然后下载Perl解释器,<!-- [if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:PunctuationKerning/> <w:DrawingGridVerticalSpacing>7.8 磅</w:DrawingGridVerticalSpacing> <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery> <w:DisplayVerticalDrawingGridEvery>2</w:DisplayVerticalDrawingGridEvery> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:SpaceForUL/> <w:BalanceSingleByteDoubleByteWidth/> <w:DoNotLeaveBackslashAlone/> <w:ULTrailSpace/> <w:DoNotExpandShiftReturn/> <w:AdjustLineHeightInTable/> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> <w:DontGrowAutofit/> <w:UseFELayout/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!-- [if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]--><!-- [if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:普通表格; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style> <![endif]--> http://www.perl.org/get.html

5、安装Perl后,进入cmd窗口, cd到 C:\Program Files\Darvin Streaming Server目录。

6、执行Perl WinPasswdAssistant.pl,根据提示信息,创建管理员的用户名和密码。

7、执行 Perl streamingadminserver.pl,打开浏览器,输入http://localhost:1220访问管理页面。

8、根据提示信息,一步步设置即可。

注意:如果机子上已经安装了Oracle数据库,则在运行Perl命令的时候可能会出现错误。解决的办法是(转):

从官网下载完Active Perl5.10安装完后,写了很简单的Perl脚本,仅引用了一个文件拷贝模块,调用Perl解释器来运行程序的时候,报了一堆错,先是一个弹出框提示 ‘无法启动此程序,计算机丢失Perl58.dll’,点击确定后报出错误信息:Can't load 'D:\oracle\product\10.2.0\db_1\perl\5.8.3\lib/MSWin32-x86-multi-threa d/auto/File/Glob/Glob.dll' for module File::Glob: load_file:找不到指定的模块。 a t D:\oracle\product\10.2.0\db_1\perl\5.8.3\lib/MSWin32-x86-multi-thread/XSLoader .pm line 68.

从上述信息很明显,应该是早前安装的Oracle与新装的Perl冲突了,而且冲突是因为Oracle在安装的时候往我们系统中添加了一个Perl5Lib的环境变量,而这个环境变量指向的则是Oracle安装目录下那个模块不全的 Perl,从信息提示可以知道为Oracle Home/perl目录。

知道了错误原因,那么改的方法就多了去了:

1、经常与Oracle打交道而偶尔玩下perl的一类朋友:

如果是这样的话,建议就不要对环境变量Perl5Lib动手了。在运行Perl命令之前,设置下当前命令行窗口的临时Perl5Lib变量就可以了。如笔者的Perl10安装在G盘根目录下,则在运行Cmd后,使用命令Set Perl5Lib="G:\\Perl\bin\"改变下环境变量Perl5Lib的指向,该命令作用域为Session级的,即重开Cmd后还得再次设置。

2、 与上述情况相反的:

可以先备份下Per5lLib的内容,然后将Perl5Lib清空或者设置为G:\\Perl\Lib即OK

3、两者都经常打交道的:

将G:\\Perl\Bin加到Perl5Lib的前面,注意,不是替换。

4、两者都不怎么玩的

<!-- [if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:PunctuationKerning/> <w:DrawingGridVerticalSpacing>7.8 磅</w:DrawingGridVerticalSpacing> <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery> <w:DisplayVerticalDrawingGridEvery>2</w:DisplayVerticalDrawingGridEvery> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:SpaceForUL/> <w:BalanceSingleByteDoubleByteWidth/> <w:DoNotLeaveBackslashAlone/> <w:ULTrailSpace/> <w:DoNotExpandShiftReturn/> <w:AdjustLineHeightInTable/> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> <w:DontGrowAutofit/> <w:UseFELayout/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!-- [if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]--><!-- [if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:普通表格; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style> <![endif]-->

如何将自己的视频转换为流媒体格式?(转)

研究这个东西费了我好大的劲,一开始不知道视频还有专门针对流媒体的,以为只要用 MediaCoder 将视频转换成合适的格式,如: MPEG4 + AAC + MP4 / MPEG4 + AAC + 3GP 就可以放了,反复放到服务器上面去测试, VLC QuickTime 都没法打开。于是又用工具打开 DSS 自带的几个示例视频看它们的格式,反复转换试不同的视频和音频编码和外壳,还是不行 ... 郁闷死我了

DSS 的邮件列表里面找了找相关的文章,发现有讲好像要用特别的工具对视频 hint 一下,然后就可以在 RTSP 上面用了,说可以用 QuickTime Pro VLC 来转换,我用 VLC 试了一下,文件菜单一个叫 (s )” 的功能,但试了还是不行,没看到文件有变动过。

于是再沿着 Hint 关键词在 Google 上面找文章,找到了 Nokia 论坛里面,看到这篇文章: http://discussion.forum.nokia.com/forum/showthread.php?t=125540 里面有说可以使用 Mp4box 对视频进行 hint

于是我在 http://www.videohelp.com/tools/mp4box 这里下载到了 mp4box (不用下载 GUI 的,直接用命令行操作就好了,只用一条命名)

下载到到解压出后会有个叫 mp4box.exe ,用它在命令行下面运行

C:\Program Files\Darwin Streaming Server\Movies>mp4box mymovie.mp4 -hint

出现结果:

Hinting file with Path-MTU 1450 Bytes
Hinting track ID 201 - Type "mp4v:mp4v" (MP4V-ES) - BW 33 kbps
Hinting track ID 101 - Type "mp4a:mp4a" (mpeg4-generic) - BW 64 kbps
Saving
mymovie.mp4: 0.500 secs Interleaving

流媒体视频就转换好了,现在文件大小就会有变动,变大了一些。

然后,再用 VLC QuickTime 打开 rtsp://127.0.0.1:554/mymovie.mp4 试试能否播放吧!如果你有 3G 手机,可以直接用手机打开这个地址试一下。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics