October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
DocumentaryTube
FFmpeg

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

Use an FFmpeg concat playlist and an endlessly looped real-time input to play local videos in sequence on YouTube Live from Windows.

By DocumentaryTube Team 6 min read

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.

To rotate local videos in a YouTube Live broadcast from Windows, put their paths in an FFmpeg concat playlist, then have FFmpeg read that playlist in real time and loop it indefinitely. YouTube supplies the ingest URL and stream key in Live Control Room. This setup keeps the rotation running only while FFmpeg and the computer are running; the instructions below cover the local workflow, compatibility checks, and common failure points.

What you need before you start

  • FFmpeg installed and available from Command Prompt or PowerShell. Verify by running ffmpeg -version.
  • A Windows computer with the video files stored locally and enough capacity to encode them if you use the example’s H.264/AAC re-encoding.
  • A YouTube channel enabled for live streaming and a stream created or scheduled in YouTube Studio.
  • The stream’s server URL and stream key from YouTube Live Control Room. Treat the key like a password: anyone with it may be able to send video to your stream.

This method sends pre-recorded video files as a live broadcast; it is not a camera-based live workflow. FFmpeg and YouTube configuration are separate: the playlist determines which files play and in what order, while Studio controls the broadcast’s title, privacy, and other metadata.

Prepare the videos and decide their order

Place the files in a dedicated folder, for example C:/livestream/, and decide the order in which they should play. For the concat demuxer to join files as one virtual input, the files need the same streams, codecs, and time base. Similar-looking MP4 files are not necessarily compatible internally.

If the sources differ substantially, normalize or transcode them before using this copy-oriented concatenation approach, or use FFmpeg’s concat filter and re-encode. The demuxer uses each file’s duration to position the next one; inaccurate duration metadata, including metadata on a truncated file, can cause artifacts or incorrect transitions. The concat script supports a duration directive if you need to override a file’s duration.

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.

Create the concat playlist file

  1. Open a text editor and create a file named playlist.txt in C:/livestream/.
  2. Enter one file per line in the exact playback order. For example:
    file 'C:/livestream/clip01.mp4'
    file 'C:/livestream/clip02.mp4'
    file 'C:/livestream/clip03.mp4'
  3. Save the file as plain text. Forward slashes in these quoted Windows paths avoid backslash-escaping problems in the playlist syntax.

FFmpeg’s concat demuxer defaults to -safe 1, which rejects paths it considers unsafe. The command below uses -safe 0 so the playlist can contain absolute paths. Use that option only with a playlist you created and trust: it permits arbitrary filenames and directives.

Create the YouTube stream and copy its destination

  1. In YouTube Studio, select Create → Go Live, then use the Stream tab to create or select a stream.
  2. For a scheduled broadcast, use Manage → Schedule stream and set its title, privacy, and other metadata.
  3. Copy the server URL and stream key shown for that stream. Enter them in FFmpeg’s output destination in the next step; keep the key private and out of screenshots or shared logs.

YouTube’s encoder setup instructions say to enter the Live server URL and stream key in the encoder: YouTube Help: Set up your encoder for live streaming.

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.

Run FFmpeg and loop the playlist

Open Command Prompt or PowerShell and run this starting pattern, replacing the destination with the ingest URL and stream key YouTube provided:

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 the prerecorded input at its native rate instead of sending it as fast as the computer can read it.
  • -stream_loop -1 repeats the input indefinitely.
  • -f concat selects the concat demuxer for the playlist.
  • -safe 0 allows the absolute Windows paths in this trusted playlist.
  • -i names the playlist input. Input options appear before the relevant -i.
  • -c:v libx264 and -c:a aac re-encode video and audio to H.264 and AAC; -preset veryfast sets the x264 encoding preset.
  • -f flv selects the output container used for this RTMP-style destination.

This is an illustrative starting command, not a tested universal preset. The right resolution, frame rate, bitrate, keyframe interval, and encoder choices depend on your files, hardware, and YouTube’s current recommendations. Check YouTube’s live encoder settings guidance for the selected resolution and frame rate instead of relying on hard-coded values from an example. Re-encoding can accommodate more varied source encodings than stream copy, but it still requires compatible inputs and sufficient encoding capacity.

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.

Check the preview and start the broadcast

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

YouTube says streams under 12 hours are automatically archived. That statement does not guarantee an archive for broadcasts lasting 12 hours or longer; do not rely on an archive as the only copy of important material.

Choose the right concatenation and delivery approach

Concat demuxer or concat filter

Approach When it fits Trade-off
Concat demuxer Files have matching streams, codecs, and time bases, and can be joined as a virtual input. Can avoid re-encoding when the source streams are compatible; incorrect duration information can disrupt segment placement. See FFmpeg concat demuxer documentation.
Concat filter The workflow needs re-encoding or the sources need to be made consistent during concatenation. Requires an encoding step and its associated processing capacity. See FFmpeg concat filter documentation.

RTMP or HLS

The command in this guide uses an RTMP-style output. HLS is a different YouTube ingest path for supported encoders and use cases, including some HDR or codec requirements. It involves separate segment and playlist configuration and has higher latency than RTMP. YouTube’s HLS guidance specifies TS segments of 1–4 seconds, a rolling playlist with no more than five outstanding segments, HTTPS POST/PUT, and no byte-range support; do not apply those HLS-specific settings to this basic RTMP command. See YouTube Help: Use HLS for live streaming.

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.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot common problems

FFmpeg rejects the playlist or cannot open a file

  • Check that each listed path exists, is spelled correctly, and is enclosed in single quotes.
  • Use forward slashes in absolute paths, and confirm the playlist is saved as plain text rather than with an unintended extension such as playlist.txt.txt.
  • If FFmpeg reports an unsafe path, confirm the list is trusted and that the command includes -safe 0.

Playback breaks, shows artifacts, or shifts at a file boundary

  • Check that every file has the same streams, codecs, and time base when using the concat demuxer.
  • Inspect files for truncation or incorrect duration metadata; correct a duration with a concat duration directive when appropriate.
  • For materially different inputs, normalize or transcode them first, or change to the concat filter and re-encode.

YouTube receives no video or does not show a preview

  • Confirm FFmpeg is still running and producing output rather than exiting with an error.
  • Recheck the server URL and stream key against the selected stream in Live Control Room. Do not paste a real key into a public help request.
  • Verify the output is configured for the intended protocol and container; this example uses an FLV output to an RTMP-style destination, not HLS.
  • Check YouTube’s current encoder settings for the chosen resolution and frame rate rather than guessing a bitrate or keyframe interval.

The computer cannot encode smoothly

The example re-encodes to H.264/AAC, which can be demanding for a slower computer or high-resolution source. Check FFmpeg’s output for encoding errors or lag, then reduce the encoding workload or prepare compatible files in advance. Any change to resolution, frame rate, bitrate, or keyframe interval should remain within YouTube’s current recommendations for your chosen output.

Or let it run in the cloud

If you want a YouTube playlist rotation without leaving a Windows computer running, StreamNeo runs uploaded videos from the cloud: upload the recording or build a playlist, add your YouTube stream key once, and go live. Nothing has to stay on at home; each slot streams the uploaded quality up to 4K 60fps at one flat price, with automatic recovery if YouTube drops the stream. The first day is free with no card. Monthly pricing is $9.99 per month.

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.

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.

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 Screening Room

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.