TareqAlqutami/rtmp-hls-server

How do i use it with an .mp4 file as input?

dungeon2567 opened this issue · 4 comments

How do i use it with an .mp4 file as input?

This isnt perticilarly the intended use for this container, but it is possible.

From the command line, assuming you're on linux and have FFMPEG installed:
ffmpeg -re -i YourFile.mp4 -codec copy -f flv rtmp://<server_ip>:1935/live/test

If you then open up one of the players (http://<server_ip>:8080/players/hls_hlsjs.html) you should see the MP4 file you specified playing. If you modify the nginx.conf file to forward the stream to other services (Twitch, Youtube, etc) you should see it playing there too.

Do u know any better way to do this?
is HLS good for this?
something like netflix with adaptative bitrate but not 'streaming'?

This server is intended to receive a live video stream from something like OBS which can then be played back locally though the build in players, or pushed on to other services like youtube or twitch.

It seems like you're looking for a VOD (Video on Demand) solution?
Something like this: https://hub.docker.com/r/gdomod/nginx-vod-live-hls

Thanks, i will try it