Live streaming dash content using mp4box

前端 未结 2 1520
醉酒成梦
醉酒成梦 2020-12-01 04:16

I\'m trying to live stream H.264 content to HTML5 using the media source extensions API.

The following method works pretty well:

相关标签:
2条回答
  • 2020-12-01 04:37

    As far as I understand your solution you are not streaming but progressively downloading a single MP4 file. Am I understanding that correctly?

    I recently started the RTP2DASH project to do real DASH live streaming from a RTP datasource. It is still very 'alpha' but it should be easily adoptable for simple usecases.

    0 讨论(0)
  • 2020-12-01 04:43

    You don't need MP4Box to generate the required output, but you'll need to chunk the content yourself looking for boxes in the generated file.

    Basically you'll generate an fMP4 with H264, and send to the browser the moov box for initialization and the moof+mdat boxes for each fragment of MP4 that you generate. You'll have to code the player in JavaScript, you probably won't be able to use a standard DASH player.

    To generate the correct fragmented MP4, you need to pass this to ffmpeg: -movflags empty_moov+omit_tfhd_offset+frag_keyframe+default_base_moof.

    Be sure to use the latest version available.

    0 讨论(0)
提交回复
热议问题