To stream a prerecorded file to YouTube Live at a constant 30 fps, use FFmpeg to read it in real time, convert its frame cadence with fps=30, encode it, and send it to the RTMP/RTMPS endpoint and stream key shown in YouTube Studio. For a two-second keyframe interval at 30 fps, set a 60-frame GOP. The command below is an adaptable starting point, not a tested universal preset: match resolution and bitrate to your video and stable upload bandwidth.
Stream a video file to YouTube Live with FFmpeg
This workflow sends a live feed to YouTube’s ingest service; it is not an ordinary video upload. FFmpeg reads the file at playback speed with -re, optionally repeats it with -stream_loop -1, encodes it as H.264 video and AAC audio, then publishes it using the URL and key from YouTube Studio. YouTube’s live encoder guidance covers RTMP/RTMPS, H.264, H.265/HEVC and AV1, with frame rates up to 60 fps; this example uses H.264 as a straightforward compatibility profile. See YouTube’s live encoder settings and bitrate recommendations.
As an Amazon Associate I earn from qualifying purchases.
- Prepare the YouTube stream. In YouTube Studio, create or open a live stream and copy the server URL and stream key provided for it. Keep the key private: anyone with it may be able to send video to your stream.
- Check the source and target. Choose an output resolution and frame rate suitable for the video and your sustained upstream bandwidth. This example targets 30 fps and uses a 1080p30 H.264 bitrate recommendation; change it if your target differs.
- Run FFmpeg with your own file and ingest details. Replace
input.mp4and the endpoint placeholder. YouTube Studio may show the server URL and stream key separately; concatenate them in the form YouTube specifies, usually as the server URL followed by the key.
ffmpeg -re -stream_loop -1 -i input.mp4
-vf "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 "rtmp://SERVER/STREAM_KEY"
-rereads the input at its native playback speed rather than sending the file as fast as FFmpeg can process it. It is appropriate for file playout as a live stream.-stream_loop -1repeats the input indefinitely. Remove this option if the stream should end when the file finishes.-vf "fps=30"converts the output cadence to 30 fps, dropping or duplicating frames as needed. It does not guarantee the original motion will look identical after conversion.-c:v libx264selects the H.264 encoder if your FFmpeg build includes it. Encoder availability depends on how FFmpeg was built.-b:v 10Mis the example’s video bitrate: YouTube lists 10 Mbps as its recommended H.264 bitrate for 1080p30 live ingestion. It is a platform recommendation, not a guarantee your connection can sustain it. YouTube lists 8 Mbps for H.264 720p30 and 17 Mbps for H.264 1080p60. Check its current live bitrate table for the target codec, resolution and frame rate.-maxrateand-bufsizeare illustrative rate-control settings, not proof of constant instantaneous bitrate. YouTube’s live guidance recommends CBR for RTMP/RTMPS. Select a suitable encoder rate-control mode for your FFmpeg build and verify stream health in a test.-g 60makes a GOP of 60 pictures. At 30 fps that spans two seconds;-keyint_min 60and-sc_threshold 0are included to keep the example’s keyframe cadence predictable.- The audio settings encode AAC at 128 kbps and 44.1 kHz. The output is placed in an FLV container for the RTMP-style stream.
Make FFmpeg output constant frame rate
For a transcoded output, request the target cadence during encoding. The fps video filter shown above creates 30-fps output by dropping or duplicating frames. An output-side -r 30 can also make FFmpeg duplicate or drop frames before encoding. Consult the FFmpeg documentation for the distinctions between input and output options.
Why input -r is not a casual fix
Input -r has a different effect: it ignores stored timestamps and generates timestamps at the specified rate, and is intended for raw formats. Putting it before a normal video file to “fix” variable frame rate can misinterpret its timing rather than perform the desired frame conversion.
#1 Best Overall
- 【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
Why stream copy cannot change cadence
-c:v copy passes encoded video through without re-encoding. It cannot create a new constant-frame-rate cadence from an arbitrary variable-frame-rate source. If you need frame duplication or dropping to establish a target cadence, use an encoding path such as libx264 with the fps filter.
Set the keyframe interval from the output frame rate
YouTube recommends a two-second keyframe frequency and says not to exceed four seconds. GOP size is counted in frames, so calculate it from the selected output rate rather than copying a frame count from another format. The FFmpeg all-options reference describes GOP size as the number of pictures in a group of pictures: FFmpeg all-options documentation.
Rank #2
- 【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.
| Output frame rate | Frames for a two-second GOP |
|---|---|
| 25 fps | 50 |
| 30 fps | 60 |
| 60 fps | 120 |
For fixed-rate output, FFmpeg’s codec time base should correspond to 1/frame_rate, with timestamp increments of one. If you change fps=30, recalculate the GOP value accordingly. YouTube’s live-stream error guidance connects frame-rate and keyframe timing with stream errors.
Choose resolution, bitrate and frame rate together
The command’s 10 Mbps video bitrate is specifically the YouTube-listed recommendation for H.264 at 1080p30. Do not treat it as a universal setting. A 720p30 target has a different listed recommendation, as does 1080p60; other codecs also have their own recommendations. Your upload connection must sustain the chosen bitrate with headroom for normal network variation. If it cannot, reduce resolution, frame rate or bitrate and test again rather than assuming a platform recommendation makes an unstable connection adequate.
Rank #3
- 【4K HDMI Input, 2K@30Hz Recording】Powered by a true USB 3.0 high-speed interface, the capture card supports up to 4K@30Hz HDMI input and records at 2K@30Hz or 1080P@60Hz. Perfect for gamers, streamers, and professionals who need crisp, smooth video for live streaming, gameplay recording, or online meetings.
- 【Ultra Low Latency Screen Sharing】Built with a premium aluminum alloy shell and advanced chipset for stable heat dissipation, ensuring ultra-low latency transmission. Capture high-quality video and dual-channel audio in real time—no lag, no frame drop—ideal for Twitch, YouTube, or OBS streaming.
- 【Easy Plug and Play, Compact & Portable】No driver or external power required—just plug and play via USB 3.0 or Type-C connection to your Windows or macOS computer. Lightweight and compact design makes it easy to carry for outdoor streaming, live shows, or mobile recording setups.
- 【Wide Compatibility & Multi-Device Support】Compatible with Windows 7 8 10 11, macOS, Linux,Android and supports most popular software such as OBS, Zoom, VLC, Twitch Studio, and more. Works seamlessly with PS4, PS5, Xbox, Switch, DSLR cameras, TV boxes, and other HDMI-output devices for streaming to YouTube, Twitch, etc.
- 【What You Get】Includes: HDMI Capture Card, USB 3.0 to USB-C Adapter, User Manual. Tips: Make sure your tablet’s OTG function is enabled before connecting. Test your HDMI device with a monitor first to confirm video and audio output, then connect to the Video Capture Card for recording.
The example fixes the output at 30 fps. If your chosen cadence is 25 or 60 fps, change the filter, consult the applicable live bitrate guidance, and adjust the GOP to retain the intended two-second interval. YouTube recommends testing with similar audio and movement before the event, then monitoring stream health while live.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Live streaming a file is different from uploading it
| Workflow | Destination and timing | Frame-rate and encoding approach |
|---|---|---|
| Live file playout | Real-time feed to YouTube live ingest using its stream endpoint and key | Choose a live output cadence; configure live codec, keyframe interval and sustained bitrate according to YouTube’s live guidance. |
| Ordinary video upload | Create a video file for YouTube’s upload processing | YouTube says to encode and upload at the same frame rate as recorded. Its upload guidance lists common rates of 24, 25, 30, 48, 50 and 60 fps and recommends MP4, H.264 and progressive scan. See YouTube’s recommended upload encoding settings. |
For an upload conversion rather than live output, omit real-time input behavior, choose a file container such as MP4, and consider -movflags +faststart for progressive download. Do not apply live ingest settings as a blanket recipe for uploads: YouTube’s upload guidance says to retain the recording frame rate.
Rank #4
- High-Quality Video Capture, 4K HDMI Capture Card Ready: Capture smooth and vibrant video with this 4K HDMI capture card, engineered for gamers and content creators who demand crisp 1080P 60FPS video quality. Whether you're streaming to Twitch or recording gameplay for YouTube, your footage will look professional and detailed
- Plug-and-Play USB Capture Card, No Drivers Needed: Designed as a USB capture card for streaming, this device works instantly out of the box, just plug into your PC or laptop and start capturing. Fully compatible with popular software like OBS Studio, Streamlabs, and XSplit, making setup quick and stress-free for beginners and pros alike
- Universal Compatibility PS5, Xbox, Switch & More: Stream or record gameplay from virtually any HDMI-enabled device including Nintendo Switch, PS5, Xbox Series X, DSLR cameras, and PCs. The video capture card for gaming supports seamless passthrough so you can play without lag while your audience watches every frame in real time
- Low-Latency Performance for Smooth Streaming: This capture card for streaming minimizes delay between gameplay and broadcast, so you get reliable, low-latency capture that works well for competitive gaming, live broadcasts, and podcast sessions. Suitable for those building their channel with high-quality, engaging content
- Compact & Portable Design for Content Creators: Lightweight and portable, this USB 3.0 capture card works well for creators who travel or switch gaming setups often. Throw it in your bag and stream or record wherever you are, at home, events, LAN parties, streaming or studio sessions
Troubleshooting frame-rate and live-ingest problems
- YouTube reports a keyframe or frame-rate problem: Confirm the actual output cadence, then set GOP frames to twice the frame rate for a two-second interval: 60 at 30 fps, 50 at 25 fps, or 120 at 60 fps. Check YouTube’s live error messages and encoder guidance.
- The stream is unstable or YouTube reports poor stream health: The configured bitrate may exceed what the connection can sustain, or the encoder may not be using the expected rate-control mode. Test with representative content, use a suitable CBR configuration for RTMP/RTMPS, and lower the target bitrate or resolution if the upstream is insufficient.
- The stream starts but ends with the file: Add
-stream_loop -1before the input to repeat it indefinitely. Without that option, FFmpeg reaches end of file. - FFmpeg cannot find
libx264: Your build may not include that encoder. Use an FFmpeg build with the encoder available or choose an encoder supported by your build and YouTube’s live guidance. - The video cadence does not become CFR: Make sure you are encoding rather than using
-c:v copy, and apply an output conversion such as-vf "fps=30". Avoid using input-ron a normal timestamped file as a substitute. - YouTube does not receive the feed: Recheck that the URL and key are the current values from the correct YouTube Studio stream, that they have been joined in the format YouTube specifies, and that the key has not been exposed or mistyped.
Or let it run in the cloud
If your goal is continuous prerecorded-video playout rather than learning FFmpeg, StreamNeo keeps a YouTube channel live from uploaded videos. Upload a recording or build a playlist, add your YouTube stream key once, and go live; the cloud loops the video, so your computer and home connection do not need to stay on.
Recommended Free Tools
Quick Recap
- Nothing has to stay powered on at home; StreamNeo runs the stream from the cloud and automatically recovers if YouTube drops it.
- Every quality up to 4K 60fps is streamed as uploaded, with no re-encode, at one flat price per slot rather than quality tiers.
- The first day is free with no card required (one free day per account). Monthly billing is $9.99 per month.
- Each slot includes one always-on stream, 10 GB storage per slot pooled across active slots, 24/7 looping and playlists, automatic recovery, and StreamNeo team support. The product is the same on every plan; only the billing length changes.
Start your free StreamNeo 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.

