当前位置:网站首页>H5网页播放器EasyPlayer.js如何实现直播视频实时录像?
H5网页播放器EasyPlayer.js如何实现直播视频实时录像?
2022-07-07 06:46:00 【TSINGSEE】
EasyPlayer系列做了整整8年了,从最开始的EasyPlayerRTSP版,到后来的RTMP版、Pro版、js版,受众用户已经不计其数了,希望EasyPlayer能一如既往地优秀下去。

最近,有位用户对我们的EasyCVR提出了一种关于播放器实时录像的需求。按照以往的概念,网页怎么能像C/S客户端那样做实时的视频录像呢?因为浏览器写本地文件几乎是不可能的一件事情。
在以往的做法中,实现这种用户需求,基本上也就是采用“后端+前端”配合的方式来实现这种录像功能。后端收到前端录像的指令,将要发往前端的音视频数据先预存一份在服务端,当收到前端的停止录像指令后,再将整个缓存的数据,打包封装成MP4,提供给用户下载。

事实上,这种方式其实是非常不合理的。试想一下,如果有成千上万的用户在使用这个功能,服务端不但要缓存数据,还要封装数据,还要维护Session和Download数据(实际这个数据已经从直播输出给客户端一次了)。这种做法既是一种流量的浪费,又是计算资源的浪费,不符合技术开发者的工匠思想。
对于“后端+前端”这种不合理的实时录像方式,我们要想办法改善,采用更为合理的“去中心化”做法。
于是,经过了大量的调研和开发,我们摸索出了一套采用wasm前端“转码+合成”的方案,我们通过wasm(WebAssembly)将ES流进行转码和封装,成为MP4录像需要的“H.264/H.265+AAC”的数据,再从BLOB下载合成后的数据就搞定了!这实在是非常棒的一个功能!


我们的EasyPlayer视频流媒体系列播放器,可支持H.264/H.265视频编码,并拥有多个版本,包括EasyPlayer-RTSP、EasyPlayer.js、EasyPlayerPro等,用户可以根据自身的需求对其进行二次开发或自主集成。感兴趣的用户可以前往官网下载、部署和测试。
边栏推荐
- Hard core sharing: a common toolkit for hardware engineers
- Integer or int? How to select data types for entity classes in ORM
- Using JWT to realize login function
- 消费互联网的产业链其实是很短的,它仅仅承接平台上下游的对接和撮合的角色
- Unity shader (learn more about vertex fragment shaders)
- Pick up the premise idea of programming
- Record of structured interview
- C language pointer (Part 2)
- Sublime Text4 download the view in bower and set the shortcut key
- How to speed up video playback in browser
猜你喜欢

C language pointer (exercises)

Cesium load vector data

Huawei hcip datacom core_ 03day

Detailed learning notes of JVM memory structure (I)

网易云微信小程序

MongoDB怎么实现创建删除数据库、创建删除表、数据增删改查

JVM garbage collection detailed learning notes (II)

Several stages of PMP preparation study

stm32和电机开发(从单机版到网络化)

超十万字_超详细SSM整合实践_手动实现权限管理
随机推荐
Idea development environment installation
C language pointer (Part 1)
5A summary: seven stages of PMP learning
Unity shader (to achieve a simple material effect with adjustable color attributes only)
SAP MM STO单据的外向交货单创建后新加ITEM?
Locust performance test 2 (interface request)
超十万字_超详细SSM整合实践_手动实现权限管理
Postman setting environment variables
C language pointer (Part 2)
What is the rating of Huishang futures company? Is it safe to open an account? I want to open an account, OK?
Selenium mouse sliding operation event
Cesium load vector data
Sublime Text4 download the view in bower and set the shortcut key
liunx命令
Redis common commands
stm32和电机开发(从单机版到网络化)
Windows starts redis service
PMP Exam details after the release of the new exam outline
Pycharm create a new file and add author information
Detailed learning notes of JVM memory structure (I)