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

You can run a prerecorded YouTube Live stream from a Hetzner VPS by having FFmpeg send the video to the ingest URL and stream key shown in YouTube Live Control Room. The main decisions are whether FFmpeg can copy a compatible encoded file or must transcode it, whether the server can sustain that workload, and whether the server’s outbound-traffic allowance covers a continuous stream. A VPS does not guarantee an uninterrupted broadcast: supervise FFmpeg, monitor YouTube’s stream health, and plan how to recover from failures.

How the VPS-to-YouTube stream works

The VPS runs FFmpeg; YouTube receives the stream. You create or open a stream in YouTube Live Control Room, use its current stream URL and key in FFmpeg, and verify the result in YouTube’s preview and health indicators. YouTube’s setup workflow uses both the URL and key (YouTube: Set up your encoder for live streaming).

A stream key is a credential. Keep it out of public scripts, screenshots, shared shell history, and logs. If it is exposed, rotate it in YouTube Live Control Room and update the server configuration.

Choose the source and encoding approach

Looping a compatible video

If the source is already encoded in a format and configuration YouTube can ingest, FFmpeg may be able to stream-copy it rather than encode every frame again. Stream-copying generally avoids the heavy CPU work of encoding, but it does not let you change the codec, resolution, frame rate, or bitrate. Check that the file’s video and audio streams, timestamps, and output container work for the intended live output; a file that plays locally is not automatically suitable for continuous ingest.

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

Transcoding or generating a feed

If you need to change resolution, frame rate, codec, bitrate, or combine sources, FFmpeg must process the output accordingly. Real-time encoding uses CPU continuously, and the load depends on the source, output settings, and encoder options. A camera or remote feed and a generated scene also have different input and recovery needs from a single file. There is no supported universal vCPU or RAM size for every FFmpeg stream: test the exact workload on the server you plan to use.

Inspect the installed FFmpeg build

Install FFmpeg using the package source appropriate for your chosen operating system, then check the installed binary and version. Confirm that it has the input demuxer, codecs, and RTMP-family output protocol needed by your workflow. FFmpeg options and protocol behavior vary with version and build; consult the official FFmpeg protocol documentation and the documentation for your installed build rather than assuming an example command applies unchanged.

Set up YouTube Live and the Hetzner server

  1. Prepare your media. Decide whether you are looping one file, selecting items from a playlist, processing a live input, or generating a scene. Confirm the source’s codec, resolution, frame rate, audio streams, duration, and file location before choosing an FFmpeg workflow.
  2. Create or open the YouTube stream. In YouTube Studio, open Live Control Room and follow YouTube’s encoder setup to obtain the current ingest URL and stream key. Keep the key private; do not paste it into a public repository or a command that will be copied into shared logs. YouTube’s steps are documented in its encoder setup guide.
  3. Provision a Hetzner Cloud server. Choose an operating system with the packages and maintenance approach you can support, and ensure the server has outbound network access to YouTube’s ingest endpoint. Hetzner distinguishes shared-resource and dedicated-resource server classes; dedicated CPU resources are positioned for CPU-intensive workloads. That distinction can inform a transcoding test, but it does not replace measuring your actual FFmpeg load. Review the current Hetzner Cloud server options and relevant IP charges before ordering.
  4. Install and verify FFmpeg. Install a build with the input and output capabilities your source requires. Check the version and available components, then test the input locally on the VPS before attempting a long broadcast.
  5. Configure ingest and output. Use the current URL and key from Live Control Room. Prefer RTMPS if your FFmpeg build and YouTube’s current stream settings support it. Keep output parameters aligned with the settings YouTube displays for that stream.
  6. Run a representative test. Test with the actual source, representative movement and audio, and intended output settings. Confirm YouTube’s preview, audio, stream health, and any warnings before treating the setup as deployed. YouTube recommends testing and monitoring stream health (YouTube: Tips for live streaming).

Choose YouTube-compatible output settings

YouTube’s current encoder guidance recommends RTMPS, constant bitrate (CBR), and a two-second keyframe interval, with four seconds as the maximum. It says: “We recommend streaming to YouTube Live with RTMPS, a secure extension to the popular RTMP video protocol.” Use the settings shown for your stream in Live Control Room, since recommendations and available codec options may change. See YouTube’s encoder settings, bitrates, and resolutions.

H.264 output mode Minimum video bitrate Recommended video bitrate
720p at 30 fps 3 Mbps 8 Mbps
1080p at 30 fps 5 Mbps 14 Mbps

These are YouTube’s H.264 video figures, not total stream bitrate; audio and protocol overhead add traffic. Do not apply them to AV1 or H.265, whose guidance is separate. A higher output resolution or frame rate can require more encoding capacity and bandwidth, so choose a mode that your source, CPU, and network can sustain.

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.

Estimate continuous outbound traffic before choosing a plan

A stream that runs all month sends substantial data. At YouTube’s recommended 14 Mbps H.264 video bitrate for 1080p30, 30 days of video alone works out to about 4.54 decimal TB: 14 megabits per second × 2,592,000 seconds ÷ 8. This is arithmetic based on the video bitrate, not a published Hetzner usage figure. Audio, protocol overhead, and any other outbound server traffic increase the total.

Hetzner’s traffic documentation lists 20 TB of included traffic for EU CX, CPX, and CAX Cloud Servers, while allowances for US and Singapore locations depend on the plan. These figures are location- and product-specific; check the current allowance for the exact server before relying on them. Hetzner states that outgoing traffic is billed and that excess traffic is charged in 100 MB blocks; 75% and 100% notifications are warnings, not automatic caps. Review the Hetzner billing FAQ and traffic overview for current terms.

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

Keep FFmpeg running and build a recovery path

A command running in a terminal is not a 24/7 operations plan. Run FFmpeg under a process supervisor, such as a system service manager, configured to restart the process after an unexpected exit. Store logs somewhere you can inspect, set up an alert for a stopped process or missing output, and test the restart procedure before depending on it. Keep the stream key in a protected configuration mechanism rather than embedding it in public or broadly readable files.

FFmpeg’s protocol reconnect options may help with particular network interruptions, depending on the installed version and protocol, but they do not supervise the entire process or establish that a YouTube broadcast has resumed successfully. Follow the FFmpeg protocol documentation for the version in use, and verify recovery in YouTube Live Control Room. A process can be running while the ingest is unhealthy, so monitor both ends.

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.

What “24/7” can and cannot promise

Hetzner’s Cloud and vServer 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 network path, YouTube ingest, or the broadcast will never interrupt. Read the current Hetzner Cloud service agreement and design for process exits, server maintenance, disconnects, and YouTube-side problems.

Plan separately if you need a complete archive

YouTube says streams under 12 hours are automatically archived. Do not assume that one uninterrupted 24/7 broadcast will produce a single complete automatic archive. If you need a full recording, arrange a separate recording or segmentation plan and verify current YouTube behavior for your channel and stream.

Or let it run in the cloud

If you want a YouTube channel to keep playing uploaded videos without administering a VPS and FFmpeg process, StreamNeo is a cloud service built for that workflow. Upload a recording or build a playlist, add your YouTube stream key once, and go live. It plays uploaded videos to YouTube; it does not broadcast from a camera.

  • Nothing has to stay on at home: playback runs in the cloud.
  • Your upload streams as made, up to 4K 60fps, at one flat price per slot without re-encoding or quality tiers.
  • StreamNeo automatically recovers if YouTube drops the stream.
  • The first day is free with no card (one free day per account).

Monthly: $9.99 per month. Start at StreamNeo’s free trial registration.

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.