The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
To stream a prerecorded 1080p video from a VPS to YouTube Live, create a YouTube live stream, securely provide its stream key to FFmpeg, and encode at a frame rate and bitrate your server can sustain. For H.264, YouTube recommends 10 Mbps at 1080p30 or 12 Mbps at 1080p60; the example below starts with 1080p30 and sends the video over RTMPS.
Before you start
This example sends a prerecorded file to YouTube Live. It assumes you have a VPS with FFmpeg installed, a video file accessible on that server, and permission to stream the content. A camera, desktop capture, playlist, or network feed needs a different FFmpeg input configuration.
- Check that the VPS has enough sustained outbound bandwidth for the video, audio, and protocol overhead. A provider’s advertised port speed alone does not establish that it can sustain the stream to YouTube’s ingest endpoint.
- Check that its CPU allocation and FFmpeg build can encode the source in real time. Capacity varies by VPS, source complexity, encoder build, and provider limits.
- Use content you have the rights to stream. A successful technical connection does not establish permission to broadcast a recording or eligibility for YouTube monetization.
The example is a configuration template, not a tested VPS benchmark or guarantee of performance.
Choose the 1080p frame rate and bitrate
YouTube Help’s live encoder settings, accessed in 2026, list these H.264 figures. They apply to live ingest, not YouTube’s separate recommendations for uploading ordinary videos.
#1 Best Overall
- Includes Raspberry Pi 5 with 2.4Ghz 64-bit quad-core CPU (8GB RAM)
- Includes 128GB Micro SD Card pre-loaded with 64-bit Raspberry Pi OS, USB MicroSD Card Reader
- CanaKit Turbine Black Case for the Raspberry Pi 5
- CanaKit Low Noise Bearing System Fan
- Mega Heat Sink - Black Anodized
| Output | YouTube-listed minimum H.264 video bitrate | YouTube-recommended H.264 video bitrate | GOP for the example |
|---|---|---|---|
| 1080p at 30 fps | 5 Mbps | 10 Mbps | 60 frames (2 seconds) |
| 1080p at 60 fps | 6 Mbps | 12 Mbps | 120 frames (2 seconds) |
For motion that does not require 60 fps, start with 30 fps: it has a lower recommended bitrate and generally places less encoding load on the VPS. Use 60 fps when the source is actually 60 fps and the server and connection can sustain the higher workload. These bitrate figures are YouTube’s operational settings, not a promise that a particular VPS can deliver them reliably.
YouTube recommends constant bitrate (CBR), a two-second keyframe interval, and says not to exceed four seconds. Its listed ingest protocols are RTMP and RTMPS; it recommends RTMPS, which encrypts data into and through Google’s servers. YouTube lists H.264, H.265/HEVC, and AV1, but this example uses H.264 for its FFmpeg encoder configuration. YouTube also lists AAC or MP3 audio, 44.1 kHz for stereo, and 128 kbps for stereo audio. For SDR, it recommends Rec. 709 and 8-bit color.
Rank #2
- Includes Raspberry Pi 5 16GB with 2.4Ghz 64-bit quad-core CPU (16GB RAM)
- Includes 128GB Micro SD Card pre-loaded with 64-bit Raspberry Pi OS, USB MicroSD Card Reader
- CanaKit Turbine Black Case for the Raspberry Pi 5
- CanaKit Low Noise Bearing System Fan
- Mega Heat Sink - Black Anodized
Create a YouTube stream and protect its key
- Open YouTube Live Control Room and create a live stream.
- Copy the stream URL and stream key shown for the stream. Treat the key like a password: do not put a real key in a public script, screenshot, article, shell history, or log.
- Make the key available to FFmpeg through a protected environment variable or a service manager’s protected environment. For a temporary shell session, set it without putting the secret directly in the command you save or share:
read -s YOUTUBE_STREAM_KEY export YOUTUBE_STREAM_KEYPaste the key when prompted, then press Enter. Protect access to the shell and process environment on the VPS. For a persistent service, use a protected configuration or secret store rather than committing the key to source control.
PerformancePC Slower Than It Used to Be?DriversOutdated Drivers Are Slowing You DownPerformanceWindows Errors? Fix Them Before They SpreadSpecial offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy. - If you believe the key has been exposed, reset it in YouTube Live Control Room and update the protected value used by FFmpeg.
The command below uses YouTube’s standard RTMPS ingest address with the key appended. If Live Control Room provides a different server URL for your stream, use that URL while keeping the key secret.
Rank #3
- CanaKit Raspberry Pi 5 Essentials Starter Kit
Run FFmpeg for a 1080p30 H.264 stream
Replace /path/to/input.mp4 with the file on your VPS. The command scales and pads the picture to a 1920×1080 canvas while preserving its aspect ratio, sets 30 fps, encodes H.264 at YouTube’s recommended 1080p30 video bitrate, and encodes stereo audio as AAC when an audio stream is present.
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 to adapt in the command
-rereads a prerecorded file at its native rate rather than sending it as fast as the server can process it. 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 present; the question mark makes that map optional. If the file is silent, decide whether that output is appropriate for your stream. Multiple audio tracks, subtitles, or generated video need deliberate input mapping and filter changes.- The scale-and-pad filter makes a 1920×1080 output without stretching a differently shaped source; it adds bars as needed. Remove or adapt it if your source is already framed as intended.
-b:v 10Msets the target video bitrate.-maxrate 10Mlimits peaks near that target, and-bufsize 20Mis a two-second video buffer at 10 Mbps. These buffer and preset choices are practical starting points, not YouTube requirements.-g 60sets a 60-frame GOP at 30 fps, which is two seconds.-keyint_min 60and-sc_threshold 0keep keyframe spacing predictable for this example.-preset veryfastis a starting point for software encoding, not a guarantee that a VPS can encode in real time. Watch CPU use and FFmpeg’s speed output before trying a slower preset or an available hardware encoder.
Adapt it for 1080p60
If the source and VPS can sustain 60 fps, change the filter’s fps=30 to fps=60, set both -b:v and -maxrate to 12M, and change -g and -keyint_min to 120. YouTube’s recommended H.264 live-ingest bitrate for 1080p60 is 12 Mbps. Do not assume an arbitrary VPS can encode this workload; verify speed and stream health under representative conditions.
Rank #4
- All-in-One Complete Kit: This SANOOV RPi 5 bundle comes with Raspberry Pi 5 4GB RAM single board, active cooler, durable ABS case and screwdriver. No extra parts needed, ready to use right out of the box for beginners and hobbyists
- Powerful Single Board Computer: Equipped with 4GB RAM and high-performance processor, delivers fast running speed for 4K playback, AI projects, programming and daily computing tasks. SANOOV for raspberry pi 5 4GB is equipped with broadcom 64 quad-core Arm Cortex A76 processor with gigabit ethernet and upgraded with IEEE 802.11ac Wi-Fi, Bluetooth 5.0 dual-band 2.4Ghz and 5Ghz and Power Over Ethernet (POE). Upgrading delivers 2-3 x speed vs Pi 4, redefining the experience
- Efficient Active Cooler: Effectively lowers operating temperature and prevents performance throttling. Runs quietly even under long-time heavy load, ensures stable operation all day long. SANOOV RPi 5 4GB kit offer an active cooler, which combines an aluminium heatsink with a high-performance PWM fan. Active cooler is fully compatible with the Pi OS, which can effectively reduce the temperature of RPi5 and ensure its good performance during long-term high load operation
- Sturdy ABS Protective Case: Well-fitted for Raspberry Pi 5 board, can be secured with 4 screws to effectively protect the Pi 5 motherboard from damage, reserves full access to all ports and buttons. SANOOV uses ABS material to produce the case, which has a softer texture and feel. Meanwhile, SANOOV case adopts a layered design for easy disassembly and installation. (Tip: The Case cannot install M.2 HAT Add on Board and Solid State Drive!)
- Wide Application & Full Compatibility: Seamlessly compatible with official OS and mainstream peripheral accessories for Raspberry Pi 5. Whether you are a beginner, student, electronics hobbyist or professional developer, this all-in-one kit meets your diverse needs. It excels in IoT projects, robotics design, retro gaming devices, home media servers and other DIY creations. Backed by a large global community, you can easily find guides, technical support and shared projects online
Confirm FFmpeg has the required support
FFmpeg options depend on the version and build installed on the VPS. The example requires the libx264 encoder, AAC encoding, FLV muxing, and RTMPS support. Check the local build before troubleshooting the command:
Recommended Free Tools
ffmpeg -encoders
ffmpeg -muxers
ffmpeg -protocols
Look for libx264 in the encoders, FLV in the muxers, and RTMPS support in the protocols. If a required component is absent, use an FFmpeg build that includes it or adapt the command to a codec and protocol your build supports and YouTube accepts.
Best Value
- 【What you Get】You will get 1*Pi 5 8GB Single Board,1*RasTech Case,1*Active Cooler,1*Screwdriver,1*Installation instructions,12-month free warranty, lifetime service, 24-hour prompt and friendly response.
- 【More Connectors】There are two USB 3.0 ports(5Gbps simultaneously) and two USB 2.0 ports, which triple total bandwidth ,support any combination of up to two cameras or displays. Peak SD card performance is doubled through support for the SDR104 high-speed mode. It provides a smooth desktop experience for you. Offer Gigabit Ethernet and a PCIe interface, along with dual-band Wi-Fi and Bluetooth 5.0/BLE wireless capability. The RasTech Pi 5 Kit use the new 27W 5.1V 5A USB-C power connector.
- 【 Support Dual 4Kp60 Display 】Each of the two microHDMI sockets can control a 4K display at 60 Hertz, now support HDR, offering super HD video for media streaming projects. RPi 5 is the first RPi model that comes with a PCI Express port (PCIe 2.0 x1 with 500 MB/s) to attach SSDs (requires separate M.2 HAT).
- 【 Excellent Chips And Applications】Pi 5 is a full-size Pi computer using silicon built in-house at Pi. The RP1 “southbridge” provides the bulk of the I/O capabilities for Pi 5. Pi 5 is more friendly and convenient in the development of Internet of Things, Web development, machine identification, automatic control and other electronic equipment applications and network.
- 【 Faster CPU, Better GPU 】 Pi 5 features a Broadcom BCM2712 64-bit quad-core Arm Cortex-A76 processor running at 2.4GHz, it delivers a 2–3× increase in CPU performance relative to RaspberryPi 4. The 800MHz VideoCore VII GPU is compatible to OpenGL ES 3.1 and Vulkan 1.2, substantial uplift in graphics performance. Pi 5 Offers lightning-fast CPU speed, a PCI Express interface, a Real Time Clock (RTC) and a power button and runs significantly cooler than Pi 4.
Test the stream and monitor it
- Start FFmpeg and check its output for connection errors, encoding speed, dropped frames, and the actual output rate.
- Confirm the sent resolution and frame rate are 1920×1080 and 30 fps (or the 60 fps settings you chose), and that the video bitrate is near the target.
- Check YouTube’s stream health and verify that picture and audio are arriving as expected before relying on the stream.
- Test with representative 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.”
- Check sustained outbound capacity to the ingest endpoint, not just a short speed-test result. The stream’s total bitrate includes audio and protocol overhead as well as video, so leave bandwidth headroom.
Troubleshoot common failures
| Symptom | Likely checks and fixes |
|---|---|
| YouTube does not receive the stream | Verify the stream URL and key, confirm the stream is active in Live Control Room, and inspect FFmpeg’s connection output. If the key may be wrong or exposed, reset it and update the protected value. |
| FFmpeg reports an unknown encoder, muxer, or protocol | Inspect ffmpeg -encoders, ffmpeg -muxers, and ffmpeg -protocols. The installed build may lack libx264, AAC, FLV, or RTMPS support; use a compatible build or adjust to supported options. |
| FFmpeg runs slower than real time or drops frames | Check VPS CPU use, source complexity, and provider throttling. Try a faster encoding preset or reduce the workload, then repeat the test. A 60 fps stream increases encoding and bandwidth demands relative to the 30 fps example. |
| Stream health reports instability or frames arrive late | Check sustained VPS egress to YouTube and allow headroom for audio and overhead. Confirm that the server can maintain the selected bitrate; reduce frame rate or bitrate if it cannot, then test again. |
| Output is not 1080p or the image looks distorted | Check the input mapping and filter chain. The example’s scale-and-pad filter preserves aspect ratio on a 1920×1080 canvas; adjust it if the source is already correctly framed or has special dimensions. |
| No audio is heard | Check whether the input contains an audio stream and whether -map 0:a:0? selects the intended track. The optional map prevents failure for a silent file; it does not create audio. |
Or let it run in the cloud
If your goal is to keep a YouTube channel live from uploaded videos, StreamNeo is an alternative to operating FFmpeg on a VPS: it runs the stream in the cloud, so nothing has to stay on at home. Upload a recording or build a playlist, add your YouTube stream key once, and go live. It plays uploaded videos, not a live camera feed.
- One flat price per slot for any quality up to 4K 60fps as uploaded, with no re-encode or quality tiers.
- Automatic recovery if YouTube drops the stream.
- The first day is free with no card; one free day per account.
Monthly service is $9.99 per month. Visit StreamNeo or start the free 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.

