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.89k stars 1.51k forks source link

Empty directories on windows #580

Open steveyout opened 1 year ago

steveyout commented 1 year ago

i cant access hls stream on windows.The directories are being created but are empty and no files.Here is my congig

const config = {
  logType: 3,
  rtmp: {
    port: Env.get('RTMP_PORT', 1935),
    chunk_size: Env.get('RTMP_CHUNK_SIZE', 60000),
    gop_cache: true,
    ping: Env.get('RTMP_PING', 30),
    ping_timeout: Env.get('RTMP_PING_TIMEOUT', 60),
  },
  http: {
    port: Env.get('RTMP_HTTP_PORT', 8000),
    mediaroot: Application.tmpPath(`media`),
    allow_origin: '*',
  },
  trans: {
    ffmpeg: 'C:\\ProgramData\\chocolatey\\bin\\ffmpeg.exe',
    tasks: [
      {
        app: 'live',
        hls: true,
        hlsFlags: '[hls_time=2:hls_list_size=3:hls_flags=delete_segments]',
        hlsKeep: true, // to prevent hls file delete after end the stream
        dash: true,
        dashFlags: '[f=dash:window_size=3:extra_window_size=5]',
        dashKeep: true, // to prevent dash file delete after end the stream
      },
    ],
  },
};