To loop a playlist of local videos into YouTube Live, put the filenames in an FFmpeg concat-demuxer playlist, then run FFmpeg with -stream_loop -1 and your YouTube ingest URL and stream key. Use the concat demuxer with stream copy only when the files’ streams and parameters are compatible; otherwise encode them to a consistent output. The command below is a starting point, not a guarantee for every file or FFmpeg build.
What you need before running FFmpeg
- An installed FFmpeg build with the encoders you plan to use. The example below uses
libx264and AAC. - Local video files FFmpeg can read, and a playlist whose paths point to those files.
- A YouTube channel with live streaming enabled, plus the server URL and stream key shown in Live Control Room.
- A sustained upload connection that can carry the selected video and audio bitrate.
YouTube’s encoder setup guide explains how to create a live stream and obtain the server URL and stream key. Treat the key like a password: do not publish it in a script, screenshot, or log.
Create the concat playlist
Save a UTF-8 text file named playlist.txt alongside the videos, or use paths that correctly point to their locations:
ffconcat version 1.0
file 'clip-01.mp4'
file 'clip-02.mp4'
file 'clip-03.mp4'
When using the explicit ffconcat format, the version header must be the first line. Filenames and paths must be accessible to FFmpeg; paths with quotes or special characters require correct escaping. FFmpeg’s documentation also describes optional per-file directives such as duration and inpoint. Add these only if your playlist needs them and the media supports the intended behavior.
#1 Best Overall
- 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.
Run a looped YouTube Live stream
Replace the two environment-variable values with the server URL and stream key supplied by YouTube. Keep the key private.
ffmpeg -re -stream_loop -1 -f concat -safe 0 -i playlist.txt
-c:v libx264 -preset veryfast -pix_fmt yuv420p
-c:a aac -b:a 128k -ar 44100
-f flv "$YOUTUBE_RTMPS_URL/$YOUTUBE_STREAM_KEY"
-rereads file input at real-time speed rather than sending it as fast as possible.-stream_loop -1asks FFmpeg to repeat the input indefinitely.-f concatselects the concat demuxer;-safe 0relaxes its path restrictions. Use that option only with a playlist you control.-c:v libx264and-c:a aacencode video and audio; the other options set a preset, pixel format, audio bitrate, and sample rate.-f flvselects the output container commonly used for RTMP-style ingest. Use the secure RTMPS server URL provided in YouTube’s setup flow.
This example encodes the files to a common output format. It may need adjustment for your FFmpeg build, shell, media, and stream settings. For the concat demuxer’s stream-copy route, replace the encoding options with -c copy only after verifying that the input streams, codecs, and parameters are suitable for continuous muxing and YouTube ingest. FFmpeg’s FAQ distinguishes the concat demuxer, a candidate for concatenation without re-encoding, from the concat filter, which is used when re-encoding is needed.
Configure and start the stream in YouTube
- In YouTube Live Control Room, create or select the live stream and copy its encoder server URL and stream key.
- Place those values in the command or environment variables, taking care not to expose the key.
- Start FFmpeg and check that YouTube receives the signal and displays a preview.
- When the scheduled stream is ready and awaiting confirmation, use Live Control Room’s Go live control.
- Watch the stream-health indicators while it runs, and check the beginning, transitions between clips, and audio as well as the preview.
YouTube’s encoder settings recommend RTMPS, constant bitrate, and a two-second keyframe interval that should not exceed four seconds. The guide lists H.264, H.265/HEVC, and AV1 for RTMP/RTMPS, frame rates up to 60 fps, and bitrate recommendations that vary by codec, resolution, and frame rate. Choose settings your encoder and sustained upload can maintain, and consult the current guide for the appropriate bitrate rather than treating the example command as a complete settings prescription. YouTube transcodes ingested video for viewer formats.
Rank #2
- 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.
Choose the right concatenation method
Use the concat demuxer when stream copy is practical
The demuxer reads a list of files as one input. If the files have compatible streams and parameters, stream copy may avoid a new encode. Compatibility is not automatic: mismatched codecs, stream layouts, or parameters can cause errors or poor transitions. Test the actual playlist rather than assuming any MP4 files can be joined unchanged.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Encode to a consistent output when the inputs differ
The command above encodes video and audio as it streams. If you need to normalize inputs using more involved filtering, FFmpeg’s concat filter is the documented alternative when re-encoding is required. Encoding adds processor load; confirm the machine can keep up at the chosen resolution and frame rate.
Do not confuse input concat with YouTube HLS ingest
The text playlist in this tutorial is an FFmpeg input list, not an HLS media playlist. YouTube has a separate HLS setup path with its own segment and rolling-playlist requirements; YouTube Help describes HLS as higher latency than RTMP. See also Google’s HLS ingestion documentation.
Rank #3
- 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.
Plan for continuous operation and archives
YouTube says streams under 12 hours are automatically archived, according to its encoder setup guidance. Do not assume one longer continuous session will be archived in full under that rule. If you need a run longer than 12 hours, plan the stream lifecycle and archive separately, and verify current behavior for your channel.
For an unattended run, the computer running FFmpeg and its network connection must stay available. A process ending, machine restart, or network interruption can stop the feed; plan how you will monitor and restart it. The command itself does not require a hosted server, but hosted compute is one possible workflow choice when a local machine cannot remain on.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Troubleshooting common problems
FFmpeg cannot find a playlist file or a video
Check the working directory and each path in playlist.txt. Use paths accessible from the machine running FFmpeg, and correct the escaping for quotes or special characters. The ffconcat version 1.0 header, when used, must be the first line.
Rank #4
- 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
The concat input fails or clips do not transition cleanly
Check whether the files have compatible streams, codecs, and parameters. Stream copy cannot make incompatible inputs consistent; encode them to a common output or use the concat filter when your workflow requires re-encoding.
YouTube does not show an incoming preview
Confirm that the server URL and stream key came from the intended Live Control Room stream, that the key has not been mistyped or exposed, and that the encoder is sending to the supplied RTMPS endpoint. Check FFmpeg’s output for connection or encoding errors, then inspect YouTube’s stream-health status.
The stream buffers or reports poor health
Check that the upload connection can sustain the chosen bitrate and that the encoder can maintain the selected resolution and frame rate. Follow YouTube’s current bitrate recommendations for the codec and output settings, and verify constant bitrate and the keyframe interval in the encoder configuration.
Recommended Free Tools
Best Value
- 【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.
The stream stops when left unattended
Look for a terminated FFmpeg process, machine sleep or restart, or loss of network access. A local setup depends on the computer and connection remaining available; provide appropriate monitoring and a restart plan if the stream must continue without supervision.
Or let it run in the cloud
If you want a YouTube channel to keep looping uploaded videos without leaving a computer running, StreamNeo runs the stream from the cloud. Upload a recording or build a playlist, add your YouTube stream key once, and go live. It plays uploaded videos, not a live camera feed.
- Nothing has to stay on at home.
- Any quality up to 4K 60fps streams as uploaded, at one flat price per slot.
- Automatic recovery if YouTube drops the stream.
- The first day is free with no card; one free day per account.
- Monthly: $9.99 per month.
Each slot includes one always-on YouTube stream, 10 GB storage per slot pooled across active slots, 24/7 looping and playlists, and support from the StreamNeo team. See StreamNeo for details. Start your free day on StreamNeo.
Quick Recap
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.




