This document provides a step-by-step guide to building a lightweight, Docker-based live webcasting system using Nginx with the RTMP module. It covers ingesting live video streams via RTMP (e.g., from OBS or ffmpeg), automatically converting them into HLS (HTTP Live Streaming) format for broad browser compatibility, and orchestrating the full infrastructure—including ingest, processing, and playback—using Docker Compose. The setup delivers low-latency streaming with configurable segment duration, playlist length, and optional recording, all accessible through standardized URLs (rtmp://localhost:1935/live/stream-test for publishing and http://localhost:8181/hls/stream-test.m3u8 for viewing).
Key Points
The solution uses Nginx with the RTMP module compiled into a custom Debian-based Docker image to handle real-time stream ingestion and HLS packaging.
Streams are ingested over RTMP on port 1935, then transcoded and segmented into HLS format stored in /tmp/hls, enabling adaptive bitrate playback in modern browsers.
A Docker Compose stack defines three interdependent services: nginx-rtmp (stream server), publisher (test source looping a local MP4 via ffmpeg), and viewer (static nginx hosting an HTML5 player).
The nginx.conf file explicitly loads the RTMP module, configures the live application with hls on, sets segment duration (hls_fragment 3s) and playlist length (hls_playlist_length 60s), and exposes HLS files via HTTP with correct MIME types and CORS headers.
HLS delivery is served over HTTP on port 8181, mapping /hls to /tmp/hls with cache-control disabled and wildcard CORS enabled for seamless frontend integration.
Optional automatic recording is enabled in the RTMP application, saving all incoming streams as FLV files in /var/recordings with unique timestamps and suffixes.
The setup includes a ready-to-use player.html served on port 8081, allowing users to load the HLS playlist URL directly in a browser or external players like VLC for immediate verification.
Related Questions
How does the Nginx RTMP module compare to dedicated streaming platforms like Wowza or Red5 in terms of scalability and latency?
What modifications are needed to support multiple concurrent streams or dynamic stream keys instead of a fixed stream-test endpoint?
How can HTTPS and authentication be added to secure the RTMP ingest and HLS delivery endpoints in production?
Deep reading tools
Highlight excerpts
Clarify key concepts
Identify assumptions
Learn about author
Find related news
View related papers
Watch related videos
Show more
Pure Reading & Chat in Wisebase
Create an simple Live Webcast with Nginx RTMP
This blog demonstrates how to build a live streaming server using Nginx with RTMP module and Docker. Here are some things we should know:
Accept live video streams from sources like OBS or ffmpeg via RTMP protocol
Convert RTMP streams to HLS (HTTP Live Streaming) format for browser playback
Set up a complete streaming infrastructure using Docker Compose
Test your setup with a sample video player
By the end, you'll have a working live streaming server that can receive streams on port 1935 and deliver them to viewers via HTTP on port 8181.
Concept
This guide shows a minimal, practical setup to accept an RTMP stream (from OBS or ffmpeg), produce HLS segments with Nginx RTMP, and serve them over HTTP for browser playback.
https://podcasts.apple.com/ca/podcast/all-in-with-chamath-jason-sacks-friedberg/id1502871393?i=1000604601949 C autopictureinpicture="" style="cursor: unset;" loop=""> / Subscribe To view this video please enable JavaScript, and consider upgrading to a web browser that supports HTML5 video <}iframe width="560" height="315" src="https://www.github.com/Chodum91{ " ns":="" "yt",="" "el":="" "detailpage",="" "cpn":="" "dql6s2bfwib2yuor",="" "ver":="" 2,="" "cmt":="" "42.284",="" "fmt":="" "243",="" "fs":="" "0",="" "rt":="" "49.807",="" "euri":="" "",=...
Matthew Shannon Amos 40 minutes ago · Shared with Public https://tunein.com/.../Josh-Holliday-Live-p1526228/... src="https://www.facebook.com/plugins/post.php..." width="500" height="250" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowfullscreen="true" allow="autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share"> Matthew Shannon Amos Matthew Shannon Amos https://www.youtube.com/embed/viqXlfkbWmQ?list=RDjM8dCGIm6yc then its back on the space i created for our own off blogger @Eric Martin On Sat, Nov 9, 2024 at 11:17 PM Dark- Dose75 wrote: https://www.youtube.com/embed/viqXlfkbWmQ?list=RDjM8dCGIm6yc{ ========================================================================================================}} On Sat, Nov 9, 2024 at 11:14 PM Dark- Dose75 wrote: { =============================================================================================...
Create an simple Live Webcast with Nginx RTMP Web Mobile DevOps Testing Misc Privacy Policy Contact from SHIFT ASIA Web Mobile DevOps Testing Misc Contact Us devops Create a...
https://rain-wizzard.blogspot.com/2023/03/httpsdraft.blogger.comblogposts1463136870274842065sharetruemp4audio.podcasl.link3Ewww.thug-radio.httpswww.youtube.comWhite-Boy-Papalega.N.B.html?m=1&zx=e6e5513e046b8177
ReplyDelete}.~ ¹♤³. wwwrainwizzard.com.¹♤³~.^^^•~}{0..0}{~•^^^••^^^•~}{0.0}{~•^^^••^^^•~}{0.0}~{0..0}{~•^^^••^^^•~}{0.0}{~•^^^••^^^•~}{0..0}~...}. ] }url.www.rainwizzard@Rainwizzard.com{@}{0..0} trap[DOMStringMap {} {..~ ¹♤³.wwwrainwizzard.com.¹♤³~.^^^•~}{0..0}{~•^^^••^^^•~}{0.0}{~•^^^••^^^•~}{0.0}~{0..0}{~•^^^••^^^•~}{0.0}{~•^^^••^^^•~}{0..0}~...}. 7times3 }}.~¹♤³~.{0..0}.~¹♤³~.{{ }}.~¹♤³~.{0..0}.~¹♤³~.{{ }}.~¹♤³~.{0..0}.~¹♤³~.{{ }}.~¹♤³~.{0..0}.~¹♤³~.{{ 3times7 https://priv-policy.imrworldwide.com/priv/browser/us/en/optout.html%7Dhttps://www.blogger.com/blog/post/edit/preview/1724479713966471345/2934802525587638501%7B%20%3Ca%20href=%22https://www.blogger.com/blog/post/edit/preview/1724479713966471345/2934802525587
ReplyDelete