Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober 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 Now×
Skip to content
Mountain View desk5 min

How to Make an FFmpeg YouTube Playlist Repeat Indefinitely

Use FFmpeg’s -stream_loop -1 before the playlist input to repeat it indefinitely. Learn how to pace local files, prepare compatible clips, connect YouTube Live, and troubleshoot failures.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To make a local FFmpeg playlist repeat indefinitely, put -stream_loop -1 before the playlist’s -i option. Add -re before the input as well so FFmpeg reads local files at normal playback speed instead of sending the playlist as fast as it can. This loops FFmpeg’s input; it does not guarantee that the FFmpeg process, network connection, or YouTube broadcast will stay live forever.

Use this FFmpeg command pattern

For a local playlist assembled with FFmpeg’s concat demuxer, this is an illustrative starting pattern. It has not been tested as a universal command: replace the ingest URL and key with the values from YouTube Live Control Room, and select encoding settings appropriate to your video.

As an Amazon Associate I earn from qualifying purchases.

ffmpeg -re -stream_loop -1 -f concat -safe 0 -i playlist.txt 
  -c:v libx264 -preset veryfast -b:v 5M -maxrate 5M -bufsize 10M 
  -g 60 -c:a aac -b:a 128k -f flv 'rtmps://YOUR_YOUTUBE_INGEST_URL/YOUR_STREAM_KEY'

The two options immediately before the input do different jobs: -stream_loop -1 repeats that input without a set limit, while -re paces local-file reading at its native rate for real-time output. FFmpeg documents -stream_loop as an input option, so it must appear before the -i it applies to. FFmpeg’s command-line documentation explains option placement and looping; its main options documentation describes real-time input pacing.

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.

The example’s encoding values are not a recommendation for every resolution or frame rate. In particular, -g 60 corresponds to a two-second keyframe interval only at 30 fps. Set the GOP/keyframe interval for your output frame rate and YouTube’s current guidance.

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

Build a compatible playlist

Create the concat file

Save a plain-text file such as playlist.txt with one file entry per line:

file '/absolute/path/clip-01.mp4'
file '/absolute/path/clip-02.mp4'
file '/absolute/path/clip-03.mp4'

Use paths readable by the account running FFmpeg. The command’s -safe 0 permits paths that the concat demuxer’s default safety rules may reject. Use it only when the playlist and every referenced path are trusted.

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.

Check media compatibility first

The concat demuxer expects corresponding streams to match, including stream layout, codecs, and time bases. A playlist whose clips differ in resolution, aspect ratio, audio streams, or codec may fail at a boundary or produce an interrupted or inconsistent output. See FFmpeg’s concat demuxer documentation. Normalize a static playlist to consistent stream properties before concatenating when needed; this is practical guidance, not a guarantee that every source file can be made seamless with one command.

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

Connect FFmpeg to YouTube Live

  1. Prepare the YouTube event. In YouTube Studio, open Live Control Room and create or select the stream/event. Follow YouTube’s encoder setup instructions to obtain its stream URL and stream key.
  2. Insert the connection details. Replace the example RTMPS destination with the ingest URL and key provided for your stream. Treat the key like a password: anyone who obtains it may be able to broadcast to your event. If you reset the key, update the FFmpeg destination too.
  3. Choose compatible output settings. YouTube’s live encoder settings list supported video/audio formats and bitrate guidance by codec, resolution, and frame rate. YouTube’s current table gives H.264 at 1080p/30 fps a minimum of 5 Mbps and a recommended 14 Mbps; those are platform ingest recommendations, not performance guarantees. YouTube recommends a two-second keyframe interval and says not to exceed four seconds. It recommends constant bitrate encoding, supports H.264, H.265, or AV1 video for RTMP/RTMPS, and AAC or MP3 audio.
  4. Start and verify the broadcast. Run the command, then check the Live Control Room preview and stream health before relying on the stream. Test representative motion and audio, and monitor health while it runs, as YouTube advises in its encoder guidance.

Use RTMPS where available; YouTube recommends it for encrypted transport. Recheck YouTube’s encoder table when setting up a new stream because its supported settings and recommendations may change.

Rank #3
Amazon Fire TV Cube, with AI-powered Fire TV Search, Hands-free streaming device, find shows faster with Alexa+, Wi-Fi 6E, 4K Ultra HD
  • Our fastest-ever streaming media player - Brings lightning-fast app starts with an octa-core processor and is 2X as powerful as Fire TV Stick 4K Max.
  • 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.
  • 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.
  • Hands-free Alexa with built-in mic and speakers - Control your compatible TV, soundbar, and receivers with your voice, even from across the room.
  • Seamlessly navigate between your entertainment - Connect compatible devices and easily go from streaming to your cable box, game console, or webcam.

Know what “indefinitely” means here

-stream_loop -1 repeats FFmpeg’s input; it does not restart FFmpeg after a crash, restore a lost network connection, or control YouTube’s event. Those are separate failure points. YouTube’s encoder setup guidance says streams shorter than 12 hours are automatically archived. That does not mean a single YouTube archive can be assumed to cover an unlimited broadcast, even if the local playlist keeps repeating.

Troubleshoot common failures

  • The playlist stops after one pass: Put -stream_loop -1 before the relevant -i. It is an input option; after the input, it will not apply to it. FFmpeg option documentation.
  • The playlist rushes through the files: For local media, add -re before the input to pace reading at normal speed. It does not create the loop. Do not casually apply it to actual capture devices or live inputs; FFmpeg cautions that doing so can cause packet loss. FFmpeg real-time input guidance.
  • FFmpeg fails or the output breaks at a clip boundary: Inspect the concat inputs for matching stream layouts, codecs, and time bases. Normalize incompatible clips to consistent properties before concatenation. Concat demuxer documentation.
  • YouTube reports an ingest or format problem: Check the destination URL/key, RTMP/RTMPS protocol, selected codec, bitrate for the actual resolution and frame rate, constant-bitrate setting, audio codec, and keyframe interval against YouTube’s current encoder settings.
  • The broadcast stops although the input is looping: Check whether FFmpeg exited, the network dropped, or the YouTube event was stopped or ended. Input looping only repeats media inside a running process; it does not provide process supervision, network recovery, or an unlimited YouTube archive. YouTube’s encoder setup guidance.
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 a YouTube channel to keep playing uploaded videos without leaving a PC and FFmpeg process running at home, StreamNeo runs the stream from the cloud. Upload a recording or build a playlist, add your YouTube stream key once, and go live. It is for YouTube streams of uploaded videos, not camera broadcasts.

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.
$138.81
Bestseller No. 3
Amazon Fire TV Cube, with AI-powered Fire TV Search, Hands-free streaming device, find shows faster with Alexa+, Wi-Fi 6E, 4K Ultra HD
Amazon Fire TV Cube, with AI-powered Fire TV Search, Hands-free streaming device, find shows faster with Alexa+, Wi-Fi 6E, 4K Ultra HD
Smoother streaming - The first-ever streaming media player that features Wi-Fi 6E support.
$199.99
Bestseller 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.
$49.99
Best Value
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.
Rank #4
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
  • Nothing has to stay powered on at home, and your home internet connection does not have to carry the stream.
  • Every quality is the same flat price per slot, up to 4K at 60 fps as uploaded, with no re-encoding or quality tiers.
  • StreamNeo automatically recovers if YouTube drops the stream.
  • The first day is free with no card required; one free day is available per account.
  • The monthly option is $9.99 per month. Plans also come in day, week, six-month, and yearly durations; the product is the same on each plan, with only the billing length changing. UPI and cards are accepted in India; card checkout is available worldwide.

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.

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 Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
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.