October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
VGSources
FFmpeg

How to Loop a Video on YouTube Live Using FFmpeg on Windows

Use FFmpeg on Windows to repeat a local video and send it to YouTube Live with the current stream URL, key, and compatible encoder settings.

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

To loop a local video on YouTube Live from Windows, use FFmpeg to repeat the file and send the output to the RTMPS server URL and stream key shown in YouTube Studio’s Live Control Room. Match the output codec, resolution, frame rate, bitrate, and keyframe interval to YouTube’s current encoder settings; then check the preview and start the broadcast in the control room.

What you need before you start

  • A local video file you have the rights to broadcast, including its audio.
  • FFmpeg installed on Windows, with an encoder for the output codec you plan to use.
  • A YouTube channel enabled for live streaming and access to YouTube Studio’s Live Control Room.
  • A stable internet connection with upload capacity suited to your selected output bitrate.

This method only repeats and transmits a file. It does not keep the broadcast running if FFmpeg, Windows, your network, or YouTube’s ingest connection stops.

Create or select the YouTube stream

  1. Open YouTube Studio and go to the Live Control Room.
  2. Create a stream or select the scheduled stream you want to use. Find and copy the server URL and stream key displayed for that stream.
  3. Use the current values shown in the control room rather than relying on an old URL. Enter both into the FFmpeg destination as described below. Keep the key private: it is the credential FFmpeg uses to send content to your stream.

YouTube’s setup guide says: “To start streaming, enter your YouTube Live server URL and stream key into your encoder.” YouTube’s encoder setup instructions explain the control-room workflow.

Choose output settings that YouTube accepts

YouTube’s current RTMP/RTMPS encoder guidance lists H.264, H.265 (HEVC), and AV1 video, supports up to 60 fps, calls for constant bitrate, and recommends a two-second keyframe interval that must not exceed four seconds. The recommended bitrate depends on codec, resolution, and frame rate; use the matching row in YouTube’s encoder settings and bitrate table, not a single bitrate for every stream.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
LAPGEAR Home Office Pro Lap Desk - Black Carbon, Fits 15.6” Laptops
  • Spacious Design: Measuring 21.1" wide and 14.1" deep, our lap desk comfortably fits most laptops up to 15.6". Extra room for accessories ensures convenience.
  • Enhanced Functionality: Packed with handy features, including a 5x9" precision tracking mouse pad and a built-in phone slot for seamless work or video calls. Plus, enjoy ergonomic support with the integrated cushioned wrist rest.
  • Cool Comfort: Enjoy a stable surface with our lap desk's dual bolster cushion, designed for comfort and airflow, keeping your lap cool during extended use.
  • Durable Surface: Work with confidence on our lap desk's solid surface, featuring a sleek black carbon color, ensuring optimal air circulation to prevent your laptop from overheating.
  • On-the-Go Convenience: With an integrated handle and lightweight design (2.8 lbs), our lap desk is portable for travel or moving around the house, offering flexibility in any space.
Illustrative H.264 output YouTube recommended bitrate
720p at 30 fps 6 Mbps
1080p at 30 fps 10 Mbps
1080p at 60 fps 12 Mbps

These are entries from YouTube’s H.264 recommendation table, not universal values for other codecs or frame rates. Check the current table for your exact output. Choose resolution and frame rate the source can support and your connection can sustain. YouTube recommends testing upload speed, using representative movement and audio, and monitoring stream health.

RTMPS, codec, and bitrate

Prefer RTMPS when YouTube provides it and your FFmpeg build supports it. YouTube describes RTMPS as the secure extension of RTMP, encrypting stream data into and through Google’s servers. Select a codec supported by both your FFmpeg build and YouTube’s current ingest guidance; set constant bitrate and use the corresponding bitrate recommendation.

Rank #2
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.

Keyframes and frame rate

Set the keyframe interval to two seconds; do not exceed four seconds. Keep output at or below 60 fps. If you are unsure whether a source’s frame rate and dimensions are suitable, inspect the file and choose an output that does not demand more detail or motion than the source contains.

Loop the file and send it to YouTube with FFmpeg

FFmpeg’s official documentation describes infinite repetition with the video loop filter using loop=-1, and documents FLV in the RTMP streaming context. The exact loop option syntax and placement can depend on which FFmpeg option you use and where it applies, so verify the syntax against the documentation for your installed build before streaming. The template below shows the essential structure; it is not a tested copy-and-paste command.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Yilador Webcam Cover 3 Pack, 0.03 inch Ultra Thin Laptop Camera Cover Slide
  • Note: Not suitable for MacBooks released after 2023 or devices with a protruding front camera; Not applicable to full-screen or notch-style tempered glass screen protectors; Do not use on the rear camera of the phone.
  • 💻 Why Do You Need a Webcam Cover Slide? — Safeguard your privacy by covering your webcam with our reliable webcam cover when not in use. Don't let anyone secretly watch you. Stay protected!
  • ✅ Thin & Stylish — Enhance your laptop's functionality and aesthetics with our 0.027" ultra-thin webcam covers. Seamlessly close your laptop while adding a touch of sophistication.
  • ✅ Fits Most Devices — Compatible with laptops, phones, tablets, desktops! Keep your privacy intact on Ap/ple, Mac/Book, iPh/one, iP/ad, H/P, L/novo, De/ll, Ac/er, As/us, Sa/msung devices.
  • ✅ 365 Days Protection — Our upgraded 3.0 adhesive ensures a strong hold that won't damage your equipment. Experience reliable, long-term privacy protection day in and day out.
ffmpeg -stream_loop -1 -i "C:pathtovideo.mp4" [output options] -f flv "[YouTube RTMPS server URL]/[stream key]"

Replace the quoted Windows path with the actual file path. Replace the destination placeholders with the server URL and key from the Live Control Room. Do not publish or share a command containing your real key. Confirm that your installed FFmpeg build supports the selected loop option, codec, and RTMPS protocol; consult the FFmpeg documentation for option details.

The [output options] section must specify an encoder and settings suitable for your source and the YouTube table. At minimum, decide the video codec, resolution, frame rate, constant bitrate, and two-second keyframe interval. If the file’s existing codecs and parameters already fit your intended output, stream-copy may be possible, but YouTube’s ingest requirements alone do not establish compatibility for an arbitrary file. If they do not fit, re-encode to a compatible output. Check your FFmpeg build’s encoder options rather than assuming a setting name or encoder is available.

Rank #4
AboveTEK Portable Laptop Lap Desk w/Retractable Left/Right Mouse Pad Tray, Non-Slip Heat Shield Tablet Notebook Computer Stand Table w/Sturdy Stable Work Surface for Bed Sofa Couch or Travel
  • Anti-Slip Surface - Transform your laptop into a mobile workstation with the AboveTEK portable laptop lap desk. The anti-slip surface provides a strong grip for laptops up to 15.6 inches(Diagonal), while the double rubber strip on the bottom ensures a stable display or typing experience on your lap, couch, or bed.
  • Retractable Mouse Pad - Retractable laptop mouse pad extends on both directions for the left/right handed with elevation along the edges for stopping mouse from falling off. The size of laptop tray is 14" X 9.7" and the size of mouse pad is 7.4" X 6.1".
  • Effective Heat Shield - The effective heat shield made of sturdy and thick material protects your laptop from overheating. Prioritizes your comfort and safety, an ideal lap pad or board for working anywhere.
  • EASY to Carry and Store - With an ergonomic and simplistic design, the lap desk is portable to store in a backpack. Only 15" in size, 2.2 lb of weight and with slim 0.6 inch thickness, it is ready to be easily carried around.
  • Widely Applicable - The smooth platform accommodates laptops and tablets up to 15.6 inches(Diagonal), making it a versatile accessory and one of the best gifts for mom, dad, students and professionals. Perfect for use as a laptop bed tray or tablet holder anywhere at home, library, or park.

Start, verify, and end the broadcast

  1. Start FFmpeg with the verified command. Confirm that it continues reading and sending the file rather than exiting with an error.
  2. Open the Live Control Room preview and wait for YouTube to receive the stream. Check the stream health indicators and confirm video and audio are present.
  3. If the stream is scheduled and the control room prompts you, click Go live to make it public.
  4. When you are finished, stop FFmpeg and end the stream in the control room as appropriate. YouTube says streams under 12 hours are automatically archived.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common problems and fixes

  • No preview appears: verify that FFmpeg is running, the current server URL and stream key are correct, and the destination uses the protocol supported by your build. Check FFmpeg’s output for connection or authentication errors.
  • YouTube reports an unhealthy stream: compare codec, resolution, frame rate, bitrate, and keyframe interval with the current YouTube table. Reduce the output demand if your stable upload capacity is insufficient, then test again.
  • The file plays once or FFmpeg rejects the loop option: check the exact loop syntax and placement in the documentation for your installed FFmpeg version. The official manual documents the loop filter, but the command template above is not a verified command for every build.
  • Audio or video is missing or incompatible: inspect the source streams and confirm the chosen output encoder and format. Re-encode when the source parameters are not appropriate; do not assume stream-copy will make an arbitrary file acceptable.
  • The stream stops unexpectedly: repeating a file does not restart FFmpeg or restore a dropped ingest connection automatically. Check the computer, FFmpeg process, network, and Live Control Room before restarting the broadcast.

Rights and YouTube policy

Looping a video does not grant permission to broadcast it. Make sure you have the necessary rights to the video and its audio. A technically valid stream is not a guarantee that the content complies with YouTube’s copyright or monetization policies.

Or let it run in the cloud

If you want a YouTube channel to keep looping without leaving a Windows PC on, StreamNeo runs uploaded videos from the cloud: upload a recording or build a playlist, add your YouTube stream key once, and go live. Nothing has to stay on at home; it streams the uploaded file as made, up to 4K 60fps at one price per slot, and automatically recovers if YouTube drops the stream. The first day is free with no card. Monthly: $9.99 per month. See StreamNeo or start the free first day.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
LAPGEAR Home Office Lap Desk – Pink, Fits 15.6” Laptops
  • Spacious Design: Measuring 21.1" wide and 12" deep, our lap desk comfortably fits most laptops up to 15.6". Extra room for accessories ensures convenience.
  • Enhanced Functionality: Packed with handy features, including a 5x9" precision tracking mouse pad and a built-in phone slot for seamless work or video calls. Plus, enjoy laptop support with the integrated device ledge.
  • Cool Comfort: Enjoy a stable surface with our lap desk's dual bolster cushion, designed for comfort and airflow, keeping your lap cool during extended use.
  • Durable Surface: Work with confidence on our lap desk's solid surface, featuring a blush pink color, ensuring optimal air circulation to prevent your laptop from overheating.
  • On-the-Go Convenience: With an integrated handle and lightweight design (2.14 lbs), our lap desk is portable for travel or moving around the house, offering flexibility in any space.

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.

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 Patch Notes

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver 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.