You can send a prerecorded video stream to YouTube around the clock from a Hetzner Cloud virtual machine by creating a YouTube live stream, running an encoder such as FFmpeg on the VM, and supervising that process. The VM needs outbound access to YouTube’s ingest endpoint, enough CPU if it must transcode, and enough included outbound traffic for the selected bitrate. Hetzner and YouTube do not document or guarantee a specific end-to-end Hetzner recipe, so test the exact media, settings, and recovery behavior before relying on it.
What you need before starting
- A YouTube channel eligible for live streaming. YouTube requires channel verification and no live-streaming restrictions in the previous 90 days; its getting-started guidance also sets a minimum age of 16. First-time enablement can take up to 24 hours. See YouTube’s live-streaming getting-started guide.
- A Hetzner Cloud VM with a public network interface and outbound connectivity. Hetzner describes Cloud servers as virtual machines; a public IP is needed for a public network interface. See Hetzner Cloud server overview.
- The video or playlist files available to the VM, an encoder or remuxer, and a protected way to supply your YouTube stream key.
- A plan and location whose compute resources and traffic allowance suit the workload. Hetzner does not publish a minimum FFmpeg VM size for this use, so verify performance with your actual source and settings.
Create a YouTube live stream and protect its key
- Open YouTube Live Control Room, create or schedule a stream, and follow the channel’s live-stream enablement steps if prompted. Allow up to 24 hours for first-time enablement.
- Copy the ingest URL and stream key shown in Live Control Room. The URL goes in the encoder destination; the key identifies the stream.
- Store the key in a root-readable configuration file or an environment secret on the VM. Do not commit it to a repository, paste it into a public shell transcript, or show it in a screenshot. Treat it like a password and rotate it in YouTube if exposed.
YouTube’s encoder settings guidance recommends RTMPS, a secure extension to RTMP. Use the ingest URL YouTube supplies for the stream rather than guessing an endpoint.
Choose a source and encoding approach
Remux when the file already fits
If the prerecorded file’s codecs and stream characteristics already suit YouTube’s ingest requirements, remuxing can avoid the extra CPU load of re-encoding. Whether a particular file can be remuxed reliably depends on its format and stream parameters; test it with the exact file and installed FFmpeg build.
Transcode when the source does not fit
Transcoding converts the source to the desired video and audio codecs, resolution, frame rate, and bitrate, but uses CPU or any supported hardware encoder. A low-cost VM may not encode every source in real time. Check CPU load and dropped frames during a sustained test before choosing a plan.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →#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.
Make the source continuous
Keep the media on the VM or make it reliably accessible, and configure the input to repeat or provide a continuous playlist. Check what happens at the end of each file: gaps, a black frame, missing audio, or a failed process can interrupt the broadcast even when the VM itself is running.
Set YouTube-compatible video and audio parameters
YouTube’s current encoder guidance lists RTMP/RTMPS ingest; H.264, H.265/HEVC, or AV1 video; AAC or MP3 audio; constant-bitrate encoding; and a recommended two-second keyframe interval, not exceeding four seconds. Use the table on YouTube’s encoder settings page for the exact resolution, frame rate, and codec you plan to send.
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.
| Output | Codec | YouTube minimum bitrate | YouTube recommended bitrate |
|---|---|---|---|
| 720p30 | H.264 | 3 Mbps | 8 Mbps |
| 720p30 | AV1 or H.265/HEVC | 2 Mbps | 6 Mbps |
| 1080p30 | H.264 | 5 Mbps | 14 Mbps |
| 1080p30 | AV1 or H.265/HEVC | 4 Mbps | 10 Mbps |
These are YouTube Help’s encoder guidance values, accessed in 2026. They are not guarantees of picture quality or of a particular VM’s encoding capacity. A higher bitrate generally requires more outbound traffic; choose based on the source, audience, and YouTube’s table rather than assuming the largest number is best.
Install FFmpeg and run a protected test
Install FFmpeg using the package method supported by your VM’s operating system, then check that the installed build includes the codecs you intend to use. YouTube specifies ingest recommendations, not a tested Hetzner command, and FFmpeg options vary with build and workflow. The following is a template only: replace the bracketed placeholders, use the actual values for your file, and inject the key from a protected secret rather than typing it into a command saved in shell history.
Free tools Windows power users keep installed
One-click scans. No signup required.
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.
ffmpeg -re -stream_loop -1 -i "[path-to-video]"
-c:v libx264 -b:v [video-bitrate] -minrate [video-bitrate] -maxrate [video-bitrate] -bufsize [buffer-size]
-g [keyframe-interval-in-frames] -c:a aac -b:a [audio-bitrate]
-f flv "[YouTube-RTMPS-ingest-URL]/[STREAM_KEY_FROM_SECRET]"
This illustrates a looping, real-time input and an H.264/AAC RTMP-style output; it is not a ready-to-run recipe. Set the keyframe interval in frames to match the chosen frame rate and YouTube’s recommended two-second interval, and check the installed FFmpeg documentation for correct option behavior. Configure constant bitrate and codec parameters appropriately for the selected encoder. For remuxing, use compatible copy options only after confirming the source streams meet YouTube’s requirements. Avoid putting a live key directly in a command line where it may be visible in process listings or logs; a protected configuration or secret-injection method is safer.
Estimate traffic before choosing a Hetzner plan
A continuous 5 Mbps video payload uses about 1.62 TB over 30 days in decimal units: 5,000,000 bits per second Ă— 2,592,000 seconds Ă· 8 = 1,620,000,000,000 bytes. This is arithmetic for video payload alone; audio and protocol overhead increase the total. Each additional independent output generally adds its own outbound traffic.
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
Hetzner’s traffic documentation lists 20 TB for several EU Cloud server families, with plan-dependent allowances in other regions, including the US and Singapore. The figures and included amounts can change, so check the current allowance for the exact product and location before ordering: Hetzner traffic documentation. Hetzner’s traffic billing FAQ says outgoing traffic beyond the included amount may be charged; usage notifications at 75% and 100% do not cap or stop traffic. Confirm current order-page prices and terms rather than treating a traffic alert as a safeguard.
Compare the monthly server cost and included egress with the expected bitrate and number of simultaneous streams. Also weigh compute capacity and network placement for your audience; a large traffic allowance alone does not establish encoding performance or ingest reliability.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsBest 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 stream supervised and prove recovery
A running VM is not proof that YouTube is receiving a healthy stream. Run FFmpeg under a process supervisor configured to restart it after failure, and monitor process state, CPU, disk space, outbound traffic, and the stream’s health in YouTube Live Control Room. YouTube recommends checking the preview, testing before going live, and monitoring stream quality; it does not prescribe a specific process supervisor.
- Test the full playlist and verify that audio and video remain continuous through file transitions.
- Watch the YouTube preview and stream-health indicators during a sustained run.
- Stop and restart the encoder deliberately, then confirm that the stream recovers as expected.
- Reboot the VM and verify that the supervisor starts the process and the source is still available.
- Check logs and traffic during the test, and confirm that a failed restart or exhausted disk space raises an alert you will see.
YouTube’s encoder directory lists Gyre as a cloud-based tool for 24/7 prerecorded-video streaming and describes CamStreamer’s continuous 24/7 stream use case for cameras. Those examples show that continuous streaming is a recognized use case; they do not mean YouTube endorses every custom Hetzner configuration or guarantees a particular server’s uptime. See YouTube’s encoder directory.
Troubleshoot common failures
| Symptom | Likely cause | What to check or change |
|---|---|---|
| YouTube never shows a preview | Wrong ingest URL or key, disabled live streaming, or blocked outbound connectivity | Recheck the URL and key in Live Control Room, confirm the account is enabled, and test outbound access from the VM. |
| Stream connects but YouTube reports poor health | Bitrate, keyframe interval, codec, or network delivery does not match the chosen settings | Compare the output with YouTube’s table for the exact codec, resolution, and frame rate; use CBR and keep keyframes within the recommended interval. |
| Video stalls or audio disappears at a loop boundary | Input looping or playlist transition is not seamless, or the source lacks a compatible audio/video stream | Test the file boundary, inspect the source streams, and adjust the playlist or encoding approach. |
| Encoder exits or falls behind | Insufficient compute for transcoding, incompatible input, or resource exhaustion | Inspect FFmpeg logs and CPU, test remuxing if the source already fits, or use a VM with more suitable resources. |
| Stream stops after the VM or network recovers | Encoder process did not restart or reconnect, or the source is no longer available | Check supervisor configuration and logs, verify the input path, and test restart behavior rather than assuming the VM reboot restored the broadcast. |
| Unexpected traffic charges or allowance exhaustion | Actual bitrate, audio, overhead, or multiple outputs exceeded the estimate | Measure outbound usage, recalculate from the actual streams, and recheck the current allowance and billing terms for the selected plan and region. |
Check YouTube’s content rules before looping a documentary
A technically healthy stream can still cause a policy or rights problem. Only stream material you own or are authorized to use, including its music and other embedded content. YouTube’s encoder guidance covers technical settings, not permission to rebroadcast a film. Review YouTube’s applicable copyright and monetization policies for your channel and content; a continuous loop does not make copyrighted or reused material permissible.
Or let it run in the cloud
If you would rather not maintain a Hetzner VM and encoder, StreamNeo is a cloud service for keeping a YouTube channel live from uploaded videos. Upload a recording or build a playlist, add your YouTube stream key once, and go live. Nothing has to stay on at home; it streams the upload as made, up to 4K 60fps, at one price per slot, with automatic recovery if YouTube drops the stream. The first day is free with no card. Monthly pricing is $9.99 per month. StreamNeo is for YouTube streams from uploaded videos, not camera broadcasts. Start your free first day with StreamNeo.
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.




