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.93k stars 1.52k forks source link

How find output stream url? #329

Open ahvahsky2008 opened 4 years ago

ahvahsky2008 commented 4 years ago

I publish stream to nms. url rtmp://xxx.xxx.71.176/live/1 works in vlc, but i want find m3u8 file.

I try http://xxx.xxx.71.176:8080/live/1.m3u8
http://xxx.xxx.71.176:8080/live/1/index.m3u8
http://xxx.xxx.71.176:8080/live/index.m3u8

How find m3u8 url? ....

avconv -i "http://mxyq3nbe.megatv.fun/iptv/HWD48CGKXYZ83B/604/index.m3u8" -f flv rtmp://localhost/live

const NodeMediaServer = require('node-media-server');

const config = {
  rtmp: {
    port: 1935,
    chunk_size: 60000,
    gop_cache: true,
    ping: 30,
    ping_timeout: 60
  },
   https: {
    port: 443,
    key:'/etc/letsencrypt/live/onarmtv.com/privkey.pem',
    cert:'/etc/letsencrypt/live/onarmtv.com/fullchain.pem',
  },
  http: {
    port: 8000,
    mediaroot: './media',
    webroot: './public',
    allow_origin: '*'

  }, trans: {
    ffmpeg: '/usr/bin/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]'
      }
    ],
  }

};

var nms = new NodeMediaServer(config)
nms.run();
Torplucs commented 4 years ago

The port you've tried is not the same that's set in the config