What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
To relay a live encoder feed through an Ubuntu server to YouTube, install NGINX with the community nginx-rtmp-module, configure an RTMP application, and have NGINX forward that application to the RTMPS URL and stream key for your YouTube broadcast. The module is third-party: the ordinary Ubuntu NGINX package does not necessarily include it. This guide explains the Open Source source-build route and keeps the encoder-to-server connection separate from the server-to-YouTube connection.
Choose the right NGINX RTMP installation route
There are two distinct routes, depending on which NGINX product you run:
| Route | How the module is obtained | When it fits |
|---|---|---|
| NGINX Open Source | Build NGINX with the community nginx-rtmp-module, either statically or, if supported, as a compatible dynamic module. See the module README and NGINX Open Source installation documentation. |
You want the community module and can manage a source build that matches the NGINX binary you will run. |
| NGINX Plus | NGINX documents an RTMP module package for its commercial product, nginx-plus-module-rtmp. See NGINX Plus RTMP module instructions. |
You already operate NGINX Plus and want to follow its package-based module workflow. |
These are not interchangeable instructions. The community project README documents building from NGINX source with ./configure --add-module=/path/to/nginx-rtmp-module, followed by make and make install. NGINX also documents the dynamic-build option, --add-dynamic-module=<PATH>, when the module supports it. A dynamic module must be compatible with the NGINX binary that loads it. NGINX cautions that third-party module stability is not guaranteed.
The concrete commands below are a source-build outline for Ubuntu, not a release-pinned or end-to-end tested recipe. The available documentation does not establish a tested package and version matrix for every supported Ubuntu release. Confirm the Ubuntu release, NGINX version, module revision, dependencies, and installation paths for your host before building. Do not install an unrelated prebuilt NGINX binary and expect it to load a module compiled against a different build.
#1 Best Overall
- 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.
Build Open Source NGINX with the RTMP module
1. Prepare the Ubuntu host and build dependencies
Use an Ubuntu server you administer; an existing suitable host may work, or you may provision an Ubuntu VPS if the relay needs a public, always-on address. The module project’s older getting-started guide lists build utilities including build-essential, PCRE development files, SSL development files, Git, and zlib development files. That guide was last modified on 2020-03-23, so use it as historical guidance and verify the correct package names for your Ubuntu release in the getting-started guide and current Ubuntu package sources.
Install the verified dependencies for your release, then obtain the NGINX source and module source. Choose and record explicit versions or revisions rather than treating the module repository’s moving master branch as a version pin. The module README’s build pattern is:
Rank #2
- 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.
./configure --add-module=/path/to/nginx-rtmp-module
make
make install
Run the configuration command from the NGINX source directory, replacing the module path with the actual local path. Preserve any configure options required by your deployment. If you choose a dynamic build, use --add-dynamic-module=<PATH> only when supported by the module and build, then configure NGINX to load the resulting module from its actual installed path.
2. Verify which NGINX binary and configuration will be used
After installation, identify the NGINX executable and configuration file used by your service manager. Source installations can use paths different from Ubuntu’s packaged NGINX. Do not assume that a system service, command-line nginx, and the binary you just built all refer to the same installation. If the module is dynamic, its load_module directive belongs in the main configuration context, before the events and HTTP blocks.
Rank #3
- 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.
3. Add an RTMP application and YouTube relay target
NGINX RTMP uses a local publishing address in the form rtmp://host/app/name. The app segment must match an application {} block in the NGINX configuration. In this example, the encoder publishes to the Ubuntu server’s live application; NGINX forwards that incoming feed to YouTube. Replace the destination placeholders with the RTMPS URL and stream key from the specific YouTube stream.
rtmp {
server {
listen 1935;
chunk_size 4096;
application live {
live on;
record off;
push rtmps://YOUR_YOUTUBE_RTMPS_HOST/YOUR_YOUTUBE_PATH;
push_reconnect 5s;
name YOUR_YOUTUBE_STREAM_KEY;
}
}
}
Configuration details can vary with module version and deployment. In particular, do not assume the example’s placeholder URL shape or directives are a universal YouTube endpoint recipe: retrieve the current destination shown for your stream and consult the module’s documentation for directive behavior. Keep the stream key secret. Avoid committing a real key to public source control or sharing it in screenshots, logs, or support requests; restrict access to the configuration file and rotate the key in YouTube if it is exposed.
Rank #4
- 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
The local encoder leg and the outbound YouTube leg are separate. The encoder uses an ordinary RTMP URL pointing at your Ubuntu host, such as rtmp://YOUR_SERVER_ADDRESS/live, plus a stream name/key value understood by your application and client. NGINX then uses the YouTube-specific RTMPS destination and key. The server must be reachable from the encoder on the configured inbound RTMP port, and allowed to make the outbound connection to YouTube.
Get the correct YouTube RTMPS URL and stream key
- Open YouTube Studio and go to the Live Control Room for the broadcast you intend to test.
- In that stream’s Stream settings, reveal or copy the RTMPS URL using the lock control, then copy the stream key associated with that stream. YouTube’s RTMPS guidance says RTMPS is RTMP over TLS/SSL and explains how to obtain the stream details.
- Use those values for the NGINX-to-YouTube outbound connection. Do not copy a URL or key from a different broadcast, and do not publish either value in your article, configuration repository, or public troubleshooting output.
YouTube describes RTMPS as “a secure extension to the popular RTMP streaming video protocol.” If YouTube reports an SSL error, first check that the destination scheme is rtmps. Its troubleshooting guidance says trying port 443 may help in some SSL-error cases; use the endpoint details YouTube currently provides for your stream rather than assuming one universal URL.
Best Value
- 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.
Test the relay with an encoder
Validate before reloading
Test the configuration using the exact NGINX binary and configuration path that your service will run. NGINX documents nginx -t as the configuration test; for a non-default installation, specify its configuration file with the appropriate -c path. Correct any reported syntax or module-loading error before reloading or restarting the service. A successful syntax check does not prove that the network path or YouTube authentication works.
Publish from OBS or FFmpeg
For OBS, choose a custom streaming server and enter the Ubuntu server’s RTMP address and the stream name/key expected by the configured application. The module’s getting-started guide describes this style of OBS setup. For FFmpeg, the same guide shows publishing a local source to an RTMP address; adapt its example to your input and server rather than assuming a particular camera, file, or encoder configuration is suitable.
Start with a private or unlisted YouTube broadcast. Check YouTube’s live preview for an incoming signal, then confirm playback before making the stream public. If YouTube does not receive video, inspect the NGINX error log and service logs as well as the encoder’s connection status. The source guide’s example workflows are instructional, not evidence that a particular command or full relay has been tested on your Ubuntu release.
Network, security, and YouTube checks
- Inbound encoder connection: allow the encoder to reach the Ubuntu server on the RTMP listener port you configured. Limit exposure with firewall rules to the sources that need to publish where practical.
- Outbound YouTube connection: allow the server to reach the YouTube RTMPS endpoint. Diagnose this separately from the encoder’s connection to NGINX.
- Stream key: treat it as a credential. Store it with restricted permissions and rotate it if it is disclosed.
- Copyright and rights: use only material you have permission to stream. A relay does not grant rights to music, documentary footage, or other third-party content, and YouTube may restrict a broadcast when content violates its rules.
- Reused content and monetization: eligibility and monetization decisions are separate from whether the RTMP relay connects. Replaying or relaying content does not guarantee monetization or audience reach; follow YouTube’s current channel and content policies.
- Optional features: the module also documents capabilities such as HLS, DASH, recording, and FFmpeg integration. They are not prerequisites for the basic incoming-RTMP-to-YouTube relay described here.
Troubleshoot common failures
| Symptom | Likely area to check | What to do |
|---|---|---|
NGINX reports an unknown rtmp directive |
The running binary does not include or load the RTMP module, or a different NGINX binary/configuration is active. | Confirm the executable and configuration path. Rebuild with the community module or load a compatible dynamic module before using RTMP directives. |
| Encoder cannot connect to the Ubuntu server | Wrong local RTMP address or application name, listener not active, firewall, routing, or network reachability. | Check that the URL’s application segment matches the configured application block; verify the listener and inbound network rules. |
| Encoder connects, but YouTube shows no incoming stream | Outbound destination, stream key, or server-to-YouTube connectivity. | Check NGINX logs, confirm the RTMPS URL and key were copied from the same YouTube stream, and test outbound access separately from the encoder connection. |
| YouTube reports an SSL error | Incorrect protocol scheme or TLS connection issue. | Verify the endpoint uses rtmps. YouTube says port 443 may help in some cases; use its current stream settings and troubleshoot the server’s outbound TLS/network path. |
| Configuration test fails after adding a dynamic module | Module path, load order, or binary/module compatibility. | Check that the file exists at the configured path, that load_module appears in the main context, and that the module was built for the NGINX binary being run. |
| Stream key is exposed | Credential handling. | Remove the secret from public locations and rotate the stream key in YouTube before using the stream again. |
Or let it run in the cloud
For a YouTube channel that needs prerecorded videos to loop continuously, StreamNeo is a separate cloud option: upload a recording or build a playlist, add your YouTube stream key once, and go live. Nothing has to stay on at home; StreamNeo streams uploaded video to YouTube only, not from a live camera. The video streams as uploaded, at any quality up to 4K 60fps for one flat price per slot, with automatic recovery if YouTube drops the stream. The first day is free with no card. Monthly billing is $9.99 per month.
Learn about StreamNeo, or start the free first day.
Quick Recap
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.




