Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
DocumentaryTube
24/7 streaming

How to Use a Hetzner VPS for a 24/7 FFmpeg YouTube Stream

A practical guide to running FFmpeg on Hetzner for a continuous YouTube stream, from stream keys and encoding choices to bandwidth, monitoring, and recovery.

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

Run FFmpeg on a Hetzner Cloud server, then send its output to the ingest URL and stream key shown in YouTube Live Control Room. The key decisions are whether FFmpeg can copy an already compatible stream or must encode it in real time, whether the server can sustain that workload, and how you will detect and recover from a dropped process or connection. A VPS can keep your computer out of the streaming path, but it cannot guarantee an uninterrupted YouTube broadcast.

What the setup does—and what it does not guarantee

Your media source goes into FFmpeg on the VPS. FFmpeg packages or encodes the audio and video and sends them to YouTube over RTMP or, preferably when supported, RTMPS. YouTube receives the feed; it does not run FFmpeg for you. You remain responsible for server configuration, the process, monitoring, and recovery.

Hetzner’s Cloud Server service agreement describes a commercially reasonable effort toward 99.9% monthly availability for an individual Cloud Server. That is an infrastructure availability measure, not a guarantee that FFmpeg, the connection to YouTube, or your live broadcast will stay up continuously. Hetzner Cloud and vServer service agreement

Choose the stream path before choosing a server

Stream-copy an already compatible file

If your media already has compatible video and audio codecs, frame rate, resolution, and bitrate, FFmpeg can often send the existing encoded streams without encoding them again. This is commonly called stream-copying. It avoids most of the CPU work of video encoding, but it cannot change the video’s resolution, frame rate, codec, or bitrate. Check that the actual file and YouTube’s current ingest settings are compatible before relying on this approach.

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.

Transcode when you need a different output

If you need to resize, change frame rate, change codec, or enforce a different bitrate, FFmpeg must encode the video in real time. This can use substantially more CPU than stream-copying. There is no universal Hetzner vCPU or RAM size that can be recommended for every source and command: test the actual file, output settings, and FFmpeg build on the server you intend to use.

Compare shared and dedicated CPU options by testing

Hetzner describes Cloud Server classes with shared and dedicated resources, with dedicated CPU resources presented for CPU-intensive workloads. That distinction can matter for real-time transcoding, but it does not establish a particular FFmpeg capacity. Test CPU use and whether frames are being processed fast enough with your own media and settings. Review current plans and public IP charges for the location and product you select. Hetzner Cloud server overview

Use YouTube’s current ingest settings

YouTube’s current encoder guidance recommends RTMPS, constant bitrate (CBR), and a two-second keyframe interval, with a four-second maximum. It says, “We recommend streaming to YouTube Live with RTMPS, a secure extension to the popular RTMP video protocol.” Follow the settings shown for your stream in Live Control Room if they differ from general guidance. YouTube: Choose live encoder settings, bitrates, and resolutions

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.
H.264 output mode YouTube minimum video bitrate YouTube recommended video bitrate
720p at 30 fps 3 Mbps 8 Mbps
1080p at 30 fps 5 Mbps 14 Mbps

These are the H.264 values in YouTube’s encoder settings, not the AV1 or H.265 figures on the same page. They describe video bitrate; audio and protocol overhead add to the traffic sent by your server. Match the output to the source and your intended quality rather than assuming a bitrate alone makes an incompatible source suitable.

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

Prepare YouTube and the Hetzner server

  1. Create or open the live stream. In YouTube Live Control Room, create the broadcast or open the one you will use. Obtain its current stream URL and stream key using YouTube’s encoder workflow. Keep the key private: it is a credential, so do not publish it in a script, log, screenshot, or shared shell history. If exposed, rotate it in YouTube and update the server configuration. YouTube: Stream live
  2. Provision a Cloud Server. Choose a supported operating system, server class, region, and public networking appropriate to your source and encoding workload. The server needs outbound connectivity to YouTube’s ingest endpoint. Confirm the current price, IP charges, and included traffic for the exact plan and location before creating it.
  3. Install FFmpeg and verify its build. Install FFmpeg using the method appropriate for your chosen operating system, then inspect the installed binary and its build configuration. Confirm that it includes the input demuxer, codecs, and RTMP-family output protocol needed for your source and command. FFmpeg options and protocol support can vary by version and build. FFmpeg protocol documentation
  4. Make credentials available without putting them in public output. Avoid embedding the stream key in a command that will be shared, saved in a broadly readable script, or captured in logs. Restrict access to the configuration and logs that contain sensitive values, and have a key-rotation procedure ready.
  5. Test the complete path. Start a representative stream and check the YouTube preview, audio, stream health, and messages in Live Control Room before treating the setup as deployed. Test the actual source, including the most demanding sections, and observe the server’s CPU and network use. YouTube recommends testing with representative audio and movement and monitoring stream health. YouTube: Live streaming tips

Build the FFmpeg input and output for your source

There is no single correct command for every input: a local looping file, a playlist, a live camera feed, a remote input, and a generated scene need different input handling. First confirm the source works locally on the VPS and decide whether its existing streams can be copied or need encoding. Then supply YouTube’s current ingest URL and key and configure the output to match the guidance for your broadcast.

For a file-based stream, arrange the input so it repeats as intended, and verify that audio and video continue across the loop boundary. A playlist needs its own sequencing and error behavior; do not assume that a looping-file option handles playlist transitions. For any source, verify the installed FFmpeg version’s supported options and output protocol in its documentation. Do not deploy a command merely because it starts: confirm that YouTube receives stable audio and video and that the Live Control Room reports a healthy stream.

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.

Estimate continuous outbound traffic

At 14 Mbps of H.264 video, the recommended 1080p30 video bitrate in YouTube’s settings, 30 days of uninterrupted output works out to about 4.54 TB decimal of video data: 14 megabits per second × 2,592,000 seconds ÷ 8. This is arithmetic, not a published Hetzner usage figure. Audio and protocol overhead make actual egress higher, and other outbound traffic from the server counts too.

Hetzner’s traffic page lists 20 TB of included traffic for EU CX, CPX, and CAX Cloud Servers, while listing different plan-dependent allowances for US and Singapore locations. Do not assume the EU figure applies to another location, product, or current plan; check the specific server’s allowance. Hetzner Cloud traffic documentation

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

Hetzner’s billing FAQ says outgoing traffic is billed and that traffic above the included amount is charged in 100 MB blocks; its 75% and 100% notifications are warnings, not automatic caps. Check the current terms and notifications for your account and plan before treating an allowance as a hard limit. Hetzner Cloud billing FAQ

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
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Keep the stream recoverable

Supervise FFmpeg as a service

Do not rely on an open shell session as the production plan. Run FFmpeg under an operating-system service supervisor or equivalent process manager, with deliberate restart behavior and logs you can inspect. A restart can recover from an FFmpeg exit, but it does not by itself prove that YouTube has resumed receiving a healthy stream.

Monitor the result, not just the process

Watch for a stopped process, missing output, connection errors, and unhealthy stream status in YouTube Live Control Room. Set up notifications that reach someone able to investigate, and test the alert and restart path. FFmpeg protocol reconnect options may help with some network failures, but their behavior depends on the protocol, command, and installed version; they are not a substitute for supervising the full process and verifying the broadcast.

Plan around maintenance and service boundaries

Even if your process is configured to restart, server maintenance, network problems, ingest-side interruptions, or a YouTube-side issue can stop or disrupt the broadcast. Keep a documented recovery procedure, including how to restart the service, check the preview, and rotate the stream key if it is compromised. The Hetzner availability effort is not an application-level continuity promise.

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.

Understand YouTube’s archive limit

YouTube states that streams under 12 hours are automatically archived. Do not assume that one uninterrupted 24/7 broadcast will produce a complete automatic archive. If you need a full record, arrange separate recording or segmentation and verify that the resulting files are complete. YouTube: Stream live

Common problems and fixes

  • YouTube does not receive the stream: Recheck the current ingest URL and key in Live Control Room, the server’s outbound connectivity, and whether the FFmpeg build supports the selected RTMP-family protocol. Confirm that the key has not been revoked or rotated.
  • The stream starts but YouTube reports poor health: Compare the actual output codec, bitrate, frame rate, and keyframe interval with the current encoder guidance. Check CPU saturation during transcoding and network upload capacity; test with representative motion and audio.
  • FFmpeg exits or the stream stops after a network interruption: Inspect FFmpeg logs and service-supervisor logs, then test the restart and notification path. Do not assume a reconnect flag guarantees indefinite recovery.
  • The VPS is overloaded: Determine whether the command is transcoding rather than copying. Measure the actual workload, simplify or change output settings if appropriate, and test a server class suited to the measured CPU demand.
  • Traffic approaches the allowance: Recalculate using the actual video and audio bitrate, add overhead and other egress, then compare with the selected region and plan’s current terms. Do not rely on threshold emails to cap traffic automatically.
  • The stream key appears in a log or shared file: Treat it as exposed. Rotate it in YouTube Live Control Room, replace the server-side secret, and check access permissions on configuration and log files.

Or let it run in the cloud

If you want a YouTube stream of uploaded video without administering a VPS, StreamNeo is a managed alternative: upload a recording or build a playlist, add your YouTube stream key once, and go live. It keeps looping from the cloud, so no computer or home connection has to stay on. Each slot streams your upload as made, up to 4K 60fps, at one flat price per slot; it can automatically recover if YouTube drops the stream. The first day is free with no card. Monthly pricing is $9.99 per month. StreamNeo plays uploaded videos to YouTube; it is not a camera-based live-production service. Start the free day with StreamNeo.

Frequently Asked Questions

Can FFmpeg stream-copy a file to YouTube without transcoding?

Yes, when the file’s encoded streams and output parameters are compatible with YouTube’s current ingest requirements; verify the actual media and stream health rather than assuming compatibility.

Will one 24/7 YouTube broadcast create a complete automatic archive?

No complete archive should be assumed: YouTube’s stated automatic-archive condition is for streams under 12 hours.

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

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 *

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
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

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.