??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美精品一区二区久久,国产精久久一区二区,欧美日韩国产一区二区三区http://www.aygfsteel.com/lihao336/category/47043.html成于坚忍Q毁于Qw?/description>zh-cnFri, 02 Sep 2011 01:58:48 GMTFri, 02 Sep 2011 01:58:48 GMT60Streaming vs. progressive download: Understanding the differencehttp://www.aygfsteel.com/lihao336/archive/2011/09/01/357749.htmlcalvincalvinThu, 01 Sep 2011 08:35:00 GMThttp://www.aygfsteel.com/lihao336/archive/2011/09/01/357749.htmlhttp://www.aygfsteel.com/lihao336/comments/357749.htmlhttp://www.aygfsteel.com/lihao336/archive/2011/09/01/357749.html#Feedback0http://www.aygfsteel.com/lihao336/comments/commentRss/357749.htmlhttp://www.aygfsteel.com/lihao336/services/trackbacks/357749.html

Streaming vs. progressive download: Understanding the difference

Streaming vs. progressive download: Understanding the difference

One of the most frequently asked questions about delivering video online is ?“What’s the difference between streaming video and progressive download??As a user clicking a video link on a website, you will not often know which delivery method is being used, unless you do some poking around. Although the end result may look the same to the end user, streaming and progressive download are very different delivery methods, each with their own strengths and weaknesses. Here we will take a look at the two delivery methods and help you to decide which will work best for you.

Delivering a file via HTTP:

Delivery of a file over HTTP is normally referred to as ‘progressive download? or ‘http streaming? In reality, it is not streaming at all but a very simple bulk download of a video file to the end user’s computer.A temporary copy of the video file is then stored on the local computer so that the viewer can watch the file over and over without having to download the file each time.

Let’s assume you have a video file encoded at 500kbps. The server delivering the file does not know or care that your video file is encoded at 500kbps; it simply pushes data to the host machine as quickly as it can. This can sometimes give the illusion that the file is being streamed because playback can start as soon as enough of the file is available on the local machine. This obviously restricts the users from skipping to parts of the file that have not yet been downloaded.

If the bandwidth available to the machine downloading the file is smaller than the encoded bit-rate there may be a wait before the file will start to play. For example, on a 56kbps dial-up modem, trying to play a file that is encoded at 500kbps you may have to wait a fairly long time before enough of the file has been downloaded for it to start playing. On a 500kbps internet connect, or faster, playback should start almost immediately and the file should download faster than it will play, meaning that playback will not have to stop because not enough data has been downloaded.

HTTP(Hypertext transport protocol) operates over TCP(Transport control protocol) which controls the actual transport of the packets over the network. TCP is optimized for guarantee of delivery, regardless of file format or size. If a packet is skipped during the transfer of a file, it will request a resend of that packet. Resend requests take time and bandwidth and could increase the load on the server. TCP is not designed for efficient real time delivery or careful bandwidth control, but for accurate and reliable delivery of every bit.

Delivering from a streaming server:

Effectively, a streaming server is a piece of software which deals with video requests. Unlike a standard web server delivering a video file over HTTP (progressive download), a streaming server opens a conversation with the local machine. There are two sides to this conversation, one is for transferring the video and the other is for control messages between the media player and the server. These control messages include commands such as ‘play? ‘pause? ‘stop?and ‘seek?

If you have a 56kbps connection, you will not be able to receive a stream encoded at 500kbps; you will have to settle for a lower quality video encoded for 56kbps connections. Streaming does however have many advantages.

1. You can begin video playback at any point of the video, or skip through the video as you see fit. This is very convenient for users.

2. It makes a lot more efficient use of bandwidth as you are only using bandwidth for part of the video that are actually watched as opposed to HTTP delivery where the whole file gets delivered.

3. The video file is not stored on the viewer’s computer ?the video data is played and then discarded by the media player. This lets you maintain more control over your content.

Streaming servers use a specific set of protocols to deliver streams, such as RTSP(Real time streaming protocol), RTMP(Real time messaging protocol)and MMS(Microsoft media services). These protocols are all more suited to delivering video streams because they are more focussed with continuous delivery than they are with 100% accuracy. Unlike TCP, they do not send resend requests for missing packets but instead continue with the rest of the video file. The idea is that it is better to have a momentary glitch in audio or video than for the playback to stop altogether and wait for the missing data.

Conclusion:

In conclusion, both streaming and progressive download have their own benefits and limitations. If you are trying to reach viewers with slower connections and need the quality to be high, progressive download would be your best option. On the other hand, if you know that your viewers will all have a fast enough connection to view your stream, you might save on bandwidth by streaming the video. Without knowing who your video will be served to, progressive download will always be a safer option because no matter what connection they have, they will be able to view your video. For live streaming, a streaming server has to be used. This cannot be done over HTTP.

Original posted at http://blog.mydeo.com/2009/01/12/streaming-vs-progressive-download-understanding-the-difference/



calvin 2011-09-01 16:35 发表评论
]]>
linux下ping命oDSCP位和DF位设|?/title><link>http://www.aygfsteel.com/lihao336/archive/2010/11/22/338698.html</link><dc:creator>calvin</dc:creator><author>calvin</author><pubDate>Mon, 22 Nov 2010 07:24:00 GMT</pubDate><guid>http://www.aygfsteel.com/lihao336/archive/2010/11/22/338698.html</guid><wfw:comment>http://www.aygfsteel.com/lihao336/comments/338698.html</wfw:comment><comments>http://www.aygfsteel.com/lihao336/archive/2010/11/22/338698.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/lihao336/comments/commentRss/338698.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/lihao336/services/trackbacks/338698.html</trackback:ping><description><![CDATA[<br /> <strong>讄dscp</strong><br /> ping -Q 0x02 www.google.com<br /> <br /> <img alt="" src="http://www.aygfsteel.com/images/blogjava_net/lihao336/Screenshot-1.png" height="550" width="808" /><br /> <br /> 如图Q通过-Q参数讄的值媄响到Differentiated Service Filed,共八?br /> 详细参见linux ping man page?Q选项的解释?br /> <br /> <strong>讄DF</strong><br /> DF位置位:<br /> ping -M do www.google.com<br /> 取消讄DF位:<br /> ping -M dont www.google.com<br /> 默认情况下,DF位处于置位状态,即Don't Fragment<br /> <br /> 参见<br /> <a >http://yurisk.info/2009/09/01/ping-setting-dont-fragment-bit-in-linuxfreebsdsolarisciscojuniper/</a><br /> <img src ="http://www.aygfsteel.com/lihao336/aggbug/338698.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/lihao336/" target="_blank">calvin</a> 2010-11-22 15:24 <a href="http://www.aygfsteel.com/lihao336/archive/2010/11/22/338698.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[转]MTU与MSShttp://www.aygfsteel.com/lihao336/archive/2010/11/22/338696.htmlcalvincalvinMon, 22 Nov 2010 07:10:00 GMThttp://www.aygfsteel.com/lihao336/archive/2010/11/22/338696.htmlhttp://www.aygfsteel.com/lihao336/comments/338696.htmlhttp://www.aygfsteel.com/lihao336/archive/2010/11/22/338696.html#Feedback0http://www.aygfsteel.com/lihao336/comments/commentRss/338696.htmlhttp://www.aygfsteel.com/lihao336/services/trackbacks/338696.html MTU: Maxitum Transmission Unit 最大传输单?br />
MSS: Maxitum Segment Size 最大分D大?br />
PPPoE: PPP Over EthernetQ在以太|上承蝲PPP协议Q?br />
[分析q程]
先说说这MTU最大传输单元,q个最大传输单元实际上和链路层协议有着密切的关p,让我们先仔细回忆一下EthernetII帧的l构DMAC+SMAC+Type+Data+CRC׃以太|传输电气方面的限制Q每个以太网帧都有最的大小64bytes最大不能超q?518bytesQ对于小于或者大于这个限制的以太|我们都可以视之ؓ错误的数据Q一般的以太|{发设备会丢弃q些数据帧。(注:于64Bytes的数据一般是׃以太|冲H生的“片”或者线路干扰或者坏的以太网接口产生的,对于大于1518Bytes的数据我们一般把它叫做Giant帧,q种一般是׃U\q扰或者坏的以太网口生)?br />
׃以太|EthernetII最大的数据帧是1518Bytesq样Q刨M太网帧的帧头QDMAC目的MAC地址48bit=6Bytes+SMAC源MAC地址48bit=6Bytes+Type?bytesQ?4Bytes和ឮCRC校验部分4BytesQ这个部门有时候大家也把它叫做FCSQ,那么剩下承蝲上层协议的地方也是Data域最大就只能?500Bytesq个值我们就把它UC为MTU。这个就是网l层协议非常兛_的地方,因ؓ|络层协议比如IP协议会根据这个值来军_是否把上层传下来的数据进行分片。就好比一个盒子没法装下一大块面包Q我们需要把面包切成片,装在多个盒子里面一L道理。当两台q程PC互联的时候,它们的数据需要穿q很多的路由器和各种各样的网l媒介才能到辑֯端,|络中不同媒介的MTU各不相同Q就好比一长段的水,׃同粗l的水管l成QMTU不同 Q通过q段水管最大水量就要由中间最l的水管军_?br />
对于|络层的上层协议而言Q我们以TCP/IP协议族ؓ例)它们Ҏ粗l不在意它们认ؓq个是网l层的事情。网l层IP协议会检查每个从上层协议下来的数据包的大,q根据本机MTU的大决定是否作“分片”处理。分片最大的坏处是降低了传输性能Q本来一ơ可以搞定的事情Q分成多ơ搞定,所以在|络层更高一层(是传输层)的实C往往会对此加以注意!有些高层因ؓ某些原因׃要求我这个面包不能切片,我要完整地面包,所以会在IP数据包包头里面加上一个标{:DFQDonot FragmentQ。这样当q个IP数据包在一大段|络Q水里面)传输的时候,如果遇到MTU于IP数据包的情况Q{发设备就会根据要求丢弃这个数据包。然后返回一个错误信息给发送者。这样往往会造成某些通讯上的问题Q不q幸q的是大部分|络链\都是MTU1500或者大?500?br />
对于UDP协议而言Q这个协议本w是无连接的协议Q对数据包的到达序以及是否正确到达不甚兛_Q所以一般UDP应用对分片没有特D要求?br />
对于TCP协议而言׃一样了Q这个协议是面向q接的协议,对于TCP协议而言它非常在意数据包的到N序以及是否传输中有错误发生。所以有些TCP应用对分片有要求---不能分片QDFQ?br />
花开两朵Q各表一枝,说完MTU的故事我们该讲讲今天的第二个猪脚---PPPoE所谓PPPoE是在以太网上面跑PPP协议Q有人奇怪了QPPP协议和Ethernet不都是链路层协议吗?怎么一个链路层跑到另外一个链路层上面MQ难道升U成|络层协议了不成。其实这是个误区Q就是某层协议只能承载更上一层协议。ؓ什么会产生q种奇怪的需求呢Q这是因为随着宽带接入Q这U宽带接入一般ؓCable Modem或者xDSL或者以太网的接入)׃以太|缺乏认证计Ҏ制而传l运营商是通过PPP协议来对拨号{接入服务进行认证计费的Q所以就Zq么一个怪胎QPPPoE?br />
PPPoE带来了好处,也带来了一些坏处,比如Q二ơ封装耗费资源Q降低了传输效能{等Q这些坏处俺也不多说了,最大的坏处是PPPoEDMTU变小了以太网的MTU?500Q再减去PPP的包头包开销Q?BytesQ,变?492。如果两CZ间的某段|络使用了PPPoE那么׃D某些不能分片的应用无法通讯。这个时候就需要我们调整一下主机的MTUQ通过降低L的MTUQ这h们就能够利地进行通讯了?br />
当然对于TCP应用而言q有另外的解x案。马上请Z天第三位猪脚QMSS。MSS最大传输大的~写Q是TCP协议里面的一个概cMSS是TCP数据包每ơ能够传输的最大数据分Dcؓ了达到最佳的传输效能TCP协议在徏立连接的时候通常要协商双方的MSS|q个值TCP协议在实现的时候往往用MTUg替(需要减去IP数据包包头的大小20Bytes和TCP数据D늚包头20BytesQ所以往往MSS?460。通讯双方会根据双Ҏ供的MSS值得最值确定ؓq次q接的最大MSS倹{?br />
介绍完这三位猪脚,我们回过头来看前a里面的那个问题,我们试想一下,如果我们在中间\由器上把每次TCPq接的最大MSSq行调整q样使得通过PPPoE链\的最大MSS值加上数据包头包不会超qPPPoE的MTU大小1492q样׃会造成无法通讯的问?所以上面的问题可以通过ip tcp adjust-mss 1452来解?当然问题也可以通过修改PC机的MTU来解冟?br />
不改MSS会如何?有可能会出现部分|站打不开Q例如陶宝,在线银行什么的。或者开|页慢,都可能和MSS有关pȝ?br /> 修改办法Q?927版本Q?br /> IP==>>Firwwall==>>Mangle==>>??=>>
General?br /> Chain:forward
Protocol:tcp

Advanced?br /> Tcpflags选SYN

Action?br /> action:Change mss
new tcpmss:1472

关于MSS数值的多少Q以及取值办法~

在Windows环境下,ping 目标|站 -f -l 1500  然后看能否PING通,如果PING不通,׃4为单位往下减Q目标网站可以是
你想讉KQ但讉K不了Q也可以是其他一些网站,q个要求不多。?br /> 比如我PING 癑ֺ
ping www.baidu.com -f -l 1500
得到以下提示Q?br />
C:\>ping www.baidu.com -f -l 1500

Pinging www.a.shifen.com [202.108.22.5] with 1500 bytes of data:

Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.

Ping statistics for 202.108.22.5:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

q就说明Q?500q个MSS数g可取Q需要往下了换,那么׃4位单位往下减Q减到通ؓ止,是1500-4=Q?Q自己去了。我q里?472才通的Q所以我改的是1472

C:\>ping www.baidu.com -f -l 1472

Pinging www.a.shifen.com [202.108.22.5] with 1472 bytes of data:

Reply from 202.108.22.5: bytes=1472 time=29ms TTL=53
Reply from 202.108.22.5: bytes=1472 time=29ms TTL=53
Reply from 202.108.22.5: bytes=1472 time=29ms TTL=53
Reply from 202.108.22.5: bytes=1472 time=29ms TTL=53

Ping statistics for 202.108.22.5:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 29ms, Maximum = 29ms, Average = 29ms

q就是通了Q基于给地网l状况不同,所以MSS也不仅相同,大家要自己测试,多做试验?

转自 http://www.clxp.net.cn/article.asp?id=253


calvin 2010-11-22 15:10 发表评论
]]>
[转]Ajax~存解决办法http://www.aygfsteel.com/lihao336/archive/2010/11/15/338122.htmlcalvincalvinMon, 15 Nov 2010 10:40:00 GMThttp://www.aygfsteel.com/lihao336/archive/2010/11/15/338122.htmlhttp://www.aygfsteel.com/lihao336/comments/338122.htmlhttp://www.aygfsteel.com/lihao336/archive/2010/11/15/338122.html#Feedback0http://www.aygfsteel.com/lihao336/comments/commentRss/338122.htmlhttp://www.aygfsteel.com/lihao336/services/trackbacks/338122.html阅读全文

calvin 2010-11-15 18:40 发表评论
]]>
վ֩ģ壺 | ʯ| | Ѱ| ֶ| ½| | Ϊ| ʳ| | | | | ˴| ؿ˹| | | | ͬ| | | | | Ҧ| | | | | ɽ| | | | | ԭƽ| | | ϲ| | | | |