t-mullen / hls-server

Middleware for serving HTTP Live Streaming (HLS) compatible media streams.
MIT License
251 stars 55 forks source link

live streaming #14

Open tomer953 opened 3 years ago

tomer953 commented 3 years ago

Sorry for asking this, but I can't figure it out.

I am a web developer and I have a the following need: my website is related to a big event, this event finals is pre-recorded into mp4 video. (lets say 1hr long) on a specific time, I want users to see a video player inside the website, they should see the exact same moment.. (live stream of the mp4 video, same as you see if you watch youtube live event)

But, I can't connect all the puzzle pieces I need. I configured the hls-server, converted the mp4 file with the ffmpeg, and I am able to watch the video from Edge video player. The result - its not live. actually is the same as skipping this solution, and just serving the mp4 as is (confused...)

I looked into in-memory and rtmp, but not sure how it is going to help? should I create rtmp server? (also looked into it, and did not understand how to publish my mp4 to the rtmp-server) as you know, rtmp does not supported in web-browser, so should I only use it to serve live media to the hls-server which just convert the stream to hls, and then serve it again?

It seems like a very simple requirement of playing video inside web, is going to be so complicated :O

Huge thanks.

Saentist commented 3 years ago

There is no HLS solution for LIVE strreaming. In mean all streams from Live stream converted to HLS are delayed in size of chunks used in playlist, near 5-15 seconds delay.

tomer953 commented 3 years ago

ok thanks, so what is the common way to solve my problem? I don't care about minor delay, I just want clients to view the video in my website, and I don't want them to be able to "skip to the end", meaning I want them all to finish the watching in the same time...

I know I can disable the "controls" on the client-side, but this means that a technical user can view the page source and just get the link to the full .mp4 file therefore Im searching the "streaming" solution instead

Saentist commented 3 years ago

Thats a player job to do. to rewind reward you need to index stream and long chunklist. https://github.com/streamingriver/video-stream-recorder about soucecode there is a good ticket/hotlinking protection invited long time ago