1.安装JDK,设置JAVA_HOME
2.执行red5.bat启动red5
  red5默认的应用程序目录为webapps,此目录下的vod目录是RTMP服务器示例,flv或者mp4文件
  可以直接放在vod/streams目录下。

  启动red5后,打开http://localhost:5080/vod/验证red5是否正常运行。
  视频流访问地址:rtmp://localhost/vod/test_video.flv
 
3.如果要自定义red5应用程序的路径,请修改red5的配置
    conf/jee-container.xml

<property name="webappFolder" ...

    conf/red5-common.xml

<property name="deploymentDirectory" ...

4.用jwplayer来播放RTMP视频流

<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 
   name="player" width="768" height="432">

 <param name="movie" value="jwplayer5.10.swf" />
 <param name="allowfullscreen" value="true" />
 <param name="allowscriptaccess" value="always" />
 <param name="flashvars"
 value="file=test_video.flv &streamer=rtmp://localhost/vod/&image=images/test_video.jpg &skin=skins/darksunset.zip" />
 
 <embed
 type="application/x-shockwave-flash"
 id="player"
 name="player"
 src="jwplayer5.10.swf"
 width="768"
 height="432"
 allowscriptaccess="always"
 allowfullscreen="true"
 flashvars="file=test_video.flv &streamer=rtmp://localhost/vod/&image=images/test_video.jpg &skin=skins/darksunset.zip"
 />
</object>

本文链接地址: 用red5做流媒体服务器的基本方法
http://qingfengju.com/index.asp?id=311

分类:Web开发 查看次数:6050 发布时间:2013-1-18 15:43:24