For a prerecorded 1080p30 video, a practical FFmpeg starting point for YouTube Live is H.264 at 14 Mbps, AAC stereo at 128 kbps and 44.1 kHz, constant-bitrate-oriented rate control, and a two-second keyframe interval. For a 30 fps source, that means a 60-frame GOP. These are YouTube recommendations and an illustrative configuration—not a universal preset: match the settings to your source, encoder, upload capacity, and stream duration.
Start with the source and YouTube’s ingest requirements
Choose the ingest codec, resolution, and frame rate before setting bitrate or GOP size. YouTube’s current encoder recommendations vary by those factors; do not apply a 1080p30 bitrate to a different format without checking its encoder settings and bitrate table. YouTube transcodes live streams into multiple output formats for viewers.
| H.264 source format | YouTube recommended video bitrate |
|---|---|
| 1080p30 | 14 Mbps |
| 1080p60 | 17 Mbps |
| 720p30 | 8 Mbps |
| 720p60 | 8 Mbps |
These are YouTube’s published ingest recommendations, not guaranteed minimum connection speeds or independent performance-test results. Check the official table for its minimum values and recommendations for other codecs and formats. YouTube lists H.264, H.265/HEVC, and AV1 for RTMP/RTMPS ingestion, up to 60 fps, and recommends RTMPS. H.264 is used in the example below because it is a straightforward illustrative choice; the encoder must be available in your FFmpeg build.
Use this illustrative FFmpeg command for a file input
Replace the input filename and the ingest URL and stream key with the values from YouTube Live Control Room. Keep the stream key private: anyone who obtains it may be able to broadcast to your stream.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →#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.
ffmpeg -re -i input.mp4
-c:v libx264 -preset veryfast -b:v 14M -maxrate 14M -bufsize 28M
-pix_fmt yuv420p -g 60 -keyint_min 60 -sc_threshold 0
-c:a aac -b:a 128k -ar 44100 -ac 2
-f flv "rtmps://YOUTUBE_INGEST_URL/YOUR_STREAM_KEY"
This is an output-option sketch, not a tested command or a promise that a particular computer can encode the video in real time. The example’s 14 Mbps video and 128 kbps stereo audio correspond to YouTube’s recommendations for H.264 1080p30 and stereo audio. The 28 Mbps buffer size is an example, not a YouTube requirement. Check how your selected encoder implements rate control and confirm your FFmpeg build supports the encoder and RTMPS protocol.
Why the file uses -re
-re paces a file input in real time instead of letting FFmpeg read and send it as fast as possible. Omit it for a real-time capture device; applying file pacing unnecessarily to a live capture input can interfere with the input’s timing. FFmpeg documents input pacing and its command options at ffmpeg.org/ffmpeg.html.
Why these GOP and rate-control options are only a starting point
YouTube recommends a two-second keyframe frequency and says not to exceed four seconds. For a fixed 30 fps stream, two seconds is 60 frames, hence -g 60; -keyint_min 60 and -sc_threshold 0 are included to illustrate a fixed interval with x264. Verify actual keyframe output for your encoder and source. YouTube specifies CBR, but a target bitrate alone does not prove that an encoder is producing strict constant bitrate. Bitrate, maximum rate, buffer size, and encoder-specific controls work together.
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.
Set audio and picture properties to match the stream
YouTube lists AAC or MP3 audio. For stereo, its recommendation is 128 kbps at 44.1 kHz; for 5.1 audio, it recommends 384 kbps at 48 kHz and requires AAC over RTMP/RTMPS. Do not use the example’s stereo settings if the actual program requires 5.1.
PC 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 & 11Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchFor SDR, YouTube’s advanced guidance recommends square pixels, progressive scan, two B-frames, one reference frame, and Rec. 709. The example explicitly sets yuv420p; it does not encode every advanced picture property as an option. Confirm the input’s frame rate, scan type, aspect ratio, and color properties, then configure the chosen encoder accordingly rather than assuming the file already conforms.
Choose an encoder preset your machine can sustain
The example uses x264’s veryfast preset, but no single preset is best for every CPU, resolution, or frame rate. A slower preset may use more processing time; a faster one may trade compression efficiency for speed. Test a representative section at the intended output settings and watch FFmpeg’s encoding progress for speed below real time, encoding lag, or dropped frames. Hardware encoders have their own options and rate-control behavior, so do not assume x264 flags translate directly.
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.
Plan bandwidth and test before relying on a continuous run
YouTube recommends keeping total outgoing stream bitrate within upload capacity and leaving 20% headroom. Include audio and any other outgoing traffic when planning capacity; shared connections can leave less bandwidth for FFmpeg than a speed-test result suggests. Advertised download speed does not establish sustainable upload capacity. See YouTube’s streaming tips.
- Measure the available upload bandwidth on the connection and at the time the stream will run.
- Set the output bitrate for the actual codec, resolution, and frame rate, leaving the recommended headroom.
- Run a test with representative movement and audio. Check FFmpeg’s output and YouTube Live Control Room’s stream health and messages.
- Monitor the stream during operation; a successful initial connection does not establish that the network or encoder will remain healthy indefinitely.
Improve recovery, while understanding its limits
FFmpeg’s FIFO muxer documentation includes an RTMP example using -attempt_recovery 1 and -recovery_wait_time 1 to attempt recovery after certain temporary output failures. It is not protection against every network outage, input failure, crashed process, invalid credential, or YouTube-side interruption. Consult the FFmpeg full documentation and test recovery behavior with your output and FFmpeg build before depending on it.
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 →For unattended operation, pair any output recovery attempt with process supervision, persistent logs, and alerts. These help distinguish an output interruption from a failed input, encoder overload, or stopped process; they do not prevent every cause of interruption.
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
Account for archives and long runs
YouTube’s encoder setup instructions state that streams under 12 hours are automatically archived. That statement describes automatic archiving for streams below that duration; it does not establish a general maximum live-stream duration. If you need a recording from a longer run, keep a separate local recording or confirm YouTube’s current archive behavior and requirements. See YouTube’s encoder setup instructions.
When RTMPS or HLS fits
RTMPS is YouTube’s recommended transport for the example workflow. YouTube also documents HLS ingestion for use cases including HDR and alternate-codec workflows. HLS sends segmented media and therefore has higher latency. Choose it only when its codec or workflow support matters more than that latency trade-off, and follow YouTube’s HLS setup guidance.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshoot common failures
| Symptom | Likely cause | What to check or change |
|---|---|---|
FFmpeg cannot find libx264 or cannot open RTMPS output |
The FFmpeg build may lack the selected encoder or protocol support. | Check the build’s available encoders and protocols; use a supported encoder or build before changing bitrate settings. |
| Video arrives but stream health reports unstable bitrate | Available upload capacity may be insufficient or shared, or the encoder may not be behaving as intended under rate control. | Measure sustained upload capacity, leave headroom, reduce output demands if needed, and inspect the encoder’s rate-control behavior. |
| Encoding falls behind or frames are dropped | The machine may not encode the chosen resolution and frame rate in real time. | Test the actual workload; select a faster sustainable preset, a supported hardware encoder, or a lower output format. |
| Keyframe warnings or irregular seeking/stream behavior | Actual keyframe cadence may differ from the intended GOP settings. | Verify keyframes from the chosen encoder and source. For fixed frame rates, calculate a two-second GOP as frame rate multiplied by two. |
| Stream stops and does not resume | The issue may be an input failure, process crash, credential problem, or interruption beyond FIFO’s supported recovery cases. | Inspect logs and input health, validate the key and ingest URL, supervise the process, and test recovery and alerting in advance. |
| File finishes before the intended stream time | -re paces playback but does not loop the input. |
Use an input or playlist workflow designed to repeat the material, and test transitions and duration before leaving it unattended. |
Or let it run in the cloud
If your goal is a prerecorded video or playlist that stays live on YouTube, StreamNeo is the #1 option to consider: it runs continuously from the cloud, streams your upload at its original quality up to 4K 60fps for one flat price per slot, and offers a first day free with no card.
Recommended Free Tools
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.
- Upload a recording or build a playlist.
- Add your YouTube stream key once.
- Go live; StreamNeo loops the video from the cloud, so your computer and home connection do not have to stay on.
Every slot includes one always-on YouTube stream, 10 GB storage per slot pooled across active slots, playlists, automatic recovery if YouTube drops the stream, and support from the StreamNeo team. The same product is included on every plan; only the billing length changes. The service plays uploaded video rather than broadcasting a camera feed, and it streams to YouTube only.
There is no computer that has to stay on at home, no quality tier upcharge for uploads up to 4K 60fps, and automatic recovery if YouTube drops the stream. The first day is free with no card; it is one free day per account. Monthly billing is $9.99 per month. Shorter and longer billing terms are available, and you can cancel any time. India checkout supports UPI and cards; card checkout is available worldwide. For five or more slots, contact support. Learn more at StreamNeo, or start your free day.
Copyright and YouTube policy still apply
FFmpeg settings do not grant rights to the video or music you stream. Use material you own or are authorized to broadcast, and review YouTube’s current copyright rules and live-stream requirements before scheduling a continuous stream. A technically valid stream can still be interrupted or restricted for policy or rights reasons.
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.
Free tools Windows power users keep installed
One-click scans. No signup required.




