Skip to content

A docker image for video live streaming and live recording.

License

Notifications You must be signed in to change notification settings

ele-dev/rtmp-hls-server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RTMP-HLS-Server Docker

Docker image for video streaming server that supports RTMP and HLS and streams.

Description

This Docker image can be used to create a video streaming server that supports RTMP Ingest and HLS delivery out of the box. It also allows live recording and transmuxing to mp4 format of video streams. All modules are built from source on Debian and Alpine Linux base images.

Features

  • The backend is Nginx with nginx-rtmp-module.
  • FFmpeg for live recording and transmuxing
  • Default settings:
    • RTMP is ON
    • HLS is ON
  • Statistic page of RTMP streams at http://<server ip>:<server port>/stats.

Current Image is built using:

  • Nginx 1.21.3 (compiled from source)
  • Nginx-rtmp-module 1.2.2 (compiled from source)
  • FFmpeg 4.4 (compiled from source)

This image was inspired by similar docker images from tiangolo and alfg. It has small build size, adds support for HTTP-based streams and adaptive streaming using FFmpeg.

Usage

To run the server

docker run -d -p 1935:1935 -p 8082:8082 -e PUID=$UID -e PGID=0 eledev/stream-ingest:latest

For more examples, see the Wiki


To stream to the server

  • Stream live RTMP content to:

rtmp://<server ip>:1935/live/<stream_key>

where <stream_key> is any stream key you specify.

  • Configure OBS to stream content:
    Go to Settings > Stream, choose the following settings:
    • Service: Custom Streaming Server.
    • Server: rtmp://<server ip>:1935/live.
    • StreamKey: anything (but test is the default)

To view the stream

  • Using VLC:

    • Go to Media > Open Network Stream.
    • Enter the streaming URL: rtmp://<server ip>:1935/live/<stream-key> Replace <server ip> with the IP of where the server is running, and <stream-key> with the stream key you used when setting up the stream.
    • For HLS the URLs are of the forms: http://<server ip>:8082/hls/<stream-key>.m3u8
    • Click Play.

Copyright

Released under MIT license.

More info

About

A docker image for video live streaming and live recording.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 50.1%
  • Shell 49.9%