将部分视频流式传输到客户端 [英] Stream part of the video to the client

查看:28
本文介绍了将部分视频流式传输到客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

给定一个 windows 服务器后端,有没有办法实现一个纯 javascript/html5 客户端,它只能播放视频文件的指定部分(例如,从 2 小时视频的第 10 秒到第 15 秒)?

Given a windows server backend, is there a way to implement a pure javascript/html5 client that would be able to play only a designated part of the video file (e.g. from 10th second to 15th on a 2 hour video)?

据我所知,标准的 html5 视频标签将下载不适合我的情况的整个文件.

From what I know, standard html5 video tag will download an entire file which is not suitable for my situation.

服务器上的流媒体解决方案可能是一个答案,但是否有任何适用于纯 javascript/html 客户端的解决方案?谢谢.

Streaming solutions on the server would probably be an answer, but are there any that would work with pure javascript/html client? Thanks.

推荐答案

除了像 HLS 或 MPEG-DASH 这样的复杂方法,您还可以考虑使用 伪流,或渐进式下载.许多媒体服务器支持它的搜索功能,让您随时随地观看 MP4 视频.使用 Javascript,您应该能够在需要时实际设置播放和停止(但这取决于您处理处理 HTML5 视频容器中播放的不同浏览器).

Besides complex methods like HLS or MPEG-DASH you can consider using pseudo-streaming, or progressive download. Its seeking capability supported by a number of media servers will allow you to watch the MP4 video from any moment. Using Javascript you should be able to actually setup play and stop when you need (but that's up you to deal with different browsers handling playback in HTML5 video container).

这篇关于将部分视频流式传输到客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆