简体   繁体   English

通过Dash将原始h.264数据编码到浏览器

[英]Encoding raw h.264 data to browser via Dash

I have a live stream of raw h264 (no container) coming from a remote webcam. 我有来自远程网络摄像头的原始h264(无容器)直播。 I wanna stream it live in browser using DASH. 我想使用DASH在浏览器中直播。 DASH requires creating mpd file (and segmentation). DASH需要创建mpd文件(和分段)。 I found tools (such as mp4box) that accomplish that in static files, but i'm struggling to find a solution for live streams. 我找到了在静态文件中实现的工具(例如mp4box),但我很难找到实时流的解决方案。 any suggestions - preferably using node.js modules ? 任何建议 - 最好使用node.js模块

Threads i have checked: 我检查过的主题:

  1. mp4box - from one hand i saw this comment that states " You cannot feed MP4Box with some live content. You need to feed MP4Box -live with pre-segmented chunks. " on the other hand there's a lot of people directing to this bitmovin tutorial which does implement a solution using mp4box. mp4box - 从一方面我看到这条评论说“ 你不能用一些实时内容提供MP4Box。你需要用预先分段的块提供MP4Box -live。 ”另一方面有很多人指导这个bitmovin教程使用mp4box实现解决方案。 In the toturial they are using mp4box (which has a node.js api implementation ) and x264 (which doesn't have node.js module? or is contained in ffmpeg/mp4box?) 他们正在使用mp4box(有一个node.js api实现 )和x264 (没有node.js模块?或者包含在ffmpeg / mp4box中?)
  2. ngnix - ngnix has a module that support streaming to DASH using rtmp. ngnix - ngnix有一个支持使用rtmp流式传输到DASH的模块 for exemple in this toturial . 例如,在这个toturial中 I prefer not to go this path - as mention i'm trying to do it all in node.js. 我不想走这条路 - 正如我提到的那样,我试图在node.js中做到这一切。

Although i read couple of posts with similar problem, I couldn't find a suitable solution. 虽然我读了几个有类似问题的帖子,但我找不到合适的解决方案。 Help would be much appreciated! 非常感谢帮助!

The typical architecture is to send your live stream to a streaming server which will then do the heavy lifting to make the stream available to other devices, using streaming protocols such as HLS and DASH. 典型的体系结构是将您的实时流发送到流媒体服务器,然后使用HLS和DASH等流媒体协议,将流量提升到其他设备。

So the client devices connect to the server rather than to your browser. 因此客户端设备连接到服务器而不是浏览器。

This allows the video to be encoded and packaged to reach as many devices as possible with the server doing any transcoding necessary and potentially also creating different bit rate versions of your stream to allow for different network conditions, if you want to provide this level of service. 这允许对视频进行编码和打包,以便尽可能多地访问设备,服务器必须进行任何转码,并且如果您想提供此级别的服务,还可能创建流的不同比特率版本以允许不同的网络条件。

The typical structure is encoded stream (egh264 video), packaged into a container (eg mp4 fragmented) and delivered via a streaming protocol such as HLS or DASH. 典型的结构是编码流(egh264视频),打包到容器(例如,mp4碎片)中并通过诸如HLS或DASH的流传输协议传送。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM