MP4 文件的实时流式传输

发布于 2024-10-31 07:10:35 字数 130 浏览 1 评论 0原文

是否可以使用某些 Flash 播放器实时播放视频(mp4)?我所说的实时是指玩家会动态接收数据,不是从已经保存的文件中接收数据,而是例如 php 脚本(发送适当的内容类型标头),即当时正在下载并“回显”文件的数据玩家播放它 - 就像某种直播一样。

Is it possible to play the video (mp4) in real time using some flash player? What I mean by in real-time is that player would receive data on the fly, not from alredy saved file but e.g. php script (which sends appropriate content-type header) THAT IS DOWNLOADING AND 'ECHO-ing' THE FILE AT THE TIME PLAYER PLAYS IT - like e.g. some kind of live stream.

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

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

发布评论

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

评论(3

耀眼的星火 2024-11-07 07:10:35

JW Player 可以播放流媒体视频,LongTail Video 也有一些关于流媒体的好(实用)信息:

http://www.longtailvideo.com/support/search/google_cse_adv/streaming

编辑:也许我在回答之前没有充分阅读问题,但这里有关于可以在 PHP 中实现的所谓伪流的信息:

http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/12534/video-delivery-http-pseudo-streaming" longtailvideo.com/support/jw-player/jw-player-for-flash-v5/12534/video-delivery-http-pseudo-streaming

JW Player can play streaming video, and LongTail Video also has some good (practical) info on streaming in general:

http://www.longtailvideo.com/support/search/google_cse_adv/streaming

Edit: Maybe I didn't read the question quite as well as i ought to before I answered, but here is info on so called pseudo streaming that can be implemented in PHP:

http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/12534/video-delivery-http-pseudo-streaming

梦幻的味道 2024-11-07 07:10:35

要使用 Flash 进行即时播放,您需要格式化 mp4 文件,使 moov 标头框位于文件前面,以便立即开始播放。这可以通过 qt-faststart 实用程序来完成。

为了允许使用闪存在文件中查找(查找未下载的文件的一部分),您需要使用伪流。 (因为闪存已禁用部分字节标头)。这需要在服务器端实现:http://h264.code-shop.com/trac 以及 flash 端(jwplayer 和 flowplayer 都支持这种方法,并在搜索时发送 ?start=123 参数)

另一个选项是使用 html5 标签(但仅少数浏览器支持 mp4) - 然后你不需要伪流后端。

For instant playback using flash, you need to format your mp4 file to have the moov header box at the front of the file for playback to start right away. This can be done by the qt-faststart utility.

To allow for seeking in the file using flash (to a portion of the file not downloaded) you need to utilize pseudo streaming. (Since flash has disabled the partial bytes header). This needs to be implemented on the server side: http://h264.code-shop.com/trac as well as the flash side (both jwplayer and flowplayer supports this approach, and sends ?start=123 param on seek)

The other option is to use the html5 tag (but mp4 is only supported in a few browsers) - then you do not need the pseudostreaming backend.

揽月 2024-11-07 07:10:35

位置使用 VLC 媒体播放器:

http://www.videolan.org/vlc/

您可以从以下 安装成功后,点击菜单Media->Open Network Stream,填写视频的URL。

You can use VLC media player from:

http://www.videolan.org/vlc/

After you successfully installed it, click on the menu Media->Open Network Stream and fill in the URL for the video.

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