Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
FFmpeg

How to Configure FFmpeg to Stream 1080p Video to YouTube from a VPS

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

To stream a prerecorded 1080p video from a VPS to YouTube Live, run FFmpeg on the server, encode to a frame rate and bitrate YouTube accepts, and send the output to YouTube’s RTMPS ingest address using a protected stream key. For H.264, YouTube recommends 10 Mbps at 1080p30 or 12 Mbps at 1080p60; the VPS must also encode in real time and sustain enough outbound bandwidth.

What this setup does—and what it assumes

A VPS is the remote machine that runs FFmpeg. The example below takes a video file already stored on that server, encodes it as H.264 at 1080p30, and sends it to YouTube Live. It is a configuration template, not a tested VPS performance guarantee.

A camera, desktop capture, network feed, playlist, or generated video needs a different input setup. The command’s file input and video/audio mapping are not universal for those sources. VPS providers differ in CPU allocation, outbound traffic limits, and throttling, so verify that your chosen instance can sustain the job rather than assuming its advertised port speed is guaranteed egress.

Choose the YouTube ingest settings

YouTube’s live-encoder recommendations are distinct from its recommendations for uploading an ordinary video. For an H.264 live stream, use the frame rate that matches the material and capacity you can sustain:

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.
Output YouTube-recommended H.264 video bitrate YouTube-listed minimum H.264 video bitrate GOP at the recommended 2-second keyframe interval
1080p at 30 fps 10 Mbps 5 Mbps 60 frames
1080p at 60 fps 12 Mbps 6 Mbps 120 frames

The bitrate figures are YouTube’s live-ingest settings, current on its settings page when accessed in 2026; they are not independent performance measurements. YouTube recommends constant bitrate (CBR), a 2-second keyframe interval, and says not to exceed 4 seconds. The table’s GOP values follow from the 2-second interval at each listed frame rate.

Frame rate and encoding load

Use 30 fps for a 30 fps source unless there is a reason to preserve 60 fps motion. A 60 fps output requires twice as many frames per second to process and, for H.264, YouTube’s recommended video bitrate is higher. Neither setting proves a particular VPS can encode the material in real time; confirm it under load.

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.

Codec, audio, and color

YouTube lists H.264, H.265 (HEVC), and AV1 for ingest, up to 60 fps, AAC or MP3 audio, and 44.1 kHz for stereo. Its listed stereo audio bitrate is 128 kbps. The command below uses H.264 and AAC for a straightforward baseline. YouTube recommends Rec. 709 and 8-bit color for SDR. AV1 or H.265 may be options only if the installed FFmpeg build and the rest of your workflow support them.

RTMPS and stream key

YouTube lists RTMP and RTMPS and recommends RTMPS; it encrypts data into and through Google’s servers. Treat the stream key as a password. Do not put a real key in published code, a screenshot, source control, or a log. If it is exposed, reset it in YouTube Live Control Room.

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.
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.

Create a YouTube stream and prepare the VPS

  1. Create the live stream: In YouTube Live Control Room, create or select a live stream and obtain its stream URL and stream key. The RTMPS address used by the example is YouTube’s rtmps://a.rtmp.youtube.com/live2/ ingest endpoint; append the key as shown.
  2. Place the input file on the VPS: Confirm its path and that the account running FFmpeg can read it. The example expects /path/to/input.mp4; replace that placeholder.
  3. Check FFmpeg capabilities: On the VPS, run ffmpeg -encoders, ffmpeg -muxers, and ffmpeg -protocols. Confirm the build includes libx264, AAC encoding, FLV muxing, and RTMPS support. Available options depend on the installed build and version.
  4. Provide the key securely: Set YOUTUBE_STREAM_KEY through a protected service-manager environment or secret store in production. Avoid entering a real key directly in a command that may be saved in shell history. The variable reference in the command is illustrative; a deployment must actually provide the variable to the FFmpeg process.

Run an illustrative 1080p30 FFmpeg command

This template reads a prerecorded file at its native rate, scales and pads it to a 1920×1080 canvas, encodes H.264 at YouTube’s recommended 1080p30 live bitrate, and sends it to the RTMPS endpoint. Replace the input path and supply the key securely before running it.

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

  • -re paces a prerecorded file at its native rate. It is not a universal option for live capture inputs.
  • -map 0:v:0 selects the first video stream. -map 0:a:0? selects the first audio stream if present; the question mark makes that mapping optional. A silent file may therefore produce no audio, so choose and test the intended audio behavior rather than assuming sound will be present.
  • The scale-and-pad filter fits the picture inside 1920×1080 without changing its aspect ratio, then adds bars where needed. setsar=1 sets a square-pixel sample aspect ratio, and fps=30 sets the output rate. Remove or adapt the filter if the source is already correctly framed or if your source-specific workflow needs different handling.
  • -b:v 10M sets the target video bitrate; -maxrate 10M limits peaks near that target. -bufsize 20M represents a two-second video buffer at 10 Mbps. These are practical starting settings, not separate YouTube requirements; confirm their behavior with the encoder build in use.
  • -g 60 -keyint_min 60 -sc_threshold 0 sets a 60-frame GOP at 30 fps—two seconds—and avoids shorter scene-change keyframe intervals in this template.
  • -preset veryfast is a starting point for software encoding, not a guarantee about quality or capacity. Observe CPU use and whether encoding keeps pace before considering a slower preset or available hardware encoding.
  • -c:a aac -b:a 128k -ar 44100 encodes audio as AAC at 128 kbps and 44.1 kHz. The example is for stereo audio; adapt channel handling when the source differs.
  • -f flv selects the container used for this RTMP-family output. Confirm FLV muxing and RTMPS protocol support in the installed build.

Adapt the command for 1080p60

If the source and VPS can sustain 60 fps, change the frame-rate filter to fps=60, set -b:v 12M -maxrate 12M, and change the GOP options to -g 120 -keyint_min 120. The resulting 120-frame GOP is two seconds at 60 fps. Do not select 60 fps solely because the output is 1080p: it requires more encoding work and upload capacity, and a 30 fps source does not gain real motion detail from being relabeled at 60 fps.

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

Test before relying on the stream

  1. Start with the intended file, audio, frame rate, and filters so the test resembles the eventual stream.
  2. Watch FFmpeg’s output for connection errors and encoding speed. The encoder needs to keep pace with real time; sustained lag or dropped frames indicates the current settings or VPS capacity are not working reliably.
  3. Check YouTube’s stream health and messages in Live Control Room, and verify the received resolution, frame rate, and bitrate.
  4. Verify sustained outbound capacity to the ingest endpoint, not just the VPS plan’s advertised port speed. Total stream bitrate includes audio and protocol overhead in addition to video, so leave headroom.

YouTube Help’s “Choose live encoder settings, bitrates, and resolutions” 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.”

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

Troubleshoot common failures

Symptom Likely cause What to check or change
YouTube does not receive a stream Wrong stream key or server URL, unavailable RTMPS support, or a connection problem Confirm the key and endpoint in Live Control Room, check that the FFmpeg build supports RTMPS, and inspect FFmpeg’s connection error output. Reset an exposed or compromised key in Live Control Room.
FFmpeg reports an unknown encoder, muxer, or protocol The installed build lacks the requested component Inspect ffmpeg -encoders, ffmpeg -muxers, and ffmpeg -protocols; use a build that includes the needed support or select a supported configuration.
Encoding falls behind or frames drop The VPS cannot encode the selected resolution, frame rate, or preset in real time, or capacity is constrained Check encoder speed and CPU use. Retest with 30 rather than 60 fps, or reduce bitrate while staying within the appropriate YouTube settings. If you lower resolution, label the output accurately rather than calling it 1080p.
Stream health warns about bitrate or interruptions Insufficient or inconsistent sustained outbound capacity, including overhead Measure sustained egress to the ingest endpoint and retain headroom for audio and protocol traffic. Do not treat a nominal VPS port speed as proof of sustained capacity.
Picture is stretched, cropped, or has unexpected bars The source aspect ratio does not match the 16:9 output canvas, or the scale/pad filter is inappropriate Check the input dimensions and aspect ratio. The provided filter preserves the image shape and adds bars to fit; modify it if intentional cropping or a different canvas is required.
The stream has no audio The source has no audio stream, or the selected mapping is not the intended track Inspect the file’s streams, adjust audio mapping for its track layout, and test with representative audio. The optional audio map prevents a missing stream from causing an input-map failure; it does not create audio.

Protect the stream and the content

The stream key grants access to your YouTube ingest, so restrict access to the process and its configuration, avoid exposing it in logs, and rotate it if compromised. For prerecorded material, confirm you have the rights and permissions needed to broadcast it. A successful FFmpeg connection does not establish that the content complies with YouTube’s copyright rules or other channel policies.

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.

FFmpeg’s command-line options and supported codecs and protocols vary with the installed build. Consult the documentation for the version actually deployed when changing encoders, filters, or transport options.

Or let it run in the cloud

If your goal is an always-on YouTube stream from uploaded videos, StreamNeo is an alternative to managing FFmpeg on a VPS: upload a recording or build a playlist, add your YouTube stream key once, and go live. It loops the uploaded video from the cloud, so nothing has to stay on at home. It accepts uploads as made up to 4K 60fps at one flat price per slot, automatically recovers if YouTube drops the stream, and the first day is free with no card. The monthly option is $9.99 per month.

See StreamNeo or start the free first 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.

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.

Read next

Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

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.