October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
DocumentaryTube
24/7 streaming

How to Set Up NGINX RTMP for a 24/7 YouTube Playlist

A practical guide to the third-party arut NGINX RTMP module, FFmpeg playlist sending, YouTube ingest settings, stream testing, recovery, and archive planning.

By DocumentaryTube Team 7 min read
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You can run a continuous YouTube playlist with FFmpeg sending video to an NGINX RTMP relay, which forwards it to YouTube Live. NGINX is optional: an encoder can also send directly to YouTube. The setup below uses the separate third-party arut/nginx-rtmp-module, not NGINX Plus’s packaged dynamic module. Your exact installation and playlist command depend on your operating system, NGINX build, FFmpeg version, and media files, so validate those parts on the machine you will run.

Choose how the stream will reach YouTube

The components have separate jobs: FFmpeg reads and sends the playlist; YouTube provides the ingest URL and stream key; NGINX can accept FFmpeg’s RTMP feed and relay it onward. You do not need NGINX just to stream to YouTube.

Design What happens When it fits
FFmpeg directly to YouTube FFmpeg reads the media and publishes to YouTube’s ingest URL with the stream key. Use this when you do not need an intermediary.
FFmpeg → NGINX RTMP → YouTube FFmpeg publishes to an RTMP application on your NGINX host; the RTMP module relays the feed to YouTube. Use this when you specifically need an RTMP relay stage or want to separate the local encoder endpoint from the destination.

The relay does not make a computer-based FFmpeg sender self-healing or eliminate the need to monitor it. If you need an always-on YouTube stream without keeping a computer or server running at home, see StreamNeo after the setup guide.

Pick the NGINX RTMP implementation

Third-party arut module used in this guide

arut/nginx-rtmp-module is a third-party project, separate from NGINX’s commercial module packaging. Confirm that its source, your NGINX version, operating system, and build method are compatible before installing. Its project README and directive reference describe the module and RTMP application directives.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

NGINX Plus is a different installation path

NGINX’s RTMP dynamic-module guide documents the NGINX Plus route: install the package for the supported platform, load ngx_rtmp_module.so, test the configuration with nginx -t, and reload NGINX. Those package instructions are for NGINX Plus; do not assume they install the third-party arut module or apply to every NGINX build. Check the NGINX technical specifications for platform and version compatibility.

Install and configure the RTMP relay

Install a compatible build

  1. Choose the module implementation and confirm it supports your operating system and NGINX build.
  2. Install or build that implementation using its own documentation. Package names, build flags, and module paths vary; there is no universal installation command for all NGINX installations.
  3. For a dynamic module, load the module in the NGINX configuration using the path and syntax required by that build. For NGINX Plus, follow the official dynamic-module guide rather than copying its package steps to another edition.
  4. Restrict inbound RTMP access to the encoder host or trusted network with firewall rules. Do not expose an unauthenticated publishing endpoint to the public internet.

Add an RTMP application

For the arut module, a minimal relay application has the following shape. Place the rtmp block at the appropriate top level in the configuration for your build; do not paste it inside the HTTP server block. Replace the destination placeholder with the YouTube server URL and stream key from Live Control Room, and protect the resulting configuration because it contains a secret.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
rtmp {
    server {
        listen 1935;
        application ingest {
            live on;
            push rtmp://a.rtmp.youtube.com/live2/REPLACE_WITH_STREAM_KEY;
        }
    }
}

This is an example of the third-party module’s RTMP application pattern, not a universal NGINX configuration for all module implementations. Verify directive support and syntax against the documentation for the exact module and build you installed. The example uses RTMP for the outbound push; prefer YouTube’s RTMPS ingest URL when the selected module and configuration support it.

  1. Save the configuration and run nginx -t using the configuration file and binary for the NGINX instance you intend to run.
  2. If the test succeeds, reload that instance using its normal service manager or documented reload method. If it fails, inspect the reported file and line before reloading.
  3. Allow RTMP traffic to the relay only from the FFmpeg sender. Keep the relay’s publishing endpoint and YouTube key private.

Do not confuse this RTMP relay with NGINX’s separate HTTP HLS module. The NGINX HTTP HLS module serves HLS from MP4/MOV and is part of NGINX’s commercial subscription; it is not the RTMP module used in this guide.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Prepare the playlist and FFmpeg sender

There is no single playlist-loop command that is guaranteed to work for arbitrary media, FFmpeg builds, and timestamp or codec combinations. Validate the chosen loop or concat method with your installed FFmpeg version and representative files before relying on it for a long-running broadcast. Check file ordering, timestamps, codec compatibility, audio continuity, and how the sender behaves at the end of the playlist.

  1. Prepare the files in the intended order and test transitions, including the first-to-last loop boundary. Confirm that each file has the audio and video streams you expect.
  2. Decide whether the input can be stream-copied or must be transcoded. Copying avoids an encode step only when the inputs and output requirements are compatible; mixed codecs, frame rates, dimensions, timestamps, or audio formats may require normalization. CPU needs depend on the actual media and settings.
  3. Configure FFmpeg to publish to the NGINX host’s RTMP application, for example a destination shaped like rtmp://NGINX_HOST/ingest/STREAM_NAME. That is the local relay endpoint, not the YouTube key.
  4. Test the exact playlist command against the deployed FFmpeg build. Confirm the stream starts, loops in the right order, maintains continuous audio and video, and recovers as intended after an input or network interruption.

The module’s relay configuration sends the accepted feed to YouTube. In a direct-output design instead, configure FFmpeg’s output with YouTube’s ingest URL and key, not the local NGINX address.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2Ă— USB C male to USB A female adapters and 2Ă— USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Get YouTube’s ingest URL and key

  1. Open YouTube Studio and go to Live Control Room; create or select the live stream using YouTube’s encoder setup instructions.
  2. Copy the server URL and stream key shown for that stream. Enter them in the encoder or relay destination as appropriate. YouTube describes the key as a password/address that allows it to accept the feed; treat it as a secret, do not publish it, and reset it if it is exposed.
  3. Use YouTube’s RTMPS URL when your chosen encoder or relay supports it. YouTube recommends RTMPS, the encrypted extension of RTMP. If a component cannot connect over RTMPS, confirm its supported protocol and use an appropriate compatible configuration.

For the NGINX relay pattern above, the key appears in the NGINX push destination. Limit access to the configuration file and avoid placing the key in public logs, screenshots, shared scripts, or source control.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Set encoder settings and test before publishing

YouTube’s current general encoder guidance lists H.264, H.265/HEVC, and AV1; constant bitrate (CBR); and a recommended two-second keyframe interval that should not exceed four seconds. Its H.264 examples include these recommended bitrates:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Output YouTube-recommended H.264 bitrate
1080p at 30 fps 5 Mbps
720p at 60 fps 8 Mbps

These are YouTube’s recommendations, not a guarantee that a particular uplink can sustain the feed. Choose a bitrate and output your connection can maintain, and consult YouTube’s encoder settings and bitrate table for other resolutions and frame rates. For RTMPS details, see YouTube’s RTMPS guidance.

  1. Start with a representative section that includes moving video and audio; confirm the relay receives it and YouTube shows the expected preview.
  2. Use YouTube’s test workflow and check Live Control Room’s stream-health messages before making the stream public. YouTube’s live streaming tips recommend testing and monitoring stream quality.
  3. Watch for dropped frames, unstable bitrate, audio gaps, and errors at playlist transitions. Change one relevant setting at a time, then test again.
  4. Verify that the host can sustain the selected bitrate and that the FFmpeg process continues through the loop. Monitor both the local sender and the YouTube stream rather than assuming that a successful NGINX configuration means the full path is healthy.

Plan for failures and long-term operation

A 24/7 stream depends on the media sender, relay, network path, and YouTube ingest all remaining healthy. Decide how an operator will detect and restart a failed FFmpeg or NGINX process, and validate that recovery behavior on the chosen host and service manager. The exact supervision and restart implementation varies by deployment; a running NGINX process alone does not prove that FFmpeg is still sending or that YouTube is receiving a healthy feed.

  • Monitor process status, logs, YouTube stream-health messages, and whether local recording files continue to grow if you are recording.
  • Test recovery from a stopped sender, an interrupted network connection, and a restarted relay before treating the setup as unattended.
  • Keep a tested copy of the configuration and document how to replace a compromised YouTube key.
  • Monitor picture and sound quality over time, not only during initial setup. YouTube’s live tips advise testing and checking stream health and quality.

Choose an archive plan for a 24/7 stream

A continuous broadcast is not a dependable single YouTube archive. YouTube says streams under 12 hours can be automatically archived, but a stream exceeding 12 hours may not be captured at all. See YouTube’s archive guidance.

  • If retaining the full programme matters, arrange independent local recording and check that the recording is actually growing and playable.
  • Alternatively, divide programming into shorter live sessions and verify that each resulting archive is available and complete.
  • Do not assume that a 24/7 stream will yield one complete replay, even if the live broadcast remains online.

Or let it run in the cloud

If your goal is simply to keep uploaded videos looping on YouTube, StreamNeo is an alternative to operating your own FFmpeg sender and NGINX relay. Upload a recording or build a playlist, add your YouTube stream key once, and go live. StreamNeo loops the uploaded media from the cloud, so no computer or home connection has to stay on.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • One flat price per slot for any uploaded quality up to 4K 60fps, with no re-encode or quality tiers.
  • Automatic recovery if YouTube drops the stream.
  • The first day is free with no card. The monthly option is $9.99 per month.

Start your free StreamNeo day.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Screening Room

Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.