October 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 ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
DocumentaryTube
FFmpeg

How to Stream an MP4 to YouTube Live with FFmpeg—and Choose the Right Resolution

Use FFmpeg to encode an MP4 as one live feed to YouTube. Choose a sustainable resolution, set the bitrate and keyframes, and test the stream in YouTube Studio.

By DocumentaryTube Team 6 min read
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To stream an MP4 to YouTube Live with FFmpeg, create a YouTube live event, copy its stream URL and key from YouTube Studio, then have FFmpeg encode the file at one chosen resolution and send it to that destination. YouTube creates multiple playback formats from that incoming feed, so you generally do not need to send a separate FFmpeg stream for every viewer resolution.

What “different resolutions” means for a YouTube live stream

There are two separate resolutions to consider: the resolution FFmpeg sends to YouTube, and the playback resolutions YouTube makes available to viewers. For the usual live-streaming setup, choose one ingest resolution in FFmpeg. YouTube says it automatically transcodes a live feed into multiple output formats for viewers on different devices and networks. The FFmpeg command controls the feed sent to YouTube; it does not build YouTube’s playback ladder.

If you mean broadcasting distinct streams or creating separately scheduled live events at different resolutions, that is a different workflow. The instructions below cover one MP4 sent as one live feed.

Choose the outgoing resolution and bitrate

Pick a resolution and frame rate that the source file, computer, and sustained upload connection can all support. YouTube’s current H.264 recommendations are shown below; its support page has no displayed publication date and was accessed on 2026-10-03. These are encoder targets, not guarantees of the resulting picture quality. YouTube says recommended bitrates depend on codec, resolution, and frame rate.

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.
FFmpeg ingest output YouTube-recommended H.264 video bitrate
720p at 30 fps 8 Mbps
720p at 60 fps 8 Mbps
1080p at 30 fps 14 Mbps
1080p at 60 fps 17 Mbps
1440p at 30 fps 21 Mbps
1440p at 60 fps 34 Mbps

Leave room for bitrate fluctuations: YouTube’s streaming tips recommend approximately 20% upload headroom. A speed test is only a snapshot, so check the actual route and conditions where you plan to stream, and test the live feed. If the computer cannot encode in real time or the connection cannot sustain the selected output, lower the resolution, frame rate, or bitrate.

  • Source dimensions: Upscaling a small MP4 does not create detail that is absent from the source. Downscale when needed; avoid choosing an output solely because it is larger.
  • Aspect ratio: Keep the source shape, or decide deliberately whether to add padding or crop. A width-based scale may preserve a non-16:9 source as non-16:9.
  • Motion: Use a frame rate the source and encoder can support. Higher frame rates can need more encoding capacity and bandwidth.
  • HDR: The example below is for conventional SDR. YouTube’s current guidance recommends H.265 for HDR and says AV1 is not supported for HDR; check its current requirements rather than treating this H.264 recipe as an HDR setup.

Prepare the MP4 and YouTube event

  1. Create or select the event. In YouTube Studio, open Go Live and create or select the live event. In its Live Control Room settings, copy the stream URL and stream key. Use the values for that configured event, rather than an endpoint copied from an unrelated example.
  2. Inspect the MP4. Check its dimensions, frame rate, display aspect ratio, and whether it contains audio. Confirm that the FFmpeg build you plan to use supports the encoder and protocols you need.
  3. Choose one output profile. Set the target resolution and frame rate according to the source, computer, and connection. For a typical landscape SDR feed, choose a scaling or padding approach that gives the intended picture shape.
  4. Protect the key. Treat the stream key like a password. Do not place a real key in a public article, source repository, or screenshot. Reset it if it is exposed or compromised.

Use this adaptable FFmpeg command

This is an illustrative template, not a tested command. Replace input.mp4, the scale dimensions, bitrate, and destination with values for your file and YouTube event. The example targets 1080p at 30 fps with H.264 video and AAC audio:

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.
ffmpeg -re -stream_loop -1 -i "input.mp4" 
  -map 0:v:0 -map 0:a? 
  -vf "scale=1920:-2" 
  -c:v libx264 -preset veryfast -pix_fmt yuv420p 
  -b:v 14M -maxrate 14M -bufsize 28M -g 60 
  -c:a aac -b:a 128k -ar 44100 
  -f flv "$YOUTUBE_STREAM_URL"

Set YOUTUBE_STREAM_URL to the RTMP or RTMPS destination shown for your event, including the stream key in the format required by that destination. Keep it private. YouTube recommends RTMP or RTMPS ingestion and recommends RTMPS for encrypted transport.

What the important options do

  • -re reads the file at its native rate, producing a live-style feed instead of sending it as fast as the computer can process it.
  • -stream_loop -1 repeats the input indefinitely. Remove this option if the stream should end when the file ends.
  • -map 0:v:0 -map 0:a? selects the first video stream and makes the audio stream optional. Optional mapping does not create audio if the MP4 has none.
  • scale=1920:-2 sets the width to 1920 pixels and lets FFmpeg calculate an even height while preserving the source aspect ratio. Change the width for a lower output resolution; consider padding or cropping if a specific aspect ratio is required.
  • -c:v libx264 selects H.264 encoding, and -pix_fmt yuv420p is the pixel format used in this example.
  • -b:v 14M -maxrate 14M -bufsize 28M sets the example video bitrate and rate-control limits. The 14 Mbps value is the YouTube-recommended H.264 target for 1080p at 30 fps, not a universal bitrate.
  • -g 60 sets a 60-frame GOP. At 30 fps, that is a two-second keyframe interval. YouTube recommends keyframes every two seconds and no more than four seconds apart; adjust the frame count for other frame rates, such as 120 frames at 60 fps.
  • -c:a aac -b:a 128k -ar 44100 encodes AAC audio at the example bitrate and sample rate. YouTube supports AAC or MP3 audio over RTMP/RTMPS; 5.1 surround is supported only with AAC.
  • -f flv sets the output container for this RTMP-style example.

For a different resolution or frame rate, change the scale, bitrate, and GOP together. Consult YouTube’s current encoder table for the selected codec and output profile. The source may have a different frame rate from the intended output, so check the result rather than assuming a scaling change alone defines the full profile.

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.

Start the feed and check it before going live

  1. Run the command from a terminal where FFmpeg is installed and can read the MP4.
  2. Check the Live Control Room preview and confirm that the picture, framing, and intended audio are present.
  3. Test representative motion and audio, and monitor YouTube’s stream-health messages. YouTube specifically advises testing before starting the live stream.
  4. During the broadcast, keep an eye on the encoder process and stream health. If the feed becomes unstable, use the troubleshooting checks below before restarting at the same settings.

Troubleshoot common FFmpeg-to-YouTube problems

  • Dropped frames or unstable stream health: The total output may exceed the connection’s stable upload capacity, or the encoder may not keep up. Leave upload headroom, reduce bitrate, frame rate, or resolution, and test the actual stream again.
  • Unexpected framing or black bars: The MP4’s display aspect ratio may differ from the assumed output shape. Inspect it and choose whether to preserve the ratio, pad the image, or crop it. The example’s width-based scale can produce an output that is not 16:9.
  • No sound in the preview: Check whether the input actually contains an audio stream and confirm the Live Control Room preview. The optional audio map only prevents failure when audio is absent; it cannot supply a soundtrack.
  • “Unknown encoder” or command failure: FFmpeg builds vary. Check whether your installed build includes libx264 and the necessary protocol support, and verify the input path and stream mapping.
  • YouTube does not receive the feed: Re-copy the stream URL and key from the current event’s settings, confirm that the event is ready to receive an encoder feed, and check that the destination is entered in the required format. Reset an exposed key.

Keep the live content eligible and rights-cleared

Encoding settings do not grant permission to rebroadcast a video. Before streaming an MP4, make sure you have the necessary rights to its picture, music, and other included material, and follow YouTube’s live-streaming and monetization rules. A file you can play locally is not automatically cleared for public live distribution.

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

Or let it run in the cloud

If you want an uploaded video or playlist to keep a YouTube channel live without leaving FFmpeg, a computer, or a home internet connection running, StreamNeo runs the loop in the cloud. Upload the recording, add your YouTube stream key once, and go live. It plays uploaded videos, not a live camera feed.

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
  • Nothing has to stay on at home; the stream runs from the cloud.
  • Videos stream as uploaded, up to 4K 60fps, at one flat price per slot rather than quality tiers.
  • StreamNeo automatically recovers if YouTube drops the stream.
  • The first day is free with no card; one free day is available per account.

The monthly option is $9.99 per month. Start your free StreamNeo day.

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.

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.

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

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.

More from the Screening Room

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair 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.