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

To stream a prerecorded 4K video to YouTube Live with FFmpeg, create a live event in YouTube Studio, copy its server URL and stream key, then send the file at real-time speed with FFmpeg’s -re input option. For H.264, YouTube recommends 42 Mbps at 4K/30 fps or 50 Mbps at 4K/60 fps, with a two-second keyframe interval. Treat the command below as a template: check your file, FFmpeg build, upload capacity, and YouTube’s stream health before relying on it.

Before you start

  • A prerecorded video file with known resolution, frame rate, audio tracks, and color format.
  • An FFmpeg build that includes the video encoder and audio encoder you plan to use. Availability depends on how FFmpeg was built.
  • A YouTube channel and access to YouTube Studio’s Live Control Room to create an event and retrieve its stream URL and key.
  • An internet connection with stable upload capacity comfortably above the selected video bitrate. Measure it rather than assuming your advertised connection speed is sustained upload speed.

This is a live ingest workflow, not a video upload. The bitrate recommendations below are for sending a live stream to YouTube; they are not export settings for uploading a video file.

Choose the 4K settings

YouTube’s live-encoder guidance lists the following 4K/2160p ingest bitrates. Choose based on both codec and frame rate; these figures are recommendations and minimums, not a promise that a particular connection or encoder will deliver a stable stream. YouTube’s live encoder settings are the reference for these values.

Codec Frame rate Minimum bitrate Recommended bitrate
H.264 30 fps 11 Mbps 42 Mbps
H.264 60 fps 14 Mbps 50 Mbps
AV1 or H.265/HEVC 30 fps 8 Mbps 30 Mbps
AV1 or H.265/HEVC 60 fps 10 Mbps 35 Mbps

Match the output to the source

Use the file’s actual frame rate where practical instead of converting 30 fps footage to 60 fps without a reason. If you choose 30 fps, YouTube’s recommended two-second keyframe interval corresponds to a 60-frame GOP; for 60 fps it corresponds to 120 frames. YouTube recommends a two-second interval and says not to exceed four seconds.

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.
#1 Best Overall
Sale
Capture Card, 4K HDMI Video Capture Card, Game Capture Card, 1080P 60FPS Video Capture Device, HDMI to USB 3.0 Capture Card for Streaming, Work with Camera/Xbox/PS4/PS5/PC/OBS
  • 【1080P HD High Quality】Capture resolution up to 1080p for video source and it is ideal for all HDMI devices such as PS4, PS3, Xbox One, Xbox 360, Wii U, DVDs, DSLR, Camera, Security Camera and set top box. Note: Video input supports 4K30/60Hz and 1080p120/144Hz. Does not support 4K120Hz/144Hz. Output supports up to 2K30Hz.
  • 【Plug and Play】No driver or external power supply required, true PnP. Once plugged in, the device is identified automatically as a webcam. Detect input and adjust output automatically. Won't occupy CPU, optional audio capture. No freeze with correct setting.
  • 【Compatible with Multiple Systems】suitable for Windows and Mac OS. High speed USB 3.0 technology and superior low latency technology makes it easier for you to transmit live streaming to Twitch, Youtube, Facebook, Twitter, OBS, Potplayer and VLC.
  • 【HDMI LOOP-OUT】Based on the high-speed USB 3.0 technology, it can capture one single channel HD HDMI video signal. There is no delay when you are playing game live.
  • 【Support Mic-in for Commentary】Rybozen capture card has microphone input and you can use it to add external commentary when playing a game. Please note: it only accepts 3.5mm TRS standard microphone headset.

Account for audio and color

YouTube lists AAC or MP3 for audio; its stereo guidance specifies 128 kbps at 44.1 kHz. For 5.1 surround it lists 384 kbps at 48 kHz, with 5.1 over RTMP/RTMPS supported only for AAC. The example command uses AAC stereo settings.

For SDR, YouTube’s advanced recommendations specify Rec. 709 and 8-bit color. For HDR, YouTube recommends H.265/HEVC and 10-bit; it says AV1 is not supported for HDR. An encoder and transport path must support the intended HDR workflow. The example below uses H.264 with yuv420p, a compatibility-oriented SDR template; it does not preserve HDR as HDR.

Plan for normal latency

YouTube’s low-latency optimization is unavailable for 4K/2160p, which is set to normal latency. If minimal delay is essential, reconsider whether 4K is necessary for this broadcast.

Rank #2
4K Video Capture Card, HDMI to USB Capture Card 1080P for Streaming, Recording, Gaming, Compatible with Nintendo Switch, PS5, Xbox
  • 【1080P 30FPS Full HD Recording】The HDMI capture card connects to your video source and computer, and captures high-definition video up to 1080p 60fps
  • 【HDMI Video Capture】Based on high-speed USB 2.0 technology, you can capture a high-definition HDMI video and HDMI audio signal of a signal channel, sending audio and video signals to computers /pc. The gaming capture card is suitable for devices with HDMI output, such as devices for PS4, for Xbox one, for Wii U and for Switch
  • 【Screen Sharing for Meetings】The video capture card is a fast, familiar and economical way to share content in conference rooms and online meetings. Connect to presentations without software, just connect to a laptop or tablet via HDMI to start sharing
  • 【Plug and Play】This USB capture card does not need to install a driver, so you can use the built-in functions of the current software to get a seamless experience. Because the video capture device is compatible with most third-party software, it can be plug-and-play for Windows, for Ma OS X, and for Linux. The USB2.0 high-speed transmission port makes it easier for you to have real-time streaming for Twitch, for Youtube, for OBS, for Potplayer and for VLC
  • 【Compact & Portable】The capture card is small size & easy to carry, convenient for outdoor and indoor live broadcasting. We provide 30 days no question asked money back and lifetime technical support, if you have any problem, please feel free to contact us

Create the YouTube live event and protect the stream key

  1. Open YouTube Studio and go to Live Control Room. Create or select the live stream/event you intend to use.
  2. Copy the stream URL and stream key shown for that stream. YouTube’s setup guidance describes entering the URL and key in the encoder. See YouTube’s live stream settings.
  3. Use the exact destination and protocol shown in Live Control Room. YouTube recommends RTMPS for encrypted transport. Do not assume the illustrative RTMP URL in the command is the URL for your event.
  4. Keep the stream key secret, like a password. Do not put it in a public script, screenshot, shared terminal log, or source repository. If it is exposed, replace or reset it in YouTube Studio before broadcasting.
  5. Check the event’s resolution behavior. YouTube normally detects resolution and frame rate; a custom stream key can enable manual selection. If the detected output is wrong, compare the actual encoded output and the selected stream settings before changing multiple variables.

Check FFmpeg and the input file

Inspect the file before choosing a command. Confirm it contains the expected video stream, frame rate, dimensions, audio, and SDR/HDR format. Also confirm your FFmpeg build has the encoder named in the command. The exact capabilities vary by build; a command using libx264 will fail if that encoder is unavailable.

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

FFmpeg usually processes a file as quickly as it can. For a prerecorded file being sent as a live source, -re before the input paces reading at the file’s native rate. FFmpeg’s official muxer documentation uses this pattern in its RTMP example, alongside H.264, AAC, and FLV output: FFmpeg formats documentation.

Send a 4K/30 fps H.264 stream

This template assumes an SDR-compatible H.264/AAC workflow, a 30 fps output, a first audio stream if present, and a destination URL assembled from the server address and your private key. Replace the placeholders and verify the options against your installed FFmpeg build before using it.

Rank #3
Sale
Guermok Video Capture Card, 4K USB3.0 HDMI to USB C, 1080P 60FPS & 2K 30FPS
  • 【1080P 60FPS Video Capture Card】 This HDMI game capture card is based on USB3.0 high speed transmission port, input resolution up to 4K@30HZ, output resolution up to 2K@30Hz or 1920×1080@60Hz. Type c and USB interface can meet most of the devices in daily life. Easily meet the online capture, real-time recording, online meetings, live gaming and other functions, so you have a better visual enjoyment. Note: For capture use only; requires capture software to function and is not intended for direct screen casting to a monitor or TV
  • 【Ultra Low Latency Screen Sharing】 HDMI capture card is made of good quality aluminum alloy with strong heat dissipation, allowing you to enjoy ultra low latency while live gaming or video recording or live streaming, avoiding blue screens and lag. This HDMI to USBC capture card supports easy recording of good quality audio or HD video and transferring it to your computer or streaming platform, allowing you to record 60 fps HD video directly on your hard drive and real-time preview
  • 【Plug and Play, Easy to Carry】 This HDMI 1080P video capture card does not require any additional drivers or external power supply, just plug and play for fast capture. The capture card is small and lightweight, so you can put it in your bag for emergencies, making it very portable for outdoor live streaming. It's also a great way to share content in game recording, video conference, video recorder and online teaching
  • 【Wide Compatibility USB Capture Card】 Easily streams to Facebook, Youtube or Twitch. With the connection, this HDMI to USB C/3.0 video capture devices can be working on several Operating Systems and various software: Windows 7/ 8/ 10, Mac OS or above, Linux, Android, Laptop, Xbox One, PS3/PS4/PS5, Camera, DVDs, Set Top Box, Webcame, DSLR, Switch/Switch 2, TV BOX, HDTV, Potplayer/VLC, ZOOM, OBS Studio etc.
  • 【Package Content & Note】 1x HD Audio Capture Card , 1x USB 3.0 to USB C Adapter (A-side 3.0, B-side 2.0), 1x user manual. Please note that you need to restart the OBS Studio software after the audio setup is complete, otherwise it will result in no sound output. When using an adapter, if the device is recognized as USB 2.0, try using the other side with the USB-C port. Simply flip the capture card and reconnect it to be recognized as USB 3.0
ffmpeg -re -i "input.mp4" 
  -map 0:v:0 -map 0:a:0? 
  -c:v libx264 -preset veryfast -pix_fmt yuv420p 
  -r 30 -g 60 -keyint_min 60 -sc_threshold 0 
  -b:v 42M -maxrate 42M -bufsize 84M 
  -c:a aac -b:a 128k -ar 44100 
  -f flv "rtmp://a.rtmp.youtube.com/live2/YOUR_STREAM_KEY"

The command is an editorial template based on YouTube’s published ingest guidance and FFmpeg’s documented RTMP example, not a tested recipe. Substitute the actual server URL and key from Live Control Room. For a 60 fps output, set -r 60, -g 120, and -keyint_min 120, and use the H.264 recommendation of 50 Mbps if your measured connection and encoder can sustain it.

What the important options do

  • -re reads the input at its native rate so the file is paced like a live source.
  • -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. If you need a different audio track, more than one track, or no audio, adjust mapping intentionally.
  • -c:v libx264 selects the H.264 encoder. -preset veryfast favors encoding speed over compression efficiency; whether a machine can encode 4K in real time depends on its hardware and workload.
  • -r sets output frame rate. Avoid unnecessary conversion, especially if it would increase encoding load.
  • -g 60 and -keyint_min 60 set a 60-frame GOP for 30 fps output, or two seconds. -sc_threshold 0 disables scene-cut keyframes so keyframe spacing remains predictable.
  • -b:v and -maxrate set the video bitrate and maximum rate in this example. -bufsize is an encoder rate-control setting; it does not guarantee network buffering or stream reliability.
  • -f flv selects the FLV container commonly used for RTMP output. If YouTube gives you a different supported protocol or endpoint, follow the event’s settings and verify your FFmpeg transport support.

When H.265 or AV1 is appropriate

YouTube lists H.264, H.265/HEVC, and AV1 as live video ingest codecs, up to 60 fps. H.265 or AV1 may suit a workflow that supports them and their corresponding bitrate recommendations, but do not assume your FFmpeg build, encoder hardware, or RTMP(S)/HLS path supports the codec you want. For HDR, verify the complete 10-bit encoding and delivery path rather than sending HDR footage through the SDR-oriented example above.

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

Preflight and start the broadcast

  1. Run an upload speed test under conditions similar to the planned broadcast. Choose a bitrate the connection can sustain with room for variation; a result that only barely matches the video bitrate leaves no sensible headroom for fluctuations and audio or other traffic.
  2. Start a private or unlisted test event where appropriate. Include representative motion and audio, rather than checking only a static image.
  3. Start FFmpeg and monitor its output for encoder errors, dropped frames, or network issues. In Live Control Room, review stream health and messages.
  4. Confirm YouTube detects the intended 4K resolution and frame rate, then inspect the picture, motion, and audio. Playback availability at 4K may vary while YouTube processes the stream.
  5. Only proceed with the intended event after the test is satisfactory. YouTube’s encoder guidance explicitly says, “Make sure that you test before you start your live stream.” See YouTube’s live encoder settings.
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
FFmpeg says the encoder or codec is unavailable The installed build lacks the requested encoder or audio support. Verify the build’s available encoders and choose an encoder it includes; do not assume every FFmpeg package includes libx264.
Stream starts too quickly or ends prematurely The prerecorded file is being read faster than real time, or the command is not pacing input. Put -re before -i for this file-based live workflow.
YouTube reports unstable stream health or the stream stalls Upload variation, a bitrate too high for the connection, or heavy encoder load can interrupt output. Check sustained upload capacity and encoder resource load first. Reduce the bitrate or output complexity if needed, then test again.
YouTube detects the wrong resolution or frame rate The encoded output may differ from the file or expected event configuration. Inspect actual output properties and the Live Control Room stream settings, including any custom-key/manual-resolution option. Change one factor at a time.
No sound, or the wrong audio The file has no audio, multiple tracks, or the first audio stream is not the intended one. Inspect its audio streams and revise -map 0:a:0? deliberately. Confirm AAC output and check audio in a test event.
HDR looks wrong or is not delivered as HDR The example’s H.264 and 8-bit yuv420p settings are an SDR-oriented path. Do not describe this output as HDR. Check YouTube’s HDR guidance and verify compatible 10-bit H.265 encoding and transport support.
The stream key is rejected or the stream reaches the wrong event The URL/key pair may be stale, mismatched, mistyped, or exposed and reset. Copy the current destination and key for the intended event from Live Control Room, keeping the key private.

Optional FFmpeg recovery for temporary network failures

FFmpeg documents a FIFO muxer pattern with recovery attempts for temporary failures:

Rank #4
Sale
Elgato Cam Link 4K Capture Card for DSLR, Camcorder, Action Cam
  • Turn Your Camera into a Pro Webcam: Connect your DSLR or mirrorless camera to any computer and go live in stunning quality
  • Stunning quality: Stream and record in 1080p60 or even 4K60 for razor-sharp detail (Requires a compatible camera and the latest Cam Link 4K model)
  • Connect More Than Just Cameras: Use a camcorder, action cam, or even your iPhone to level up your content
  • No Lag, No Delays: Ultra-low latency keeps your video and audio perfectly in sync, just like it should be
  • Your iPad, Now a Pro Field Monitor: Preview your shots in real time on an iPad with USB-C
ffmpeg -re -i INPUT -c:v libx264 -c:a aac -f fifo -fifo_format flv 
  -drop_pkts_on_overflow 1 -attempt_recovery 1 -recovery_wait_time 1 
  -map 0:v -map 0:a rtmp://example.com/live/stream_name

This is a generic FFmpeg documentation example, not a YouTube guarantee. Use it only after confirming the installed build supports the FIFO muxer and testing its failure behavior safely. Recovery options do not replace a sufficiently stable connection or YouTube-side diagnostics.

Or let it run in the cloud

If the goal is to keep uploaded prerecorded video looping as a YouTube live stream without leaving a computer running, StreamNeo is a separate cloud option: upload the video, add your YouTube stream key, and go live. Nothing has to stay on at home; it streams the uploaded video at its original quality up to 4K 60fps for one flat price per slot, and it automatically recovers 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. StreamNeo is for YouTube and uploaded videos, not camera broadcasts. See StreamNeo or start the free 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.

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