如何使用视频标签进行真正的流式传输(即不是渐进式下载)? (html5)

发布于 2024-08-20 05:55:43 字数 164 浏览 4 评论 0原文

我有便宜的 Apache PHP 托管。我有一个 mp4 和/或 Ogg 视频文件。我想将该视频动态地传输给用户。并让这些用户通过 HTML 5 视频播放器观看。

如何使用视频标签(即不是渐进式下载)和 Apache PHP 进行真正的流式传输(能够滚动到视频的任何部分,而无需事先下载完整视频)?

I have cheap Apache PHP hosting. I have a mp4 and or Ogg video file. I want to dynamically stream this video to users. And let those users see it through HTML 5 video player.

How do you do true streaming (being able to scroll to any part of the video without previous download of full video) with the video tag (i.e. not progressive download) and Apache PHP?

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

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

发布评论

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

评论(1

薔薇婲 2024-08-27 05:55:43

这里的“真”流和“伪”流似乎有点混淆。我相信真正的流媒体是指视频通过 rtsp、rtmp 或 mms 等流媒体协议从专业媒体服务器流式传输,在可供观看之前不会首先下载媒体。我认为没有任何浏览器支持 HTML5 - 至少我还没有看到任何支持。

伪流似乎是您想要的一种,但它基本上仍然是渐进式流,唯一的区别是您告诉服务器您想要从文件中的哪个位置或时间开始流。

以下是 HTML5 视频的示例,该视频使用时间偏移移动到视频的任何部分视频。它应该为您提供亲自尝试所需的所有信息。

There appears to be a slight mix-up between "true" streaming and "pseudo" streaming here. I believe true streaming is when video is streamed from a specialist media server over a streaming protocol such as rtsp, rtmp or mms whereby the media is not first downloaded before being available for viewing. I don't think any browser supports this with HTML5 - at least I've yet to see any support for it.

Pseudo streaming appears to be the one that you want, but it is still basically progressive streaming the only difference being is you tell the server at what position or time in the file you want to start streaming from.

Here is an example of HTML5 video using time offsets to move to any part of the video. It should give you all the information you need to try it out for yourself.

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