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.

To loop a prerecorded video and send it to YouTube Live with FFmpeg, use -stream_loop -1 to repeat the file, -re to read it in real time, H.264 video, and AAC audio. This 1080p30 example is a starting point; adjust the bitrate, frame rate, and keyframe interval to match your output and YouTube’s current recommendations.

Starting FFmpeg command for a 1080p30 stream

ffmpeg -re -stream_loop -1 -i input.mp4 
  -c:v libx264 -preset veryfast 
  -b:v 4500k -maxrate 4500k -bufsize 9000k 
  -g 60 -keyint_min 60 -sc_threshold 0 -pix_fmt yuv420p 
  -c:a aac -b:a 128k -ar 44100 
  -f flv "rtmps://SERVER/STREAM_KEY"

Replace input.mp4 with the video file’s path. Replace the destination with the RTMPS server URL and stream key shown in YouTube Live Control Room. Keep the key private: anyone who has it may be able to send a stream to your channel.

The 4,500 Kbps video target is a conservative example, not YouTube’s recommended 1080p30 target. YouTube currently recommends 10 Mbps for H.264 at 1080p30. Choose the figure for your intended resolution and frame rate from YouTube’s live encoder settings and bitrate table, and confirm your connection can sustain the combined video and audio data with upload headroom.

What the command does

  • -re reads the file at its native rate instead of sending it as fast as the machine can process it. This is appropriate when replaying a file as a live stream.
  • -stream_loop -1 repeats the input indefinitely. It is an input option, so it belongs before -i.
  • -c:v libx264 selects FFmpeg’s H.264 encoder. The bitrate target, maximum rate, and buffer size configure bitrate-targeted encoding.
  • -preset veryfast trades some compression efficiency for faster encoding. If the machine cannot encode in real time, try a faster preset; if it has ample capacity and you want better compression efficiency, a slower preset may help, but test it before relying on it.
  • -g 60 sets a maximum GOP size of 60 frames. At 30 fps, that is a two-second keyframe interval. -keyint_min 60 and -sc_threshold 0 help keep keyframes on a regular interval.
  • -pix_fmt yuv420p selects a widely compatible pixel format for H.264 playback and ingestion.
  • -c:a aac -b:a 128k -ar 44100 encodes audio as AAC at 128 Kbps and 44.1 kHz, YouTube’s recommended stereo settings.
  • -f flv selects the FLV muxer used for RTMP-family streaming. The destination uses RTMPS, the encrypted option YouTube recommends.

These options use FFmpeg’s documented input-looping, real-time input, encoding, and muxing behavior; the exact available encoders depend on your FFmpeg build. See the FFmpeg documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Roku Streaming Stick HD with Voice Remote
  • HD streaming made simple: With America’s number 1 TV streaming platform,* exploring popular apps—plus tons of free movies, shows, and live TV—is as easy as it is fun. *Based on hours streamed—Hypothesis Group
  • Compact without compromises: The sleek design of Roku Streaming Stick won’t block neighboring HDMI ports, and it even powers from your TV alone, plugging into the back and staying out of sight. No wall outlet, no extra cords, no clutter.
  • No more juggling remotes: Power up your TV, adjust the volume, and control your Roku device with one remote. Use your voice to quickly search, play entertainment, and more.
  • Shows on the go: Take your TV to-go when traveling—without needing to log into someone else’s device.
  • TV, simplified: With setup that only takes minutes, a simple-to-navigate Home Screen, and an uncluttered remote control that does all you need—Roku makes it easier to watch the TV you love.

Match output settings to your source and YouTube

The example does not resize the video or convert its frame rate. Its 60-frame GOP is two seconds only if the encoded output is 30 fps. If you output at a different frame rate, choose the GOP in frames to represent roughly two seconds—for example, 60 frames at 30 fps or 120 frames at 60 fps. YouTube recommends a two-second keyframe interval and says not to exceed four seconds.

YouTube H.264 ingest output Minimum video bitrate Recommended video bitrate
720p30 3 Mbps 8 Mbps
1080p30 5 Mbps 10 Mbps
1080p60 6 Mbps 17 Mbps
1440p30 7 Mbps 21 Mbps
4K30 11 Mbps 42 Mbps

These are YouTube’s published H.264 recommendations by ingest resolution and frame rate, not universal requirements. Its live settings page also lists AV1 and H.265 guidance; check the current table before deployment because platform recommendations can change.

Rank #2
Sale
Roku Ultra, Ultimate Streaming Player - 4K Streaming Device for TV
  • Ultra-speedy streaming: Roku Ultra is 30% faster than any other Roku player, delivering a lightning-fast interface and apps that launch in a snap.
  • Cinematic streaming: This TV streaming device brings the movie theater to your living room with spectacular 4K, HDR10+, and Dolby Vision picture alongside immersive Dolby Atmos audio.
  • The ultimate Roku remote: The rechargeable Roku Voice Remote Pro offers backlit buttons, hands-free voice controls, and a lost remote finder.
  • No more fumbling in the dark: See what you’re pressing with backlit buttons.
  • Say goodbye to batteries: Keep your remote powered for months on a single charge.

YouTube currently lists RTMP/RTMPS, H.264, AAC or MP3, and CBR among its live encoder settings. The example specifies a bitrate-targeted x264 configuration, but if you need to satisfy a strict CBR setup, verify the actual output and your FFmpeg encoder options rather than assuming the flags alone guarantee platform-compliant CBR behavior.

Set up the YouTube stream and test it

  1. In YouTube Studio, open Live Control Room and create or select the stream.
  2. Copy the server URL and stream key provided for that stream. Put them in the RTMPS destination in the command; do not publish or share the key.
  3. Run FFmpeg and check the YouTube preview and stream-health indicators. Test with representative movement and audio before treating the setup as production-ready. YouTube specifically advises testing with audio and motion similar to the intended stream.
  4. Confirm that the chosen output resolution and frame rate match the bitrate row you are using, and that the machine can encode steadily while the network uploads continuously.

YouTube’s setup instructions are in Create a YouTube live stream with an encoder.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Roku Streaming Stick 4K with Voice Remote - HDR10+ & Dolby Vision
  • Stunning 4K and Dolby Vision streaming made simple: With America’s number 1 TV streaming platform,* exploring popular apps—plus tons of free movies, shows, and live TV—is as easy as it is fun. *Based on hours streamed—Hypothesis Group
  • Breathtaking picture quality: Stunningly sharp 4K picture brings out rich detail in your entertainment with four times the resolution of HD. Watch as colors pop off your screen and enjoy lifelike clarity with Dolby Vision and HDR10+.
  • Seamless streaming for any room: With Roku Streaming Stick 4K, watch your favorite entertainment on any TV in the house, even in rooms farther from your router thanks to the long-range Wi-Fi receiver.
  • Shows on the go: Take your TV to-go when traveling—without needing to log into someone else’s device.
  • Compact without compromises: Our sleek design won’t block neighboring HDMI ports, so you can switch from streaming to gaming with ease. Plus, it’s designed to stay hidden behind your TV, keeping wires neatly out of sight

Prepare for 24/7 operation

An infinite input loop only repeats the file. It does not restart FFmpeg after a crash, repair a lost network connection, keep the host powered, or recover automatically if YouTube drops the stream. A DIY 24/7 setup therefore needs a continuously powered machine, reliable upload connectivity, process supervision and a plan for source, host, encoder, and network failures.

Also account for YouTube’s archive behavior: YouTube says streams under 12 hours are automatically archived when ended. Do not assume one uninterrupted stream longer than 12 hours will produce a complete archive.

Rank #4
Sale
Amazon Fire TV Stick 4K Plus with AI-powered Fire TV Search, Wi-Fi 6, stream hundreds of thousands of movies and shows, free & live TV, find shows faster with Alexa+
  • Advanced 4K streaming - Elevate your entertainment with the next generation of our best-selling 4K stick, with improved streaming performance optimized for 4K TVs.
  • The newest Fire TV experience (2026) – Our biggest update to Fire TV has a new, modern design that gets you to your entertainment fast. Browse dedicated content categories, pin more of your favorite apps, and get personalized recommendations from Alexa+. Spend less time scrolling, and more time watching.
  • Cloud gaming, no console required – Stream Call of Duty: Black Ops 7, Hogwarts Legacy, Outer Worlds 2, Ninja Gaiden 4, and hundreds of games on your Fire TV Stick 4K Select with Xbox Game Pass and Luna via cloud gaming. Xbox Game Pass subscription and compatible controller required. Each sold separately.
  • Smarter picks with Alexa+ – Getting to what you love has never been easier. Press the voice remote button and talk naturally to find what to watch across your apps, manage your smart home, or dive into virtually any topic.
  • Wi-Fi 6 support - Enjoy smooth 4K streaming, even when other devices are connected to your router.

Common problems and fixes

  • YouTube does not receive a stream: Check that the RTMPS server URL and stream key are the ones shown for the selected stream, that the key has not been changed, and that the network permits the connection.
  • Stream health reports bitrate or connection problems: Check sustained upload capacity, then lower the output bitrate or resolution if the connection lacks headroom. Choose settings for the actual resolution and frame rate rather than copying the example target.
  • FFmpeg cannot keep up: Watch its output for encoding speed. Try a faster x264 preset or reduce output resolution/frame rate, then retest. A faster preset may increase the bitrate needed for comparable image quality.
  • Keyframe interval is wrong for the output: Recalculate GOP size from the output frame rate. The example’s 60-frame interval is two seconds at 30 fps, not at every frame rate.
  • No audio or unexpected audio: Confirm the input has the audio stream you intend to send and that it can be encoded as AAC. For a silent video, or a still image with separate music, build an explicit continuous audio/video input; looping a file does not create a missing stream.
  • The video ends instead of looping: Keep -stream_loop -1 before -i and verify that the input file can be read repeatedly.
  • The stream stops after a host or process failure: The loop option cannot recover a failed process or computer. Add external supervision and recovery procedures, or use a cloud service designed to continue playback independently of a home computer.

Copyright and channel-policy checks

Only stream video and audio you have the rights or permissions to use. A video looping successfully through FFmpeg does not establish that it is permitted for a public livestream, remains eligible for monetization, or complies with YouTube’s rules. Check YouTube’s current policies and any licenses that apply to your content before broadcasting or archiving it.

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

StreamNeo is a YouTube-only cloud service for keeping uploaded videos live 24/7, without leaving a computer or home connection on. Upload a recording or build a playlist, add your YouTube stream key once, and go live. It loops the uploaded video in the cloud and automatically recovers if YouTube drops the stream. Each slot has one always-on stream, 10 GB of storage per slot pooled across active slots, looping and playlists, and support from the StreamNeo team. Uploaded videos stream as made, up to 4K 60fps, at one flat price per slot.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
Amazon Fire TV Stick 4K Select, start streaming in 4K, AI-powered search, and free & live TV, find shows faster with Alexa+
  • Essential 4K streaming – Get everything you need to stream in brilliant 4K Ultra HD with High Dynamic Range 10+ (HDR10+).
  • The newest Fire TV experience (2026) – Our biggest update to Fire TV has a new, modern design that gets you to your entertainment fast. Browse dedicated content categories, pin more of your favorite apps, and get personalized recommendations from Alexa+. Spend less time scrolling, and more time watching.
  • Make your TV even smarter – Fire TV gives you instant access to a world of content, tailor-made recommendations, and Alexa, all backed by fast performance.
  • All your favorite apps in one place – Experience endless entertainment with access to Prime Video, Netflix, YouTube, Disney+, Apple TV+, HBO Max, Hulu, Peacock, Paramount+, and thousands more. Easily discover what to watch from hundreds of thousands of movies and TV episodes (subscription fees may apply), including free, ad-supported content.
  • Getting set up is easy – Plug in and connect to Wi-Fi for smooth streaming.

The first day is free with no card (one free day per account). The monthly option is $9.99 per month. Shorter and longer billing options are available; see StreamNeo pricing.

To try it, start with StreamNeo’s free first day.

Quick Recap

SaleBestseller No. 1
SaleBestseller No. 2
Roku Ultra, Ultimate Streaming Player - 4K Streaming Device for TV
Roku Ultra, Ultimate Streaming Player - 4K Streaming Device for TV
No more fumbling in the dark: See what you’re pressing with backlit buttons.; Say goodbye to batteries: Keep your remote powered for months on a single charge.
$99.00
SaleBestseller No. 5
Amazon Fire TV Stick 4K Select, start streaming in 4K, AI-powered search, and free & live TV, find shows faster with Alexa+
Amazon Fire TV Stick 4K Select, start streaming in 4K, AI-powered search, and free & live TV, find shows faster with Alexa+
Getting set up is easy – Plug in and connect to Wi-Fi for smooth streaming.
$17.99

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.