如何访问HTML5视频解码功能? [英] how to access HTML5 video decoding functionality?

查看:474
本文介绍了如何访问HTML5视频解码功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HTML5具有<video/>元素,该元素可从服务器下载视频,对其进行解码并进行渲染.他们经常(如果不是总是)使用硬件加速解码(如果可用).

HTML5 has <video/> element that downloads video from server, decodes it and renders. Often if not always they use hardware accelerated decoding (if available).

是否可以仅使用解码功能?原因是我使用的是自定义流协议,因此在客户端,我已经编码了需要解码和渲染的视频流.

Is it possible to access just decoding functionality? The reason is that I'm using custom streaming protocol and so on client side I have encoded video stream that I need to decode and render.

不幸的是,视频解码器的纯JavaScript实现不适用,因为它们无法提供足够的性能.我只对HVEC或h.264编解码器感兴趣.

Pure JavaScript implementations of video decoder are not applicable unfortunately as they cannot provide sufficient performance. I'm interested in HVEC or h.264 codecs only.

推荐答案

此问题的解决方案是 WebRTC .可以集成外部编码器,也可以使用嵌入式编码器.在浏览器中,WebRTC客户端使用硬件解码. WebRTC还提供实时流功能.兼容性还不错.

The solution for this problem is WebRTC. It's possible to integrate an external encoder or to use an embedded one. In browser WebRTC client uses H/W decoding. WebRTC also provides real-time streaming functionality. Compatibility is not bad.

这篇关于如何访问HTML5视频解码功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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