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 errorsTo stream with FFmpeg from a Hetzner VPS, create an Ubuntu Cloud server with a public Primary IP, install an FFmpeg build with the codecs you need, copy the stream URL and key from YouTube Live Control Room, then send a real-time FLV stream to YouTube over RTMPS. Test the preview and stream health before making the process unattended. The commands below are starting points: the right settings depend on your source, output resolution and frame rate, and whether FFmpeg can copy the source or must transcode it.
What you need before starting
- A Hetzner Cloud account and a Cloud server with a public Primary IP.
- SSH access to the server. Use an SSH key and, where practical, limit inbound SSH access to your trusted IP address.
- A video file available on the VPS, with the intended audio and video tracks.
- A YouTube channel that can create a live event in Live Control Room.
- An FFmpeg build that includes the required input, output protocol and encoder. Available codecs vary by package and build options.
You do not need a public inbound port for YouTube ingest in the usual outbound-push setup. You do need the server to be able to make outbound connections to the ingest endpoint. Check the firewall rules you actually configured: Hetzner Cloud Firewall blocks unspecified inbound traffic by default, while outbound traffic is permitted by default when no outbound rules are configured (Hetzner Cloud Firewall overview).
Create and secure the Hetzner VPS
Choose a server with a public IP
- In Hetzner Console, create a Cloud server and select a location, Ubuntu image, and server type.
- Attach a Primary IP so the server has a public network interface. Hetzner describes Cloud servers as virtual machines; available types and costs vary, so check the current console options rather than assuming a particular cheapest plan (Hetzner Cloud servers overview).
- Add your SSH public key during provisioning if the console offers that option. Confirm you can connect before tightening firewall rules.
Set firewall rules without losing SSH
Keep the administration path working while you change firewall settings. If you create an inbound-deny firewall policy, add an SSH rule from your trusted address before attaching or applying it. Avoid opening SSH to every address unless you have a specific reason. For this streaming workflow, allow the VPS to initiate outbound connections to YouTube; do not expose the stream key or create unnecessary inbound services.
Install FFmpeg and check the build
On Ubuntu, install the distribution package with:
sudo apt update
sudo apt install ffmpeg
Then inspect what is installed:
ffmpeg -version
ffmpeg -encoders
Look for the encoder you intend to use, such as libx264 for H.264 encoding. A package named FFmpeg does not guarantee every encoder is present. If the required encoder or protocol is missing, use a suitable package or build that includes it before trying to stream.
#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.
Prepare the media: copy or transcode
Use stream copy when the source already fits
Stream copy sends the encoded audio and video without re-encoding. It can substantially reduce CPU work, but it does not let you change the encoded video bitrate, resolution, frame rate or codec. Confirm the source codecs and tracks first; an incompatible source cannot be made compatible by simply copying it into an FLV output.
ffprobe -hide_banner -i /path/to/input.mp4
Transcode when you need control over output
Transcoding lets FFmpeg encode to an output format and bitrate you choose, but it consumes CPU. The server capacity needed depends on the codec, resolution, frame rate and workload. No single Hetzner server size is established for all such jobs: start with a trial, monitor CPU and stream health, and resize if the workload cannot keep up.
Create the YouTube live event and protect its key
- Open YouTube Live Control Room and create or schedule the live event.
- Copy the stream URL and stream key shown for that event. Use the exact RTMPS URL available in the control room where supported. YouTube describes RTMPS as RTMP over TLS/SSL and recommends it for YouTube Live (YouTube Help: Stream using an encoder).
- Keep the stream key private. Do not paste a real key into a public script, repository, screenshot or article. If it is exposed, replace or reset it in YouTube before relying on the stream again.
The ingest URL can vary, so do not assume a host or path from an example online. Use the exact URL supplied for your event and verify that the FFmpeg build supports the RTMPS protocol.
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 YouTube-compatible encoder settings
YouTube’s encoder guidance lists RTMP/RTMPS, H.264, H.265/HEVC and AV1, supports up to 60 fps, recommends constant bitrate (CBR), and recommends a two-second keyframe interval that should not exceed four seconds. For H.264, its published bitrate entries include 10 Mbps for 1080p30 and 12 Mbps for 1080p60. These are YouTube recommendations, not a measurement of the throughput available on your VPS. Choose a quality your server and network can sustain, and test it before an event (YouTube encoder settings).
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →- Resolution and frame rate: match the output to the source and intended stream. Do not request a higher frame rate or resolution than the source can meaningfully provide.
- Bitrate: set a rate appropriate to the chosen codec and output format. Confirm the server’s outbound throughput is reliably higher than the stream’s total bitrate, including audio and protocol overhead.
- Keyframe interval: set a two-second GOP. For example, at 30 fps, 60 frames corresponds to two seconds; at 60 fps, 120 frames corresponds to two seconds.
- CBR: use a constrained, steady bitrate where the chosen encoder supports it, and verify the actual output and YouTube health messages.
Send a file to YouTube with FFmpeg
Transcoding example
This illustrative command uses H.264 and AAC. Replace the file path and RTMPS destination with your own values; never substitute a real key into a public copy of the command. At 30 fps, -g 60 requests a two-second GOP. The example’s bitrate is not a universal recommendation, and the settings must match your source and target format.
ffmpeg -re -i /path/to/input.mp4
-c:v libx264 -preset veryfast -b:v 6000k -maxrate 6000k -bufsize 12000k
-g 60 -c:a aac -b:a 128k
-f flv 'rtmps://INGEST_HOST/APP/STREAM_KEY'
-re reads a file at its natural playback rate rather than sending it as fast as possible. The FLV muxer is used for the RTMP-family streaming output. Confirm the precise URL form and TLS support in your installed FFmpeg build; FFmpeg documents RTMPS among its RTMP protocols and the FLV sending pattern (FFmpeg RTMP protocols).
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.
Stream-copy example
If the source audio and video codecs and container combination are compatible with the YouTube ingest path, try stream copy instead of encoding:
ffmpeg -re -i /path/to/input.mp4
-c:v copy -c:a copy
-f flv 'rtmps://INGEST_HOST/APP/STREAM_KEY'
If this fails because the source streams are incompatible with FLV or the ingest requirements, transcode the incompatible stream or use a compatible source. Stream copy does not convert codecs or repair missing tracks.
Test the stream before leaving it unattended
- Start the FFmpeg command and watch its terminal output for connection, encoding and muxing errors.
- Open the event in Live Control Room and confirm the preview appears.
- Check video motion, audio presence and synchronization, resolution and frame rate, and YouTube’s stream health messages.
- Confirm the output can run at real-time speed without sustained CPU saturation or dropped frames. If it cannot, lower the encoding workload, use a compatible stream-copy source, or move to a more capable server.
- End the test cleanly and check the actual event lifecycle before configuring automatic restarts.
Keep FFmpeg running and plan recovery
A terminal session is not a robust unattended service: SSH disconnections, process exits and server maintenance can interrupt it. After the command is validated, you can run it under systemd or another supervisor, capture logs, and configure a restart policy. Test how that policy behaves when FFmpeg exits and when the YouTube event ends; an automatic restart is not by itself proof that the ingest session will recover correctly. Add log rotation and monitoring so logs do not grow without bound and failures are visible.
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
For a looping broadcast, the input and process lifecycle also matter. A single file normally reaches its end; configure and test the intended loop behavior rather than assuming FFmpeg will continue indefinitely. Confirm that reconnecting to YouTube and restarting the source work as expected for your event.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Estimate the ongoing cost
Budget for the Cloud server, its public IP, and outgoing traffic. Hetzner says server plan prices exclude public IPs, documents charges for outgoing traffic, and bills servers while they exist even if powered off. Current server, IP and traffic rates or allowances can vary; check the current console price before provisioning (Hetzner Cloud billing overview; Hetzner Cloud servers overview).
Troubleshoot common failures
FFmpeg reports that the encoder is unavailable
Likely cause: the installed build does not include the requested encoder. Fix: check ffmpeg -encoders and install or build a version with the required encoder, then rerun the command.
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.
The RTMPS connection fails immediately
Likely causes: a mistyped URL or key, a firewall rule blocking outbound traffic, or an FFmpeg build without the needed TLS/protocol support. Fix: recopy the event’s exact RTMPS URL and key, check outbound firewall policy, and verify protocol support in the installed build.
YouTube connects but reports poor stream health
Likely causes: insufficient or inconsistent outbound throughput, an encoding workload that cannot maintain real time, or output settings that do not fit the target format. Fix: inspect FFmpeg logs and server CPU, confirm actual bitrate and frame rate, and reduce the workload or bitrate to a rate the connection can reliably sustain.
There is no audio or the video is blank
Likely cause: the input lacks the expected track, or the selected mapping and codecs do not produce the intended output. Fix: inspect the file with ffprobe, confirm audio and video streams are present, and check the Live Control Room preview before going unattended.
The stream stops when the file ends or the process exits
Likely cause: a file input naturally reaches EOF, or FFmpeg terminated without a tested supervisor. Fix: configure the desired repeat behavior and a service restart policy only after testing the event lifecycle; monitor logs and confirm reconnection in Live Control Room.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Or let it run in the cloud
If you want the YouTube stream without maintaining a VPS and FFmpeg process, StreamNeo is a managed option for uploaded videos and playlists. Upload a recording, add your YouTube stream key, and go live. Nothing has to stay on at home; each slot streams uploaded media at its original 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.
Quick Recap
Start your free StreamNeo day.
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.




