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

To loop a playlist on YouTube Live with FFmpeg, put compatible video files in a concat-demuxer playlist, pass that playlist to FFmpeg with -stream_loop -1, and send the encoded output to the YouTube server URL using your stream key. The loop can repeat indefinitely, but your computer, power, internet connection, FFmpeg process, and YouTube ingest must keep working for the stream to stay live.

What you need before you start

  • A current FFmpeg build with the encoders you plan to use. Check available encoders with ffmpeg -encoders.
  • Video files you own or have permission to stream, with compatible stream layouts and media properties.
  • A YouTube channel enabled for live streaming and a stream URL and key from YouTube Studio.
  • A computer with enough processing capacity for your chosen encoding settings, plus a stable internet connection with sustained upload headroom above the stream bitrate.

For a large library, an external SSD or hard drive can provide local storage; the capacity you need depends on the size of your media files. You do not need a hardware encoder for this FFmpeg workflow.

Get the YouTube server URL and stream key

  1. In YouTube Studio, open Create → Go Live and create or schedule an encoder stream.
  2. Copy the server URL and stream key shown for the stream. YouTube describes stream keys as “like your YouTube stream’s password and address.” Keep the key private: do not publish it in a script, screenshot, or source repository.
  3. If you think the key has been exposed, reset it in Live Control Room and update the FFmpeg destination before reconnecting.

Choose the stream’s visibility and other Live Control Room settings as appropriate. YouTube documents the encoder connection and stream lifecycle in its encoder live-stream setup guide and explains stream-key settings in Manage live stream settings.

Prepare the rotating playlist

FFmpeg’s concat demuxer joins media inputs as streams. It is most reliable when each file has the same stream layout and compatible codecs, time bases, and parameters. Mixed resolutions, codecs, frame rates, or audio layouts can cause errors or poor transitions. Normalize mismatched files before streaming, or build and test a filter-and-re-encode workflow for the library.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
KOTIN Prebuilt Gaming PC RTX 5070 12GB, Ryzen 7 9700X, 32GB DDR5, 1TB SSD
  • POWERED BY RTX 5070 12GB + RYZEN 7 9700X - The GeForce RTX 5070 12GB GDDR7 graphics card pairs with an 8-core AMD Ryzen 7 9700X processor to drive smooth 1440p and 4K gameplay, giving this gaming PC the headroom for modern titles, streaming, and creative work.
  • 32GB DDR5 6000MHz MEMORY & 1TB NVMe SSD - 32GB of high-speed DDR5 memory and a 1TB PCIe 4.0 NVMe solid state drive deliver quick load times, smooth multitasking, and generous storage, keeping this prebuilt gaming desktop responsive under heavy workloads.
  • BUILT-IN 11.3-INCH Smart DISPLAY - An integrated smart screen shows real-time CPU and GPU temperatures, usage, and weather while you play, adding a distinctive and functional touch to your battlestation.
  • 850W 80+ GOLD POWER SUPPLY, 360MM LIQUID COOLING & WiFi 7 - An 850W 80 Plus Gold certified power supply provides stable, efficient power with headroom for future upgrades, while a 360mm AIO liquid cooler, WiFi 7, and an ARGB mid-tower case keep the Ryzen 7 CPU cool and connected in a clean build.
  • READY TO PLAY OUT OF THE BOX - Arrives fully assembled and tested with Windows 11 Home pre-installed, so your prebuilt gaming computer is ready to set up in minutes. Assembled in the USA, and backed by a one-year limited warranty and lifetime free technical support.
  1. Create a file named playlist.txt in your working directory.
  2. List each video in the order it should play, with one file line per input. For example:
    ffconcat version 1.0
    file 'video-01.mp4'
    file 'video-02.mp4'
    file 'video-03.mp4'
  3. Use relative paths within the working directory where practical. The concat demuxer defaults to safe path checks; absolute paths and other forms may be rejected unless you change the safe option. Consult FFmpeg’s formats documentation before relaxing that check, and only use a trusted playlist.
  4. Test the playlist from beginning to end, including transitions and audio, before leaving it unattended.

If your sources differ substantially, FFmpeg’s FAQ explains the distinction between the concat demuxer and concat filter: the filter is useful when re-encoding is needed to make inputs consistent.

Choose YouTube-compatible stream settings

Use YouTube’s current encoder guidance for the resolution and codec you actually plan to send. Its recommendations include H.264 video, AAC audio, constant bitrate (CBR), and a two-second keyframe interval; YouTube says not to exceed four seconds. At 30 fps, a two-second GOP is 60 frames; at 60 fps, it is 120 frames. YouTube recommends 128 kbps for stereo AAC audio. See its encoder settings, bitrate, and resolution guidance for the current bitrate table and codec-specific values.

For 1080p at 30 fps, the YouTube page accessed in 2026 lists an H.264 recommended bitrate of 10 Mbps. Its separate AV1/H.265 range for that resolution and frame rate is 3–8 Mbps; do not treat that range as the H.264 recommendation. Use the row for your selected codec and resolution rather than applying one bitrate to every stream.

Rank #2
Sale
Skytech Gaming PC Shadow 5, Ryzen 7, RTX 5060 Ti 8GB, 16GB RAM, 1TB SSD
  • AMD Ryzen 7 8700F 4.1GHz (5GHz Turbo Boost) CPU Processor | 1TB NVMe M.2 SSD – Up to 30x Faster Than Traditional HDD | High-Performance Air Cooler
  • NVIDIA GeForce RTX 5060 Ti 8GB GDDR7 Graphics Card (Brand may vary) | 16GB DDR5 RAM 6000 Non-RGB Gaming Memory with Heat Spreader | Windows 11 Home
  • WI-FI 5 802.11ac | No Bloatware | Graphic output options include 1 x HDMI, and 1 x Display Port Promised, Additional Ports may vary | USB Ports Including 2.0, 3.0, and 3.2 Gen1 Ports | HD Audio & Mic | Free Gaming Keyboard & Mouse
  • High-Performance Air Cooler: Maximum Airflow & ARGB Fans | Skytech Shadow 5 Gaming Case with Tempered Glass, Black | 1 Year Warranty on Parts and Labor | Free Technical Support | Assembled in the USA
  • This powerful gaming PC is capable of running all your favorite games such as Elden Ring Nightreign, Baldur's Gate 3, Cyberpunk 2077, Hogwarts Legacy, Helldivers 2, Diablo IV, Starfield, Valorant, Counter-Strike 2, Forza Horizon 5, Resident Evil 9, Alan Wake 2, Warhammer 40,000: Space Marine 2, God of War Ragnarök, Overwatch 2, Dragon's Dogma 2, Marvel's Spider-Man, Clair Obscur: Expedition 33,, more at Ultra settings, detailed 1080p Full HD resolution, and smooth 60+ FPS gameplay.

Your chosen bitrate also has to fit your real sustained upload capacity. YouTube advises choosing quality that is reliable on the available connection; leave headroom rather than setting the output equal to a speed-test peak. YouTube recommends RTMPS, which it describes as a secure extension of RTMP. Prefer it when the server URL supplied for your stream supports it.

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

Start FFmpeg and send the playlist to YouTube

This example re-encodes video to H.264 and audio to AAC for predictable output. Replace the destination with the server URL and stream key from your account. The bitrate is illustrative, not a universal setting.

ffmpeg -re -stream_loop -1 -f concat -safe 0 -i playlist.txt 
  -c:v libx264 -preset veryfast -b:v 4500k -maxrate 4500k -bufsize 9000k 
  -r 30 -g 60 -pix_fmt yuv420p 
  -c:a aac -b:a 128k -ar 44100 
  -f flv 'rtmps://SERVER-URL/STREAM-KEY'
  • -re reads file input at playback speed rather than sending it as fast as possible.
  • -stream_loop -1 repeats the specified input indefinitely; FFmpeg documents -1 as infinite looping. It does not restart a failed FFmpeg process or restore a failed computer, network, or YouTube connection. See the FFmpeg documentation.
  • -f concat selects the concat demuxer. -safe 0 permits paths outside its default safe subset; omit it when safe relative paths work.
  • -c:v libx264 and -c:a aac re-encode the streams. Encoding uses compute resources, with the exact load depending on the build and selected encoder.
  • -b:v, -maxrate, and -bufsize set illustrative rate-control values; adjust them to your codec, resolution, frame rate, content, and sustainable upload capacity.
  • -r 30 sets output frame rate and -g 60 sets a 60-frame GOP, a two-second keyframe interval at 30 fps.
  • -f flv selects the output container used for this RTMP(S) ingest example.

Because the example uses -safe 0, use it only with a playlist you trust. For safe relative entries, remove the option and let FFmpeg apply its default checks.

Rank #3
Sale
msi Codex Z2 Gaming Desktop, AMD R7-8700F, RTX 5070, 32GB DDR5, 2TB SSD
  • POWERHOUSE 8-CORE GAMING PERFORMANCE — Driven by the AMD Ryzen 7 8700F with 8 cores and 16 threads, boosting up to 5.0 GHz for smooth, responsive gameplay and the ability to handle AAA titles, streaming, and background tasks all at once
  • NEXT-GEN BLACKWELL ARCHITECTURE — The NVIDIA GeForce RTX 5070 is powered by NVIDIA's cutting-edge Blackwell GPU architecture, delivering a massive generational leap in rasterization and ray tracing performance so you can experience your games the way they were meant to be played.
  • Simplistic Design: Enjoy the latest generation of Windows 11 Home for your everyday needs. *MSI recommends Windows 11 Pro for business use.
  • Cool While Gaming: In conjunction with an ARGB fan Air Cooler, the Codex R2 features four system cooling fans; three in the front and one in the rear to pull in cool air and push heat out of the PC.
  • Turn on the Bright Lights: With the built-in RGB lighting, take your gaming experience to the next level by pressing the MSI LED button to cycle through lighting options. Customize lighting even further with MSI Center software.

When stream copy may work

Using -c:v copy -c:a copy can reduce encoding work, but only if all inputs already have compatible codecs and stream properties, the concat demuxer can join them cleanly, and YouTube accepts the resulting stream. Test with your actual media. Otherwise, normalize the files or re-encode as in the example.

When the playlist has audio-only files or images

The example expects inputs with compatible video and audio streams. Audio-only tracks or still images require suitable video/audio generation and explicit mapping options; this command does not create missing streams. Build and test that workflow separately before using it for a live broadcast.

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.

Test the broadcast before relying on it

  1. Run FFmpeg and open the stream’s preview in YouTube Live Control Room.
  2. Check that video and audio play correctly and inspect the stream-health indicators before starting or confirming the broadcast under your stream settings.
  3. Make a private or unlisted test first. YouTube recommends testing the encoder, checking the preview, monitoring stream quality, and testing encoder failover where applicable; its streaming tips also recommend checking upload speed.
  4. Keep the terminal visible or retain its logs. Watch for FFmpeg exits, input errors, dropped frames, and network failures.

What it takes to keep the stream running 24/7

The command loops the input, not the whole streaming system. Continuous delivery still depends on the host staying powered on, the operating system and FFmpeg process remaining healthy, the playlist files being available, the upload connection staying up, and YouTube ingest accepting the feed.

Rank #4
YAWYORE Gaming PC Desktop Computer AMD R5 5600GT 16GB 1TB NVMe Towers WiFi
  • Powerful Processor: AMD Ryzen 5 5600GT 3.6GHz (4.6GHz Turbo) 6-Core 12-Thread processor brings faster response time to easily handle multi-threaded tasks
  • Motherboard Specification: MSI A520M-A PRO motherboard provides reliable performance and expandability for your computing needs
  • Integrated Graphics: AMD Radeon Vega Graphics (CPU Integration) enables you to play 1080P mainstream games at quality frame rates
  • Memory and Storage: 16GB DDR4 3200MHz RAM paired with 1TB M.2 NVMe PCIe SSD for fast multitasking and quick data access
  • Power Supply: 550W 80PLUS Bronze certified power supply ensures stable and energy-efficient operation

A service manager or watchdog can be configured to restart a failed process, but that is a separate reliability measure to build and test. A restart may interrupt the broadcast or require a new ingest session. Power backup, network failover, and a fallback encoder add further complexity; consider them only if your continuity requirements justify the cost and maintenance.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Copyright, reused content, and archives

Only stream video and audio you have the rights to use. A live loop does not grant permission to rebroadcast music, performances, films, or other creators’ content. YouTube’s live-stream setup and settings pages explain stream controls and lifecycle, but rights clearance remains your responsibility.

A 24/7 playlist also does not by itself establish eligibility for monetization. YouTube can assess a channel’s content under its policies, including whether material is original or reused; repeating videos is not a substitute for meeting current channel and monetization requirements. Check YouTube’s current policies before relying on a loop for monetization.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
suevery Gaming PC Desktop Computer Ryzen 5,16GB DDR4 512G SSD, RX 560 4G
  • 【6-Core Ryzen 5 Prebuilt Gaming PC | Smooth Large Game & Streaming Performance】 The Suevery prebuilt gaming PC features an Ryzen 5 6-Core processor (3.6GHz Base, 4.1GHz Boost) and Radeon RX 560 4GB Graphics Card. It delivers lag-free gameplay for large games, seamless high-definition streaming, and smooth creative software operation, meeting gamers and content creators' reliable performance needs.
  • 【16GB DDR4 RAM + 512GB NVMe SSD | Blazing-Fast Boot & Load Speeds】 16GB DDR4 RAM supports simultaneous operation of multiple games, browser tabs and office apps without slowdowns. The 512GB NVMe SSD (up to 30x faster than traditional HDDs) enables fast boot-ups, instant game loads and quick file transfers, with ample storage for games, videos and work files.
  • 【Wi-Fi 6 Gaming Tower | Versatile Connectivity for Multi-Scenarios】 This tower gaming desktop has Wi-Fi 6 for fast, stable wireless internet, ideal for online gaming and high-definition streaming. It also includes 2× USB 3.0 and 4× USB 2.0 ports to connect peripherals, storage and office devices, suitable for gaming, home and office use.
  • 【RGB Cooling System | Stable Operation】 The advanced air cooling system with customizable RGB fans keeps the gaming tower PC cool and quiet during intense gaming. Optimized airflow maintains optimal component temperatures, preventing overheating and ensuring stable performance for long gaming sessions or heavy office workloads. Sleek RGB lighting adds a gaming-inspired aesthetic.
  • 【Prebuilt Tower PC | Adapt to Gaming/Work/Home/Office】 This prebuilt tower gaming PC is versatile for streaming, work, home and office tasks—from video editing and design software to daily office work and browsing. Ready to use with no extra setup, it meets the needs of gamers, remote workers and home users.

YouTube states that streams under 12 hours are automatically archived. That statement does not establish that an uninterrupted 24-hour broadcast will be archived in full. If retaining a complete copy matters, check YouTube’s current long-stream archive behavior and record a local copy as well.

Common problems and fixes

Symptom Likely cause What to check or do
FFmpeg rejects a playlist path The concat demuxer’s safe-path checks reject an entry. Use relative paths in the working directory where possible. If another path form is necessary, review the safe option documentation and only relax checks for a trusted list.
Playback fails or breaks at a file boundary Inputs have incompatible stream layouts, codecs, time bases, or parameters. Inspect the files, normalize them to consistent properties, or use a tested re-encoding/filter workflow. Test every transition.
YouTube does not show an incoming preview The URL or key may be wrong, the stream may not be started as configured, or the encoder may have failed to connect. Recheck the server URL and key in Live Control Room, inspect FFmpeg output, and confirm the stream’s setup and lifecycle settings.
Video or audio is rejected or behaves unexpectedly The output codec, bitrate, frame rate, keyframe interval, or stream layout may not match the selected setup. Compare the actual output with YouTube’s current settings table for that codec and resolution; verify the two-second keyframe target and audio configuration.
Dropped frames or unstable stream health The upload may not sustain the configured bitrate, or the host may not encode quickly enough. Check sustained upload capacity and encoder load, lower output demands if needed, and test again with headroom. Do not size the stream to a speed-test peak.
The stream stops after running for a while FFmpeg may have exited, the host or network may have failed, or YouTube ingest may have disconnected. Inspect logs and Live Control Room health. Add and test process supervision or a fallback path if your uptime needs warrant it; looping alone does not recover these failures.

Or let it run in the cloud

If you want a YouTube loop without keeping a home computer and connection running, StreamNeo is a cloud service for uploaded videos: upload your recording or build a playlist, add your YouTube stream key once, and go live. It keeps the loop running in the cloud, offers automatic recovery if YouTube drops the stream, and plays uploads as made up to 4K 60fps at one flat price per slot. The first day is free with no card. The monthly option is $9.99 per month. StreamNeo streams to YouTube only; it does not stream from a camera. Start your free first day with StreamNeo.

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.