Encoding FFMPEG to MPEG-DASH – or WebM with Keyframe Clusters – for MediaSource API

后端 未结 4 1858
南方客
南方客 2020-12-07 23:10

I\'m currently sending a video stream to Chrome, to play via the MediaSource API.

As I understand it, MediaSource only supports MP4 files encoded with MPEG-DASH, or

4条回答
  •  再見小時候
    2020-12-07 23:47

    I ran into the same situation when trying to play recorded .webm file by MediaRecorder API back using Media Source Extensions (MSE). Chrome (51) recordings are malformed, Firefox (46) seems OK.

    To get it working you have to fix cues in .webm file:

    1. clone https://github.com/webmproject/libwebm
    2. make sure you have cmake version >= 3.2 (https://askubuntu.com/questions/610291/how-to-install-cmake-3-2-on-ubuntu-14-04)
    3. cmake .
    4. make
    5. ./sample_muxer -i original.webm -o fixed.webm
    6. load fixed.webm into DASH / your own player!

    Hope it helped someone. It was quite difficult to google any information without the DASH keyword (i am not using DASH, only the same underlying technology - MSE) :)

提交回复
热议问题