<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[张宴的博客]]></title> 
<link>http://zyan.cc/index.php</link> 
<description><![CDATA[Web系统架构与底层研发]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[张宴的博客]]></copyright>
<item>
<link>http://zyan.cc/post/409/</link>
<title><![CDATA[基于开源Flash Server：Red5构建RTMP流媒体播放平台[原创]]]></title> 
<author>张宴 &lt;net@s135.com&gt;</author>
<category><![CDATA[其他Unix技术]]></category>
<pubDate>Mon, 13 Apr 2009 15:13:12 +0000</pubDate> 
<guid>http://zyan.cc/post/409/</guid> 
<description>
<![CDATA[ 
	　　[文章作者：张宴 本文版本：v1.0 最后修改：2009.04.13 转载请注明原文链接：<a href="http://blog.zyan.cc/post/409/" target="_blank">http://blog.zyan.cc/post/409/</a>]<br/><br/>　　上周五，我们基于开源Flash Server：Red5（<a href="http://osflash.org/red5" target="_blank">http://osflash.org/red5</a>）的Flash流媒体服务平台上线，内容涉及视频上传、视频分发、调用接口、Flash播放器等。<br/><br/>　　<strong>一、Flash RTMP流媒体播放演示</strong>（播放时进度条可以自由拖动）：<br/><br/><div>　　<object id="xoyovideo" width="480" height="300" ><param name="allowScriptAccess" value="always" /><embed pluginspage="http://www.macromedia.com/go/getflashplayer" src="http://api.v.xoyo.com/external/player.swf?config=http://api.v.xoyo.com/external/video-22.swf" type="application/x-shockwave-flash" name="xoyovideo" allowFullScreen="true" allowScriptAccess="always" width="480" height="300"></embed></object></div><br/>　　生产环境更多 Flash RTMP 流媒体视频演示：<a href="http://jx3.xoyo.com/xgxz/video/" target="_blank">http://jx3.xoyo.com/xgxz/video/</a><br/><br/><hr/><br/>　　<strong>二、安装步骤简要说明：</strong><br/>　　①、安装JDK<br/>　　打开<a href="http://java.sun.com/javase/downloads/" target="_blank">http://java.sun.com/javase/downloads/</a>，下载最新的Java SE Development Kit (JDK)，安装在/usr/local/jdk/下。<br/><div style="border-left: 0px dashed #D6C094; margin: 5px; padding: 3px; margin-bottom:0px; border: 1px dashed #00a0c6; background-color: #ffffff;">chmod +x jdk-6u13-linux-i586.bin<br/>./jdk-6u13-linux-i586.bin</div><br/><br/>　　②、安装Red5<br/>　　打开<a href="http://osflash.org/red5/070final" target="_blank">http://osflash.org/red5/070final</a>，下载red5-0.7.0.tar.gz，解压缩后执行./red5.sh，然后访问<a href="http://yourdomain:5080/" target="_blank">http://yourdomain:5080/</a>，有演示。<br/><br/><hr/><br/>　　<strong>三、服务器带宽消耗比较：</strong><br/>　　①、客户端 1.5M ADSL 环境，HTTP 方式播放单个视频，服务器所消耗的带宽：<br/><div style="border-left: 0px dashed #D6C094; margin: 5px; padding: 3px; margin-bottom:0px; border: 1px dashed #00a0c6; background-color: #ffffff;">[root@localhost ~]# ./net.sh eth0 1<br/>IN: 3318 Byte/s OUT: 259984 Byte/s<br/>IN: 3486 Byte/s OUT: 249470 Byte/s<br/>IN: 3332 Byte/s OUT: 259984 Byte/s<br/>IN: 3090 Byte/s OUT: 252528 Byte/s<br/>IN: 3000 Byte/s OUT: 252474 Byte/s<br/>IN: 3000 Byte/s OUT: 253976 Byte/s<br/>IN: 2940 Byte/s OUT: 255478 Byte/s<br/>IN: 3004 Byte/s OUT: 252474 Byte/s<br/>IN: 3452 Byte/s OUT: 252528 Byte/s<br/>IN: 3270 Byte/s OUT: 260038 Byte/s<br/>IN: 3586 Byte/s OUT: 252474 Byte/s</div><br/><br/>　　②、客户端 1.5M ADSL 环境，RTMP 流媒体方式播放单个视频，服务器所消耗的带宽：<br/><div style="border-left: 0px dashed #D6C094; margin: 5px; padding: 3px; margin-bottom:0px; border: 1px dashed #00a0c6; background-color: #ffffff;">[root@localhost ~]# ./net.sh eth0 1<br/>IN: 3900 Byte/s OUT: 27878 Byte/s<br/>IN: 4200 Byte/s OUT: 30868 Byte/s<br/>IN: 4380 Byte/s OUT: 27801 Byte/s<br/>IN: 4080 Byte/s OUT: 29965 Byte/s<br/>IN: 4080 Byte/s OUT: 26450 Byte/s<br/>IN: 3960 Byte/s OUT: 27143 Byte/s<br/>IN: 3000 Byte/s OUT: 10061 Byte/s<br/>IN: 3960 Byte/s OUT: 16166 Byte/s<br/>IN: 3660 Byte/s OUT: 26480 Byte/s<br/>IN: 4020 Byte/s OUT: 23127 Byte/s</div><br/><br/>　　HTTP 方式播放，如果服务器端不限速，客户端的带宽越大，服务器消耗的带宽也越大，但限速又会影响用户体验；<br/>　　RTMP 流媒体方式播放，只要客户端达到最低带宽要求，不管客户端的带宽如何，服务器消耗的带宽都一样。<br/><br/>　　如果播放10M以内大小的视频，HTTP 能够在较短的时间内下载完视频，能够降低并发观看用户数；<br/>　　如果播放10M以上大小的视频，RTMP 要比 HTTP 方式节省不少带宽。<br/><br/>　　RTMP 播放时进度条可以自由拖动，虽然Lighttpd和Nginx目前也可以使用somevideo.flv?start=xxx的方式从指定位置下载视频，但还是不如 RTMP 灵活。<br/><br/>............<br/><br/>Tags - <a href="http://zyan.cc/tags/red5/" rel="tag">red5</a> , <a href="http://zyan.cc/tags/rtmp/" rel="tag">rtmp</a> , <a href="http://zyan.cc/tags/flash/" rel="tag">flash</a>
]]>
</description>
</item><item>
<link>http://zyan.cc/post/409/#blogcomment3013</link>
<title><![CDATA[[评论] 基于开源Flash Server：Red5构建RTMP流媒体播放平台[原创]]]></title> 
<author>tianqingbo &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Mon, 13 Apr 2009 18:12:30 +0000</pubDate> 
<guid>http://zyan.cc/post/409/#blogcomment3013</guid> 
<description>
<![CDATA[ 
	呵呵！不错哟！晚上还没有睡啊！
]]>
</description>
</item><item>
<link>http://zyan.cc/post/409/#blogcomment3030</link>
<title><![CDATA[[评论] 基于开源Flash Server：Red5构建RTMP流媒体播放平台[原创]]]></title> 
<author>mesky &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Wed, 15 Apr 2009 11:58:32 +0000</pubDate> 
<guid>http://zyan.cc/post/409/#blogcomment3030</guid> 
<description>
<![CDATA[ 
	支持H264编码的视频吗？
]]>
</description>
</item><item>
<link>http://zyan.cc/post/409/#blogcomment3031</link>
<title><![CDATA[[评论] 基于开源Flash Server：Red5构建RTMP流媒体播放平台[原创]]]></title> 
<author>wtf &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Wed, 15 Apr 2009 12:34:48 +0000</pubDate> 
<guid>http://zyan.cc/post/409/#blogcomment3031</guid> 
<description>
<![CDATA[ 
	想拜你为师，不知愿不愿意收？<br/><br/>俺是三楼烈火的
]]>
</description>
</item><item>
<link>http://zyan.cc/post/409/#blogcomment3034</link>
<title><![CDATA[[评论] 基于开源Flash Server：Red5构建RTMP流媒体播放平台[原创]]]></title> 
<author>fayboy &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 16 Apr 2009 08:15:17 +0000</pubDate> 
<guid>http://zyan.cc/post/409/#blogcomment3034</guid> 
<description>
<![CDATA[ 
	感觉稍稍有些不足的地方就是,当带款环境很差的时候,向回拖动的时候还需要缓冲,影响收看效果
]]>
</description>
</item><item>
<link>http://zyan.cc/post/409/#blogcomment3041</link>
<title><![CDATA[[评论] 基于开源Flash Server：Red5构建RTMP流媒体播放平台[原创]]]></title> 
<author>狗子 &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Fri, 17 Apr 2009 00:51:07 +0000</pubDate> 
<guid>http://zyan.cc/post/409/#blogcomment3041</guid> 
<description>
<![CDATA[ 
	<br/>不错，收益了
]]>
</description>
</item><item>
<link>http://zyan.cc/post/409/#blogcomment3044</link>
<title><![CDATA[[评论] 基于开源Flash Server：Red5构建RTMP流媒体播放平台[原创]]]></title> 
<author>renyuan &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Sat, 18 Apr 2009 07:28:03 +0000</pubDate> 
<guid>http://zyan.cc/post/409/#blogcomment3044</guid> 
<description>
<![CDATA[ 
	改天我给你换一个FLASH播放器，你到时候教我RED5怎么样！哈哈！
]]>
</description>
</item><item>
<link>http://zyan.cc/post/409/#blogcomment3046</link>
<title><![CDATA[[评论] 基于开源Flash Server：Red5构建RTMP流媒体播放平台[原创]]]></title> 
<author>gakaki &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Sat, 18 Apr 2009 11:40:26 +0000</pubDate> 
<guid>http://zyan.cc/post/409/#blogcomment3046</guid> 
<description>
<![CDATA[ 
	可否开源一下 老实说red5的这么全的实例还不好找
]]>
</description>
</item><item>
<link>http://zyan.cc/post/409/#blogcomment3068</link>
<title><![CDATA[[评论] 基于开源Flash Server：Red5构建RTMP流媒体播放平台[原创]]]></title> 
<author>杨言 &lt;webmaster@hnvps.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Tue, 21 Apr 2009 02:33:09 +0000</pubDate> 
<guid>http://zyan.cc/post/409/#blogcomment3068</guid> 
<description>
<![CDATA[ 
	哈哈 收获不少 我又有新的东西可以研究了
]]>
</description>
</item><item>
<link>http://zyan.cc/post/409/#blogcomment3081</link>
<title><![CDATA[[评论] 基于开源Flash Server：Red5构建RTMP流媒体播放平台[原创]]]></title> 
<author>newbie &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Wed, 22 Apr 2009 04:58:37 +0000</pubDate> 
<guid>http://zyan.cc/post/409/#blogcomment3081</guid> 
<description>
<![CDATA[ 
	./net.sh eth0 1提示 bash: ./net.sh: Permission denied<br/>这是为什么呢？<br/>cat /proc/net/dev 是有内容的。<br/>直接使用：cat /proc/net/dev &#124; grep $eth &#124; sed -e &quot;s/\(.*\)\:\(.*\)/\2/g&quot; &#124; awk &#039; &#123; print $1 &#125;&#039;&nbsp;&nbsp;可以吗？
]]>
</description>
</item><item>
<link>http://zyan.cc/post/409/#blogcomment3131</link>
<title><![CDATA[[评论] 基于开源Flash Server：Red5构建RTMP流媒体播放平台[原创]]]></title> 
<author>shark巨菜 &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Mon, 27 Apr 2009 10:05:46 +0000</pubDate> 
<guid>http://zyan.cc/post/409/#blogcomment3131</guid> 
<description>
<![CDATA[ 
	偶像就是厉害。<br/>膜拜。
]]>
</description>
</item><item>
<link>http://zyan.cc/post/409/#blogcomment3133</link>
<title><![CDATA[[评论] 基于开源Flash Server：Red5构建RTMP流媒体播放平台[原创]]]></title> 
<author>1 &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Tue, 28 Apr 2009 02:54:29 +0000</pubDate> 
<guid>http://zyan.cc/post/409/#blogcomment3133</guid> 
<description>
<![CDATA[ 
	in=&#96;awk &#039;/eth0/&#123;split($1,tmp,&quot;:&quot;);for(i in tmp) if(tmp[i]!~/eth/) print tmp[i]&#125;&#039; /proc/net/dev&#96;<br/>out=&#96;awk &#039;/eth0/&#123;split($9,tmp,&quot;:&quot;);for(i in tmp) if(tmp[i]!~/eth/) print tmp[i]&#125;&#039; /proc/net/dev&#96;
]]>
</description>
</item><item>
<link>http://zyan.cc/post/409/#blogcomment3143</link>
<title><![CDATA[[评论] 基于开源Flash Server：Red5构建RTMP流媒体播放平台[原创]]]></title> 
<author>流云 &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 30 Apr 2009 03:18:29 +0000</pubDate> 
<guid>http://zyan.cc/post/409/#blogcomment3143</guid> 
<description>
<![CDATA[ 
	问题如下：nc.connect(&quot;rtmp://localhost/oflaDemo&quot;);放器进度条用不了<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nc.connect(null);播放器进度条能用
]]>
</description>
</item><item>
<link>http://zyan.cc/post/409/#blogcomment3145</link>
<title><![CDATA[[评论] 基于开源Flash Server：Red5构建RTMP流媒体播放平台[原创]]]></title> 
<author>好好 &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 30 Apr 2009 08:29:35 +0000</pubDate> 
<guid>http://zyan.cc/post/409/#blogcomment3145</guid> 
<description>
<![CDATA[ 
	楼主你好 我自己做的flv播放器连接Red5 播放器进度条不能自由拖动？？？
]]>
</description>
</item><item>
<link>http://zyan.cc/post/409/#blogcomment3217</link>
<title><![CDATA[[评论] 基于开源Flash Server：Red5构建RTMP流媒体播放平台[原创]]]></title> 
<author>Gary &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Sat, 09 May 2009 03:30:15 +0000</pubDate> 
<guid>http://zyan.cc/post/409/#blogcomment3217</guid> 
<description>
<![CDATA[ 
	老大，是否可以提供完整的配置步骤，怎么样才能达到像您演示的那样，谢谢，让更多的人去学习吧。我想学，但是找不到教程，盼老大出手。。。。。。。
]]>
</description>
</item><item>
<link>http://zyan.cc/post/409/#blogcomment3219</link>
<title><![CDATA[[评论] 基于开源Flash Server：Red5构建RTMP流媒体播放平台[原创]]]></title> 
<author>Gary &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Sat, 09 May 2009 10:33:26 +0000</pubDate> 
<guid>http://zyan.cc/post/409/#blogcomment3219</guid> 
<description>
<![CDATA[ 
	很实用，我天天来，天天盼，盼老大写个详细的安装配置过程！我好希望我的偶像会满足我的这个小小的要求，也为了大家掌握这块，网上这方面的内容真的太少了！
]]>
</description>
</item>
</channel>
</rss>