illuspas / Node-Media-Server

A Node.js implementation of RTMP/HTTP-FLV/WS-FLV/HLS/DASH/MP4 Media Server
https://www.npmjs.com/package/node-media-server
MIT License
5.97k stars 1.52k forks source link

no hls or dash streaming #239

Open bakamaru opened 5 years ago

bakamaru commented 5 years ago

I tried to look around and find solution but seems to be fake or buggy on source. I didn't find any solution to stream with hls or dash though flv stream working as well.

wnpllrzodiac commented 5 years ago

RTMP http-flv stream is o.k. But hls and dash HTTP error 404 I used docker run server.

wnpllrzodiac commented 5 years ago

I fix the problem. Need to config trans block as follows:

trans: {
    ffmpeg: '/YOUR/FFMPEG/BIN/PATH/ffmpeg',
    tasks: [
      {
        app: 'live',
        hls: true,
        hlsFlags: '[hls_time=2:hls_list_size=3:hls_flags=delete_segments]',
        dash: true,
        dashFlags: '[f=dash:window_size=3:extra_window_size=5]'
      }
    ]
  },