Skip to content

Plays RTMP streams on the web browser using supported HTTP-FLV

Notifications You must be signed in to change notification settings

Deep-Jiwan/rtmp2flv

Repository files navigation

A node js app that listens for an rtmp stream and then publishes on a webpage using supported HTTP-FLV, i think..

  • Low latency
  • Low spec
  • Docker friendly
  • Easy to setup and use

Configuration:

HOST_IP=ip_address of the server

Streaming Settings = {

'server' : rtmp://SERVER_IP/live,
'streamkey' : livestream

}

Usage:

Local Dev:

  1. Clone the repo git clone https://github.com/Deep-Jiwan/rtmp2flv.git
  2. Duplicate the .env.template file and rename it to '.env'
  3. Configure the .env file by specifying the IP address of the server (avoid using localhost or loopback ip 127.0.0.1. See FAQ)
  4. Having node js installed on your device, open a new terminal in the folder and run npm install
  5. Run in terminal node server.js
  6. Stream using RTMP to the server.
    Stream Server: rtmp://server_ip/live
    Stream key: livestream
  7. Start streaming and watch the same on web browser at SERVER_IP:80
  8. The FLV stream is also available at: http://SERVER_IP:8000/live/livestream.flv. It can be viewed in any popular video player and mixing software as a network stream. (VLC, VMIX, OBS)

Docker Deployement:

  1. Run the command docker pull ghcr.io/deep-jiwan/rtmp2flv:beta
  2. Run the docker container with the following port and environment variable docker run -d -p 1935:1935 -p 80:80 -p 8000:8000 -e HOST_IP=ip_address ghcr.io/deep-jiwan/rtmp2flv:beta
    Replace 'ip_address' with the IP Address of the server / app hosting machine
  3. Stream using RTMP to the server.
    Stream Server: rtmp://server_ip/live
    Stream key: livestream
  4. Start streaming and watch the same on web browser at SERVER_IP:80
  5. The FLV stream is also available at: http://SERVER_IP:8000/live/livestream.flv. It can be viewed in any popular video player and mixing software as a network stream. (VLC, VMIX, OBS)

Good Luck!

Terms Clarification:

  • Host IP is the IP address of the server that is hosting the application.
  • Server ip is the same as Host IP

FAQ:

  1. I cant view the stream on other devices on the network.
    • You may have set the environment variable HOST_IP as localhost or 127.0.0.1.
      Replace it with the manual ip address of the server

About

Plays RTMP streams on the web browser using supported HTTP-FLV

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages