Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to play the .m3u8 stream in vlc #598

Open
irtaza9 opened this issue Aug 3, 2023 · 3 comments
Open

Unable to play the .m3u8 stream in vlc #598

irtaza9 opened this issue Aug 3, 2023 · 3 comments

Comments

@irtaza9
Copy link

irtaza9 commented Aug 3, 2023

I want to play the .m3u8 stream in vlc but it is not working, I am getting 404 in the browser when I put the link in react-player.

What I am doing.

  • Configuration
const NodeMediaServer = require("node-media-server");

const config = {
  logType: 3,
  rtmp: {
    port: 1935,
    chunk_size: 60000,
    gop_cache: true,
    ping: 30,
    ping_timeout: 60,
  },
  http: {
    port: 8000,
    mediaroot: "./media",
    allow_origin: "*",
  },
  trans: {
    ffmpeg: "./ffmpeg.exe",
    tasks: [
      {
        app: "live",
        vc: "copy",
        vcParam: [],
        ac: "aac",
        acParam: ["-ab", "64k", "-ac", "1", "-ar", "44100"],
        rtmp: true,
        rtmpApp: "live2",
        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]",
      },
    ],
  },
};

const nms = new NodeMediaServer(config);
nms.run();
  • Stream Source
    I am pulling rtsp stream using ffmpeg from my IP camera below is the command I am using:
ffmpeg -rtsp_transport tcp -i rtsp://myuser:myuserpassword@camera_ip -c copy -f flv rtmp://localhost/live/stream

Output from NMS:

8/3/2023 19:42:54 34444 [INFO] Node Media Server v2.6.2
8/3/2023 19:42:54 34444 [INFO] Node Media Rtmp Server started on port: 1935
8/3/2023 19:42:54 34444 [INFO] Node Media Http Server started on port: 8000
8/3/2023 19:42:54 34444 [INFO] Node Media WebSocket Server started on port: 8000       
8/3/2023 19:42:54 34444 [INFO] Node Media Trans Server started for apps: [ live ] , MediaRoot: ./media, ffmpeg version: 2023-07-19-git-efa6cec759-full_build-www.gyan.dev
8/3/2023 16:48:15 21940 [INFO] [rtmp connect] id=M81TQEAS ip=::1 app=live args={"app":"live","type":"nonprivate","flashVer":"FMLE/3.0 (compatible; Lavf60.10.100)","tcUrl":"rtmp://localhost:1935/live"}

What is current playing

  • rtmp (rtmp://localhost:1935/live/stream)
  • .flv (http://localhost:8000/live/stream.flv)

What is my goal?

I want to play .m3u8 stream same as .flv is playing on all platforms

@amsyary
Copy link

amsyary commented Sep 13, 2023

any update?, i try to play video using ffmeg but it doesn't play using hls

@HMT2002
Copy link

HMT2002 commented Oct 11, 2023

Same with the DASH and .flv, only the RTMP stream works. My solution is use different package for HLS and DASH, haven't work with .flv yet.

@inertia666
Copy link

inertia666 commented Oct 14, 2023

Only RTMP and FLV streams work for me. HLS or Dash doesn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants