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

后端 未结 4 1883
南方客
南方客 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:50

    Another user has had some luck with:

    ffmpeg ... \
      -f mp4 \
      -reset_timestamps 1 \
      -movflags empty_moov+default_base_moof+frag_keyframe \
      -probesize 200000
    

    Please see see galbarm's questions at:

    • Live streaming dash content using mp4box
    • Flush & Latency Issue with Fragmented MP4 Creation in FFMPEG

    Note: If you don't have keyframes on the input video, you may need to set:

    -frag_duration 100000
    

    ... instead of +frag_keyframe.

提交回复
热议问题