To stream a prerecorded 1080p video from a VPS to YouTube Live, use FFmpeg to encode the file in real time and send it to YouTube over RTMPS. For H.264 at 30 fps, YouTube recommends 10 Mbps video, a two-second keyframe interval, CBR, and 128 kbps stereo audio. The command below is a starting template, not a tested guarantee for every VPS: verify that your server can encode and sustain the stream before relying on it.
Choose the 1080p frame rate and bitrate
Use a frame rate that matches the source and the motion you need. YouTube’s live-ingest settings recommend the following H.264 video bitrates; they are not recommendations for uploading an ordinary video file.
| Output | YouTube H.264 recommended video bitrate | YouTube H.264 minimum video bitrate | GOP for a two-second interval |
|---|---|---|---|
| 1080p at 30 fps | 10 Mbps | 5 Mbps | 60 frames |
| 1080p at 60 fps | 12 Mbps | 6 Mbps | 120 frames |
These are YouTube’s published live-encoder settings, accessed in 2026. They are ingest recommendations, not a promise that a particular VPS can encode the video or maintain the connection. Audio and protocol overhead add to the total outbound rate, so test sustained capacity with headroom rather than treating the video bitrate as the entire network requirement.
YouTube recommends constant bitrate (CBR), a two-second keyframe interval, and says not to exceed four seconds. It lists H.264, H.265 (HEVC), and AV1 as supported video codecs, up to 60 fps; H.264 is used in the example because FFmpeg builds commonly expose it through libx264, but confirm your build. YouTube recommends RTMPS for encrypted transport to and through Google’s servers. For stereo audio, its settings list AAC or MP3, 44.1 kHz, and 128 kbps. For SDR, use Rec. 709 and 8-bit color.
Recommended Free Tools
#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 YouTube Live and protect the stream key
- In YouTube Live Control Room, create or select a live stream and retrieve the server URL and stream key using YouTube’s Create a YouTube live stream with an encoder workflow.
- Treat the stream key as a password. Do not put a real key in a public script, source repository, screenshot, or unprotected log. The example below expects it in the
YOUTUBE_STREAM_KEYenvironment variable; for production, inject it through a secret store or a protected service-manager environment. - If the key is exposed, reset it in Live Control Room. YouTube documents the process in Manage live stream settings.
The example uses YouTube’s RTMPS ingest hostname in the output URL. If your Live Control Room provides a different server URL for your stream, use the URL YouTube supplies and preserve the key’s secrecy.
Install and check FFmpeg capabilities
The command requires an FFmpeg build with the libx264 encoder, AAC encoding, FLV muxing, and RTMPS protocol support. Build options vary, so check the installed binary rather than assuming those components exist:
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.
ffmpeg -encoders— look forlibx264and an AAC encoder.ffmpeg -muxers— confirm the FLV muxer is listed.ffmpeg -protocols— confirm RTMPS support is available.
FFmpeg’s available options depend on the installed build and version. Its command-line documentation and documentation index describe the options and protocols.
Stream a prerecorded file at 1080p30
This illustrative command takes a local file as input and targets 1080p30 H.264 with YouTube’s recommended 10 Mbps video bitrate. Replace /path/to/input.mp4 with the actual file path and provide the stream key securely in the environment. It is not a universal recipe for cameras, screen capture, network feeds, playlists, or files with unusual track layouts.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear 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.
ffmpeg -re -i /path/to/input.mp4
-map 0:v:0 -map 0:a:0?
-vf "scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,setsar=1,fps=30"
-c:v libx264 -preset veryfast -pix_fmt yuv420p
-b:v 10M -maxrate 10M -bufsize 20M -g 60 -keyint_min 60 -sc_threshold 0
-c:a aac -b:a 128k -ar 44100
-f flv "rtmps://a.rtmp.youtube.com/live2/${YOUTUBE_STREAM_KEY}"
What the important options do
-rereads a prerecorded file at its native rate instead of sending it as fast as storage allows. It is not a universal option for live-capture inputs.-map 0:v:0selects the first video stream.-map 0:a:0?selects the first audio stream if one exists; the question mark makes that mapping optional. A silent file still needs deliberate audio handling if the intended stream requires audio.- The scale-and-pad filter makes a 1920×1080 canvas while preserving the source aspect ratio. A source with a different shape gets bars rather than being stretched. Remove or adapt this filter for a correctly framed source.
-vf ... fps=30sets the output frame rate. Use the source’s intended frame rate where practical rather than inventing motion through unnecessary conversion.-b:v 10Msets the target video bitrate and-maxrate 10Mconstrains peaks near it.-bufsize 20Mrepresents a two-second video buffer at 10 Mbps. These are practical starting values, not YouTube-mandated buffer settings; confirm behavior for the installed encoder.-g 60and-keyint_min 60specify a 60-frame GOP at 30 fps, equivalent to two seconds.-sc_threshold 0disables scene-cut keyframe insertion so the interval stays regular.-preset veryfastis a starting point for software encoding, not a guarantee of adequate quality or CPU load. Watch encoder speed and server CPU use under your actual workload.-f flvselects the container used for this RTMP-family output. The destination includes the RTMPS server address and environment-provided key.
Adjust the command for 1080p60 or a different source
For 1080p60
Change the filter to fps=60, set -b:v 12M -maxrate 12M, and use -g 120 -keyint_min 120 for a two-second GOP. YouTube’s H.264 live-ingest recommendation is 12 Mbps at 1080p60. A 60 fps encode generally places a greater real-time encoding and bandwidth burden on the VPS than 30 fps; whether a host can handle it depends on its CPU allocation, input complexity, build, and any provider throttling.
For other inputs or codecs
Adapt input options, stream mapping, filters, and audio selection for a camera, desktop capture, multiple audio tracks, subtitles, or a generated source. Do not blindly apply -re to live devices. YouTube lists H.265 and AV1 as well as H.264, but the selected FFmpeg build must support the encoder and the VPS must handle its real-time workload. The YouTube bitrate table lists the same recommended 1080p30 and 1080p60 values for those codecs; choose based on actual compatibility and test results, not an assumption that a codec will work on every server.
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
Test the VPS and YouTube stream before relying on it
- Run the command with representative video motion and audio. YouTube Help says: “Make sure to test before you start your live stream. Tests should include audio and movement in the video similar to what you’ll be doing in the stream.”
- Watch FFmpeg’s output for encoding speed, errors, and whether it can keep up in real time.
- Check the VPS’s sustained outbound capacity to the ingest endpoint. A provider’s advertised port speed alone does not establish sustained throughput for this stream.
- Monitor YouTube’s stream health and any status messages in Live Control Room, then verify picture, sound, resolution, frame rate, and bitrate.
- Repeat after material changes to source, frame rate, codec, encoding preset, FFmpeg build, or server plan.
YouTube’s Streaming tips advise testing upload capacity and keeping total stream bitrate within available upload bandwidth. Leave room for audio and transport overhead, and monitor dropped frames and stream health during the test.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshoot common failures
- Authentication or connection failure: confirm the stream key and server URL against Live Control Room. If the key may have leaked, reset it rather than continuing with a compromised credential.
- Unknown encoder or missing muxer/protocol: inspect
ffmpeg -encoders,ffmpeg -muxers, andffmpeg -protocols. Install or build an FFmpeg version with the required components, then retest. - Stream starts but drops frames or falls behind: compare encoding speed and CPU use with real time, then test sustained egress. Reduce frame rate or bitrate if the VPS cannot maintain the target; retest and report the actual output resolution rather than describing a reduced-resolution stream as 1080p.
- Wrong aspect ratio, bars, or unexpected framing: inspect the input dimensions and adjust or remove the scale/pad filter. The supplied filter preserves the source shape and pads to 16:9 rather than stretching it.
- No audio or wrong audio: inspect the file’s streams and update mapping for the intended track. The optional audio mapping prevents a missing-audio input from failing solely at mapping, but it does not create audio.
- Unstable keyframes or stream health warnings: verify the output frame rate and GOP settings, then confirm the actual encoded bitrate and connection behavior in FFmpeg and Live Control Room.
Account for VPS limits and YouTube rules
No particular VPS provider, instance size, guaranteed egress, or end-to-end tested setup is established here. Before choosing a host or plan, check the sustained CPU allocation, outbound traffic limits and terms, and whether the server can encode your source at the target frame rate. The encoder settings alone cannot establish host suitability.
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.
YouTube’s encoder and bandwidth settings do not grant rights to the video or audio being streamed. Use material you own or are authorized to broadcast, and check YouTube’s current copyright and live-stream rules before streaming. A technically healthy signal can still be interrupted or restricted for content or account-policy reasons.
Or let it run in the cloud
If the goal is to keep uploaded videos live on a YouTube channel without maintaining a VPS and FFmpeg process, StreamNeo is a cloud alternative: 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 uploaded file as made, up to 4K 60fps, at one price per slot rather than quality tiers. It automatically recovers if YouTube drops the stream. The first day is free with no card. Monthly pricing is $9.99 per month.
StreamNeo streams to YouTube and plays uploaded videos; it is not a camera input. See StreamNeo for the service details, or start the free first day.
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.




