Node-Media-Server icon indicating copy to clipboard operation
Node-Media-Server copied to clipboard

How access HLS streaming source?

Open thedarkknight197 opened this issue 3 years ago • 4 comments

I am using server running on port 80, but if i try to access to: http://localhost/live/STREAM_NAME/index.m3u8 also from browser it return to me 404 not found.

What is the problem?

thedarkknight197 avatar Sep 29 '22 15:09 thedarkknight197

@thedarkknight197 AFAIK there is no desktop browser support for HLS other than on Safari because HLS was developed by Apple Inc. back in 2009. So, the usual common browsers like desktop Chrome and desktop Firefox will not have support for the HLS protocol. But mobile Chrome does have support for HLS. You can check the exact browser compatibilities here. If you wish to test it out with your mobile, you would have to make sure that localhost is replaced with the local IP address that is assigned to your computer that is currently running the node-media-server. I hope this cleared any doubts you may have.

KyalSinLinLett avatar Sep 29 '22 20:09 KyalSinLinLett

You can play HLS stream using hls.js on any non safari browser.

  • https://github.com/video-dev/hls.js

hthetiot avatar Sep 30 '22 09:09 hthetiot

@thedarkknight197 I just ran into this myself, and I realized I was missing transcoding settings: https://github.com/illuspas/Node-Media-Server#remux-to-rtmphlsdash-live-stream-with-audio-transcode -- I don't think you would receive a 404 unless the HLS file was absent from the filesystem ./media/live/STREAM_NAME/

eric-eye avatar Oct 12 '22 22:10 eric-eye

There is video.js too to play HLS:

  • https://github.com/videojs/video.js You should be able to download the HLS from the server just by inserting the URL inside your browser (basically as @outdatedpizzatech said). If you want to see the video in your localhost env, you can use VLC-> Open Network Stream (here you need to insert the link to the master playlist).

lonasozo avatar Oct 19 '22 08:10 lonasozo