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 DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
VGSources
FFmpeg

How to Set Up a YouTube Livestream Playlist Rotation with FFmpeg on Windows

Use an FFmpeg concat playlist and an indefinitely looping RTMP command to play local videos in sequence on YouTube Live from Windows.

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

To loop local videos into a YouTube Live broadcast from Windows, put their paths in an FFmpeg concat playlist, then send that playlist to YouTube with -stream_loop -1 and real-time pacing. You will need FFmpeg, compatible source files, and the server URL and stream key from YouTube Studio. Your PC and internet connection must remain running for this local method to continue.

What you need before you start

  • A Windows computer with FFmpeg installed and available in Command Prompt or PowerShell.
  • Video files in the order you want them to play. For the simplest concat-demuxer setup, files need matching streams, codecs, and time bases.
  • A YouTube Live stream and its ingest server URL and stream key from YouTube Studio.
  • An internet connection and a computer that can stay on while FFmpeg encodes and sends the stream.

This example re-encodes video to H.264 and audio to AAC, which can accommodate more varied inputs than stream-copying, but it is not a universal preset or a tested performance guarantee. Check the files and YouTube’s current encoder guidance for your chosen resolution and frame rate.

Prepare the playlist files

Organize the video files

Create a directory such as C:/livestream/ and place the videos there. Choose the playback order before creating the list. Matching codecs and stream layouts make the concat demuxer approach most straightforward; files with substantially different formats may need normalization or a filter-based re-encode instead.

Create playlist.txt

Save a text file named playlist.txt, for example in C:/livestream/, with one file entry per line:

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.
file 'C:/livestream/clip01.mp4'
file 'C:/livestream/clip02.mp4'
file 'C:/livestream/clip03.mp4'

Forward slashes in quoted Windows paths avoid backslash escaping issues in the playlist. The concat demuxer’s safe-path option defaults to 1 and rejects paths it considers unsafe. This tutorial uses -safe 0 for absolute paths; only do so with a playlist you created and trust, because it permits arbitrary file names and directives.

Get the YouTube stream URL and key

  1. In YouTube Studio, select Create → Go Live.
  2. On the Stream tab, create or select the stream. For a scheduled broadcast, use Manage → Schedule stream and set its metadata and privacy.
  3. Copy the server URL and stream key shown for that stream. YouTube’s encoder instructions say to enter these in the encoder settings: YouTube Live encoder setup.

Treat the stream key like a password. Do not publish it in screenshots, recordings, or logs. If it is exposed, replace or reset it in YouTube Studio before using it again.

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.

Send the playlist to YouTube with FFmpeg

Open PowerShell or Command Prompt in a working directory and run this pattern, replacing the destination with the exact ingest URL and stream key YouTube provides:

ffmpeg -re -stream_loop -1 -f concat -safe 0 -i "C:/livestream/playlist.txt" -c:v libx264 -preset veryfast -c:a aac -f flv "rtmp://YOUR_INGEST_URL/YOUR_STREAM_KEY"
  • -re paces prerecorded input at its native rate instead of sending the files as quickly as the computer can read them.
  • -stream_loop -1 repeats the input indefinitely.
  • -f concat reads the playlist as a concat-demuxer script; -safe 0 allows the absolute paths in this example.
  • -c:v libx264 and -c:a aac re-encode video and audio. -preset veryfast is an encoder speed setting, not a promise that every computer can handle every resolution or frame rate.
  • -f flv selects the output container for the RTMP destination shown here.

Input options such as -re and -stream_loop belong before the relevant -i. The destination format is RTMP; do not apply HLS-specific segment settings to this command. YouTube’s exact current bitrate and resolution recommendations vary with the selected video settings; consult its live encoder settings and verify the values for your stream rather than treating this command as a bitrate preset.

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.

Preview, start, and stop the broadcast

  1. After FFmpeg begins sending data, check the preview and stream status in YouTube Live Control Room.
  2. For a scheduled broadcast, click Go live once the preview appears. Sending data from FFmpeg alone does not start the scheduled public broadcast.
  3. To finish, stop FFmpeg’s output, then use End Stream in Studio where appropriate.

YouTube states that streams under 12 hours are automatically archived. That statement is not an archive guarantee for longer streams.

Choose the right concat method for your files

Method When it fits Trade-off
Concat demuxer Files have the same streams, codecs, and time base and can be joined as a virtual input. Can avoid re-encoding when compatible; inaccurate duration metadata can cause artifacts as the next segment is positioned.
Concat filter Inputs need to be brought together while re-encoding. Requires an encoding workflow; check FFmpeg’s concat documentation for filter setup: concat filter.

The playlist demuxer uses file durations to place the next segment. A truncated file or incorrect duration metadata can cause glitches or timing problems. The concat list format supports a duration directive when an override is needed. See FFmpeg’s concat demuxer documentation.

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.

RTMP versus HLS

This procedure uses RTMP for a basic FFmpeg-to-YouTube setup. HLS is a separate ingestion option for supported encoder workflows, including certain HDR or codec requirements. YouTube’s HLS workflow has specific requirements: TS segments of 1–4 seconds, a rolling playlist with no more than five outstanding segments, HTTPS POST/PUT, and no byte-range support. YouTube also notes that HLS has higher latency than RTMP. Unless your encoder workflow specifically calls for HLS, do not substitute HLS configuration into the RTMP command above. See YouTube’s HLS ingestion instructions.

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

Troubleshoot common problems

Symptom Likely cause What to check
FFmpeg rejects a playlist path The concat demuxer’s safe-path checks reject the entry. Use simple quoted paths; if using -safe 0 for absolute paths, ensure every playlist entry is trusted.
Artifacts or jumps at a clip boundary Incompatible stream layouts, codecs, time bases, or inaccurate duration metadata. Inspect source compatibility and duration metadata; normalize/re-encode or use a concat-filter workflow when needed.
The preview does not appear in Live Control Room The destination URL or key may be wrong, or FFmpeg may not be sending successfully. Copy the matching server URL and key from the selected stream in Studio, check FFmpeg’s output for connection errors, and keep the key private.
FFmpeg exits or playback stutters under load The computer may not sustain the selected encoding settings, or an input may be problematic. Check FFmpeg’s error output and source files, then use settings supported by your hardware and YouTube’s current encoder guidance.
A scheduled stream remains in preview but is not live The operator has not started the scheduled broadcast in Studio. Once the preview appears, click Go live.
The loop seems to end The FFmpeg process may have stopped or encountered an input/output error. Check whether the command is still running and inspect its last error output; -stream_loop -1 loops only while FFmpeg continues operating.

Keep the stream compliant and manageable

Looping files does not grant rights to their contents. Use video and audio you own or are licensed to stream, and review YouTube’s copyright and monetization policies before building a long-running rotation. Repeated or reused material can raise policy issues even when the playlist and encoder work technically. Keep an eye on the Live Control Room status rather than assuming a running computer means YouTube is receiving a healthy broadcast.

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.

Keep credentials and files safe

  • Do not share the stream key; remove it from public command examples and screenshots.
  • Use a playlist you control when disabling safe-path checks.
  • Keep the media files and playlist available at the same paths for the entire run.

Estimate upload time before starting

Large source files can take time to upload to a cloud service if you choose one instead of local FFmpeg. StreamNeo provides a upload-time calculator to estimate that transfer from your connection speed.

Or let it run in the cloud

If you want the YouTube playlist to keep running without leaving a Windows PC and home connection on, StreamNeo is an alternative: upload your recording or build a playlist, add your YouTube stream key once, and go live. It loops uploaded videos from the cloud; it does not stream from a camera.

  • Nothing has to stay on at home for the cloud stream to continue.
  • Any quality up to 4K 60fps streams as uploaded at one flat price per slot, without re-encoding or quality tiers.
  • Automatic recovery is included if YouTube drops the stream.
  • The first day is free with no card, one free day per account.

Monthly pricing: $9.99 per month. See StreamNeo for plan details, or start your free first 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 Patch Notes

Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
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.