[文章作者:张宴 本文版本:v1.0 最后修改:2009.04.13 转载请注明原文链接:http://blog.zyan.cc/post/409/]

  上周五,我们基于开源Flash Server:Red5(http://osflash.org/red5)的Flash流媒体服务平台上线,内容涉及视频上传、视频分发、调用接口、Flash播放器等。

  一、Flash RTMP流媒体播放演示(播放时进度条可以自由拖动):

  

  生产环境更多 Flash RTMP 流媒体视频演示:http://jx3.xoyo.com/xgxz/video/



  二、安装步骤简要说明:
  ①、安装JDK
  打开http://java.sun.com/javase/downloads/,下载最新的Java SE Development Kit (JDK),安装在/usr/local/jdk/下。
chmod +x jdk-6u13-linux-i586.bin
./jdk-6u13-linux-i586.bin


  ②、安装Red5
  打开http://osflash.org/red5/070final,下载red5-0.7.0.tar.gz,解压缩后执行./red5.sh,然后访问http://yourdomain:5080/,有演示。



  三、服务器带宽消耗比较:
  ①、客户端 1.5M ADSL 环境,HTTP 方式播放单个视频,服务器所消耗的带宽:
[root@localhost ~]# ./net.sh eth0 1
IN: 3318 Byte/s OUT: 259984 Byte/s
IN: 3486 Byte/s OUT: 249470 Byte/s
IN: 3332 Byte/s OUT: 259984 Byte/s
IN: 3090 Byte/s OUT: 252528 Byte/s
IN: 3000 Byte/s OUT: 252474 Byte/s
IN: 3000 Byte/s OUT: 253976 Byte/s
IN: 2940 Byte/s OUT: 255478 Byte/s
IN: 3004 Byte/s OUT: 252474 Byte/s
IN: 3452 Byte/s OUT: 252528 Byte/s
IN: 3270 Byte/s OUT: 260038 Byte/s
IN: 3586 Byte/s OUT: 252474 Byte/s


  ②、客户端 1.5M ADSL 环境,RTMP 流媒体方式播放单个视频,服务器所消耗的带宽:
[root@localhost ~]# ./net.sh eth0 1
IN: 3900 Byte/s OUT: 27878 Byte/s
IN: 4200 Byte/s OUT: 30868 Byte/s
IN: 4380 Byte/s OUT: 27801 Byte/s
IN: 4080 Byte/s OUT: 29965 Byte/s
IN: 4080 Byte/s OUT: 26450 Byte/s
IN: 3960 Byte/s OUT: 27143 Byte/s
IN: 3000 Byte/s OUT: 10061 Byte/s
IN: 3960 Byte/s OUT: 16166 Byte/s
IN: 3660 Byte/s OUT: 26480 Byte/s
IN: 4020 Byte/s OUT: 23127 Byte/s


  HTTP 方式播放,如果服务器端不限速,客户端的带宽越大,服务器消耗的带宽也越大,但限速又会影响用户体验;
  RTMP 流媒体方式播放,只要客户端达到最低带宽要求,不管客户端的带宽如何,服务器消耗的带宽都一样。

  如果播放10M以内大小的视频,HTTP 能够在较短的时间内下载完视频,能够降低并发观看用户数;
  如果播放10M以上大小的视频,RTMP 要比 HTTP 方式节省不少带宽。

  RTMP 播放时进度条可以自由拖动,虽然Lighttpd和Nginx目前也可以使用somevideo.flv?start=xxx的方式从指定位置下载视频,但还是不如 RTMP 灵活。



  四、带宽测试Shell脚本(net.sh):
#!/bin/bash

# test network width

function usage

{

        echo "Usage: $0  "

        echo "    e.g. $0 eth0 2"

        exit 65

}


if [ $# -lt 2 ];then
usage
fi
typeset in in_old dif_in
typeset out out_old dif_out
typeset timer
typeset eth

eth=$1
timer=$2

in_old=$(cat /proc/net/dev | grep $eth | sed -e "s/\(.*\)\:\(.*\)/\2/g" | awk ' { print $1 }' )
out_old=$(cat /proc/net/dev | grep $eth | sed -e "s/\(.*\)\:\(.*\)/\2/g" | awk ' { print $9 }' )

while true
do
sleep ${timer}
in=$(cat /proc/net/dev | grep $eth | sed -e "s/\(.*\)\:\(.*\)/\2/g" | awk ' { print $1 }' )
out=$(cat /proc/net/dev | grep $eth | sed -e "s/\(.*\)\:\(.*\)/\2/g" | awk ' { print $9 }' )
dif_in=$(((in-in_old)/timer))
dif_out=$(((out-out_old)/timer))
echo "IN: ${dif_in} Byte/s OUT: ${dif_out} Byte/s"
in_old=${in}
out_old=${out}
done
exit 0


Tags: , ,



技术大类 » 其他Unix技术 | 评论(79) | 引用(3) | 阅读(133481)
Louis Vuitton Neverfull Email Homepage
2012-4-21 17:53
www.lvbagsclassic.com are authorized authentic Louis Vuitton handbags outlet store. All the items at our site are 100% authentic. All our Louis Vuitton handbags will come with the authenticity card, serial Number, dust bag and care booklet. We promise you will be 100% satisfied when you get such cheap authentic Louis Vuitton handbags from us!
Louis Vuitton Neverfull
Hogan
2012-5-10 18:04
Mentre youre gestione di problemi complessi tra cui PAYE insieme con le imprese del prelievo, l'idea è sicuramente intelligente per acquisire specializzata fare qualcosa di sicuro si sta usando la vostra organizzazione. Self-employmentSelf lavoratori uomini e donne potrebbe anche fare pieno uso Hogan dei ragionieri in tutta Stansted, quando hanno l'effetto della loro prelievo unico e sì, è spesso sconcertante. Stare di fronte a una buona varietà prelievo può essere schiacciante, di conseguenza, il
coach factory outlet Email Homepage
2012-5-17 13:18
Today, following half a century, mentor leather-bases coach factory outlet continues to be the delicate craft of leather-based master is accountable for,Would you like to meet more friends, or go with the times? If yes, coach factory online is opening welcome doors to you.in the market you definitely can find various colorways that are designed in as well as the high quality that applied in. For most of you would like to come. So just come to our coach factory outlet online store to choose one.
louis vuitton sale Email Homepage
2012-5-17 13:19
Louis Vuitton belt at louis vuitton sale is one kind of fashion accessory with high cost performance among the Louis Vuitton accessories.Offering quality LV products with favorable prices, louis vuitton outlet store is at your service. Hurry up, or you can not seize the chance.in fact, louis vuitton is one of the most famous fashion design master.he opened the fist suitcase shop called after his name.
coach outlet online Email Homepage
2012-5-17 13:19
I heard of coach outlet online through the advertisement when I was shopping. And now I often brow the webpage and buy Coach bags online.It is a symbol regarding position not to mention nature.Here I would like to launch a excellent bags pertaining to business men.Which may be coach outlet store.coach outlet has always been simple,durable style features to win consumers.The products are more flexible,with easy bleaching,wear characteristics,and simply use a damp cloth.
coach outlet, Email Homepage
2012-5-17 13:19
Remember the coach outlet provide coach bags which won't be deteriorated into its overall styles by any means. It will maintain its looks, colors, and uniqueness for long time.coach outlet store online has been voted by Hour Detroit magazine readers as the Best of Detroit in their 12th annual readers'poll.Lots of women like which usually amount normally include a coach outlet online ,it provides coziness to many girls that don't even think it is a great bushel of great interest directly to them.
tan80406kn Email Homepage
2012-5-18 07:37
,淘宝免费刷钻,淘宝刷客站衡阳最新楼盘  待定 [蒸湘区] 华新开发区长丰大道与衡州大道交汇处船山公园旁 待定 [雁峰区] 蒸阳路与雁城路交汇处东北角 待定 [雁峰区] 雁峰区黄白路128号  待定 [蒸湘区]  采霞街10号(解放大道生态公园往南500米) 3600元 [蒸湘区] 衡阳市蒸湘区中心汽车站旁 待定 [蒸湘区] 破新大道与红湘北路交口处 3500元 [蒸湘区] 蒸湘区船山西路93号 待定 [珠晖区] 衡阳市珠晖区冶金厂大院内(中钢衡重正门旁)  待定 [珠晖区] 火车站广场对面 4000元 [蒸湘区] 华新开发区延安路28号(市委西侧20米)
xujie777 Email
2012-5-19 08:57
We aim to make all our customers satisfy with our products. You will find a variety of Men's fashion louis vuitton uk, fashion Women's cheap Louis Vuitton bags in our store at affordable price.Thinking of interesting ways to cost a milestone birthday? louis vuitton online shop had one of the most distinctive distinctive celebrations.bakery along with living room operated by means of about three moment louis vuitton online Most effective Pastry Chef’s of the year Rammy Nominee Chef’s.
xujie777 Email
2012-5-19 08:58
The choices are likely to be basically countless seeing that louis vuitton outlet occurs with the help of completely new and also incredible concepts once in a while.Louis vuitton Wholesale Monogram Canvas HandbagsLouis Vuitton Collection Beach Handbags louis vuitton bags outlet Damier Canvas HandbagsLouis vuitton Mahina HandbagsLouis Vuitton Monogram Mini Lin HandbagsLouis Vuitton Monogram Multicolore HandbagsLouis vuitton Monogram Vernis HandbagsLouis Vuitton Wholesale Epi Leather HandbagsLouis Vuitton For Men HandbagsLouis Vuitton Damier Canvas WalletsLouis Vuitton Epi Leather WalletsLouis Vuitton Monogram Canvas WalletsLouis Vuitton Monogram Vernis WalleLouis Vuitton ShoesLouis Vuitton Men wallets.As the Authentic Louis Vuitton are so high-priced, so came the louis vuitton handbags outlet.
xujie777 Email
2012-5-19 08:58
coach outlet has become a popular shopping experience for consumers around the world, and a desirable distribution channel for manufacturer's and retailers.Getting your hands on coach outlet store online can be a hefty investment of hundreds of dollars.But do not despair,the Coach Outlet store could be the answer to your prayers.coach outlet online is your smart choice when you want to get the discount Coach accessory. You can find the exact Coach Bags and other accessory you want at a low price that's right for you. My dear friends, let the coach outlet online pave your way into the world of high fashion with their ultimate fashion factory.
xujie123
2012-5-21 11:30
Our online store offers you discounted Designer louis vuitton replica wallet at present. You could find them in desirable quality and price. If you don't mind high class louis vuitton uk, have a good time here.louis vuitton Store Online Handbags can also bring great accuracy as well as practical applicability and fashionable.Have you ever dreamed of being as charming as Madonna? Have you ever thought of becoming an envy of all your friends? If so, come to louis vuitton outlet.<br/>
xujie555
2012-5-21 13:58
coach factory outlet uses graceful accessories to match the classical logo of coach, which is the best combination of coach. The handmade coach products?can make you more charming and graceful.coach factory online provides people many coach goods. If you wish to snatch the coach handbag, then this best method is made for that you like for coach discount.coach factory outlet online is a fashion brand to ensure its quality. With designer coach shoulder bags, you will always attract people's attention. The bags will emphasize your personal style and taste.<br/>
xujie333
2012-5-21 15:24
coach outlet online Store guarantee that all the coach handbags offered are own high quality. In addition , all of them are sold at an unexpected low price.If you want to purchase, just visit their website.coach factory outlet is really sizzling kinds of shopping way for you. With the usage of the replica designer coach bags, you can surely be able to change your individual looks in a stunning manner.Coach bags on sale from the coach outlet are cheap or discount prices that you certainly will stand out from the crowd on your next camping trip!<br/>
RED5
2012-7-16 10:26
楼主有联系方式么?是否可以联系一下,可以付费。QQ :37491187
red5
2012-7-28 06:37
你好,我正在研究red5和jwplayer整合。我的jwplayer整合到red5的ofla_demo项目下,能播放ofla_demo项目streamer目录下的flv文件,但是远程的视频文件无法播放,一直缓冲。

这个是什么原因呢?
hsf22104 Email Homepage
2012-7-29 02:52
they can easily pass time by reading fashion magazines. The cover story of the magazines is very interesting and is focused on the special moments of a famous personality. 2 In many occupations,isabel marant, The importance of eating a well balanced meal: The key to healthy eating is balanced diet,isabel marant shoes, this IPL has really been surprising. The IPL is probably a notch lower in terms of quality of contest. The author is a girl who love writing in her spare time.
   she love shopping and fashion style and own some experience on shopping clothes such as Herve Leger clothing. Cat eye glasses were mainly popular in the 1950s and 1960s among fashionable women. Andrey Hepburn wore a pair of cat-eye glasses,isabelle marant, but Microsoft has not seen considerable damage by this suit.
Related articles:

  
   than having disc
sdf
2012-8-17 17:34
等播放完,再点击重放,就不起作用了。。。。。。 red5 bugcry
Angelina0 Email Homepage
2012-8-18 09:07
Isn't technology wonderful? I sure ,sex videosex video think so, we live in an age where any question can be answered with speed, thanks to the Internet. Just the fact that you are reading this article has proven it! You are looking for tips to find good educational cunnilingus videos and here you are now,reading this article that will point youin sex video the right direction you are heading towards.
AA
2012-10-28 18:28
上面的视频播放例子是http。。
分页: 3/5 第一页 上页 1 2 3 4 5 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]