Flash 中的 YouTube 风格限制

发布于 2024-08-05 01:12:52 字数 163 浏览 5 评论 0原文

我对此可能完全疯了,但 YouTube 视频的下载/缓冲速率似乎一开始就更快,并且缓冲点距离当前播放标记越远,缓冲速度就越慢。

我是疯了,还是其他人都这样?

假设是后者,有关于他们如何做到这一点的理论吗?是服务器端还是客户端?我认为它必须是客户端,但谁知道呢?不是我,所以我才问!

I may be completely insane on this one, but it seems like the download/buffer rate of YouTube videos is faster at the beginning and the further the buffer point gets from the currently playing mark, the slower buffering goes.

Am I crazy, or does it work this way for everyone else?

Assuming the latter, any theories on how they do it? Is it server-side or client-side? I would think it would have to be client-side, but who knows? Not me, that's why I'm asking!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

长伴 2024-08-12 01:12:52

从我从wireshark转储中看到的情况来看,它们通过向服务器发出多个请求(带有参数“范围”)来缓冲内容。客户只有在需要时才请求下一部分。

GET /videoplayback?
sver=3&
key=yt1&
sparams=algorithm%2Cburst%2Ccp%2Cfactor%2Cid%2Cip%2Cipbits%2Citag%2Csource%2Cupn%2Cexpire&
algorithm=throttle-factor&
upn=L4m-ID0n0V0&
expire=1334882299&
factor=1.25&
ipbits=8&
ip=77.0.0.0&
fexp=912300%2C919303%2C911623&
source=youtube&
range=8908800-10690559&
cp=U0hSSVhTUF9OU0NOMl9QTVRDOjhGTXRjbEpBNzls&
burst=40&
signature=20F9219AACD9249B3517F56ECFE8B12C6B001D2F.BDDD25B61745E0F6E0BBAC7E792C121AA67A4C7C&
keepalive=yes&
itag=34&
cm2=0&
id=9cc8ae37c50b77f7 HTTP/1.1

否则,这种带宽限制只有在客户端“控制”服务器时才可行,即要么请求他知道自己需要的内容(例如:Youtube 渐进式下载),要么定期告诉服务器他在哪里(例如:RTCP) /RTMP/RTP 流)。

From what I see from a wireshark dump, they buffer content by doing multiple requests (with a parameter "range") to the server. The client only requests the next part when he needs it.

GET /videoplayback?
sver=3&
key=yt1&
sparams=algorithm%2Cburst%2Ccp%2Cfactor%2Cid%2Cip%2Cipbits%2Citag%2Csource%2Cupn%2Cexpire&
algorithm=throttle-factor&
upn=L4m-ID0n0V0&
expire=1334882299&
factor=1.25&
ipbits=8&
ip=77.0.0.0&
fexp=912300%2C919303%2C911623&
source=youtube&
range=8908800-10690559&
cp=U0hSSVhTUF9OU0NOMl9QTVRDOjhGTXRjbEpBNzls&
burst=40&
signature=20F9219AACD9249B3517F56ECFE8B12C6B001D2F.BDDD25B61745E0F6E0BBAC7E792C121AA67A4C7C&
keepalive=yes&
itag=34&
cm2=0&
id=9cc8ae37c50b77f7 HTTP/1.1

Otherwise, this kind of bandwidth throttling is only doable if the client 'has the control' over the server, i.e. either requests what he knows he needs (ex: Youtube progressive download), or tell the server regularly where he is (ex: RTCP/RTMP / RTP streaming).

绻影浮沉 2024-08-12 01:12:52

这是在服务器端完成的,没有办法在客户端完成。

提供视频服务的方式有很多种,因此,如果您想自己设置,则取决于您使用的服务器技术,或者您可以只使用 RTMP 之类的技术(通过 Flash 媒体服务器或 Red 5 等)。

This is done on the server side, there is no way to do it on the client side.

There are many different ways to serve videos, so it will depend on what server technology you are using if you want to set it up yourself, or you could just use something like RTMP (via Flash media server or Red 5, etc.).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文