To stream from a Hetzner VPS to YouTube Live, give the VPS public internet connectivity, install FFmpeg for your operating system, create a YouTube live event, and send the event’s server URL and stream key from FFmpeg using YouTube’s recommended RTMPS endpoint. Choose video settings that match your source and the VPS’s tested capacity, then verify audio, motion, and stream health in YouTube Studio before relying on it.
This guide explains the setup and the decisions that matter. It does not prescribe a universal Hetzner server size or a copy-and-paste FFmpeg command: the right command depends on whether your input is a file, camera, capture device, or another stream, and the evidence available does not establish a suitable server plan for every workload.
What you need before starting
- A Hetzner Cloud server with a public route to the internet. Hetzner identifies a public Primary IP as the way to establish internet connectivity for a public-network server. A private-only server needs a separate routing arrangement. Hetzner Cloud server overview.
- Shell access to the VPS and an FFmpeg build that supports the input format and codecs you plan to use. Installation steps vary by operating system and FFmpeg build.
- A YouTube channel that can create or schedule a live event, with the event’s server URL and stream key.
- A defined video/audio source and an output target—resolution, frame rate, codecs, and bitrate—that the VPS can handle in real time.
Hetzner offers shared and dedicated CPU resource classes, but the available information does not identify a plan that is sufficient for every stream. Encoding load varies with the input, codec, resolution, frame rate, and encoder preset. Select a server based on the intended workload and validate it under that load rather than relying on a generic plan recommendation.
Set up the VPS network and firewall
The VPS sends media outbound to YouTube, so it needs working internet connectivity and enough sustained outbound capacity for the chosen bitrate. Hetzner’s Cloud API firewall documentation says that, when a firewall is attached, inbound traffic without a matching inbound rule is dropped, while outbound traffic is accepted when no outbound rule is set. Hetzner Cloud API: Firewalls.
#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.
Check both layers: the Hetzner Cloud firewall and any firewall configured inside the guest operating system. Keep only the inbound administration access you need, and do not open inbound ports for a standard outbound YouTube ingest unless your particular input or management design requires them. Confirm that outbound traffic to the YouTube endpoint is permitted.
Create a YouTube Live event and protect its key
- Open YouTube Studio and go to the Live Control Room.
- Create or select the live event/stream you intend to use. Copy the server URL and stream key shown for that destination.
- Treat the key as a password. YouTube describes stream keys as “like your YouTube stream’s password and address.” Do not publish it, commit it to a public repository, or expose it in shared logs. If it is compromised, reset it in YouTube Studio and update the VPS configuration. YouTube Help: Create a live stream with an encoder.
Use the exact endpoint YouTube provides for the event. YouTube recommends RTMPS, the secure extension to RTMP, and documents an rtmps URL scheme using port 443. YouTube Help: Ingest settings for live streaming and YouTube Help: Stream using RTMPS.
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.
Choose FFmpeg settings that YouTube can ingest
YouTube’s current encoder guidance supports RTMP/RTMPS ingest, H.264, H.265/HEVC, and AV1 video, AAC or MP3 audio, constant-bitrate encoding, and frame rates up to 60 fps. Its recommended keyframe frequency is two seconds, with an interval no longer than four seconds. YouTube Help: Ingest settings for live streaming.
For a conservative compatibility starting point, use H.264 video with AAC audio; this is an example, not the only supported combination. Match the output frame size and frame rate to the source where practical. Do not choose a higher target merely because the encoder supports it: the VPS must encode the stream in real time, and its network connection must sustain the outgoing bitrate.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →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.
YouTube’s listed H.264 bitrate recommendations
| Output | YouTube-recommended video bitrate |
|---|---|
| 720p at 30 fps | 6 Mbps |
| 1080p at 30 fps | 10 Mbps |
| 720p at 60 fps | 8 Mbps |
| 1080p at 60 fps | 17 Mbps |
These figures are YouTube’s recommended H.264 video bitrates, not a guarantee that a particular VPS can encode or upload reliably. For other resolutions and frame rates, use YouTube’s settings table rather than extrapolating. Leave headroom above the selected video bitrate for audio, transport overhead, and network variation, and check actual VPS performance. The published guidance also calls for constant bitrate and a two-second keyframe interval (not exceeding four seconds).
Build the FFmpeg output for your input
There is no single valid FFmpeg command for every stream: the input options differ for a media file, a capture device, or an existing network feed, and the exact encoder and option names depend on the FFmpeg build. Configure the command to read your chosen input, encode or copy compatible audio/video as appropriate, and send the output to the YouTube-provided endpoint and key in the format YouTube specifies. Do not publish a filled-in URL containing a real key.
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
Before putting the command into a long-running service, run it interactively on the selected OS and FFmpeg version. Confirm that FFmpeg can open the input, encode at the intended real-time rate, and connect to the RTMPS endpoint. Keep secrets out of public scripts and logs; use an access-controlled secret/configuration method suitable for your host. The exact secret-file permissions and service configuration depend on your operating system and have not been established here.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Start the stream and validate it before an event
- Start the FFmpeg process with the selected input and YouTube event details.
- Return to YouTube Studio’s Live Control Room and wait for the incoming stream preview/status. Confirm the destination is the intended event.
- Check that both audio and moving video arrive, that the frame size and rate are as intended, and that YouTube reports healthy stream status.
- Run a pre-event test using audio and motion similar to the real program. Compare the selected outgoing bitrate with the VPS’s sustained outbound capacity and watch for dropped frames, buffering, or encoder overload.
YouTube recommends testing with representative audio and movement before going live; a still image with silence may not reveal issues that occur with the real input. YouTube Help: Troubleshoot live stream issues.
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.
Keep the process running—and know what is not automatic
A VPS process can exit because of an FFmpeg error, a host reboot, or an interruption in the input or network path. A supervisor or operating-system service can be configured to start a process at boot and restart it after failure, but that is separate from FFmpeg itself and must be tested with the chosen OS, command, and secret-handling approach. The available documentation here does not validate a particular systemd unit, restart policy, or FFmpeg reconnect flags, so do not assume a service will recover correctly without testing.
Also distinguish a restarted encoder process from a healthy YouTube event: after any interruption, verify the incoming stream and event status in Studio. If you change the key in YouTube, update the VPS configuration too.
Troubleshooting common failures
| Symptom | Likely checks and corrective action |
|---|---|
| FFmpeg cannot connect to YouTube | Check that the VPS has public internet connectivity, the provider and guest firewalls allow outbound traffic, and the endpoint and port match the event details. Prefer the YouTube-provided RTMPS URL. |
| YouTube does not receive the stream | Confirm that the server URL and stream key belong to the selected event and were copied accurately. If the key was exposed, reset it in Studio and replace it in the VPS configuration. |
| Video is choppy or the encoder falls behind | Check CPU load and real-time encoding performance. Reduce the output resolution, frame rate, or encoding workload if the VPS cannot keep up; assess whether a different CPU resource class is appropriate for the workload. |
| Stream health is poor or the connection buffers | Check sustained outbound capacity against the target bitrate, allow margin for audio and transport overhead, and inspect YouTube Studio’s stream-health status. Repeat the pre-event test with representative content. |
| Audio is missing or video is present without sound | Verify that the FFmpeg input maps the intended audio source and that the output uses a YouTube-supported audio codec such as AAC or MP3. Test with audible program material rather than silence. |
| The stream stops after a reboot or error | Check whether the FFmpeg process is running and review its local error output. Configure and test an appropriate supervisor or service for the chosen OS; a process restart alone does not confirm that YouTube has resumed receiving a healthy stream. |
Account for copyright and YouTube live-stream rules
Having a working encoder does not grant rights to the audio or video you transmit. Use material you own, have permission to use, or are otherwise legally entitled to stream, and review YouTube’s applicable copyright and live-stream policies for your channel and content. A technically healthy feed can still be restricted or interrupted by a rights or policy issue; check YouTube Studio for notices and status changes.
Or let it run in the cloud
If your goal is to keep uploaded video looping on YouTube rather than encode a live camera, capture device, or other real-time input, StreamNeo is a hosted alternative: upload the recording or build a playlist, add your YouTube stream key once, and go live. The cloud keeps it running without a computer or home connection left on. It automatically recovers if YouTube drops the stream, and uploads stream as made up to 4K 60fps at one flat price per slot, without re-encoding or quality tiers.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsEach slot includes one always-on YouTube stream, 10 GB storage per slot pooled across active slots, 24/7 looping and playlists, automatic recovery if YouTube drops, and StreamNeo team support. The first day is free with no card (one free day per account); billing options include a day, week, month, six months, or year, with cancellation any time. UPI and cards are accepted in India; card checkout is available worldwide. Five or more slots: contact support. See StreamNeo for product details.
Quick Recap
Monthly: $9.99 per month.
Start your free first day with StreamNeo.
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.




