Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober 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 Scan×
Skip to content
VGSources
Concat Demuxer

How to Stream a Folder of Videos to YouTube with FFmpeg’s Concat Demuxer

Use FFmpeg’s concat demuxer to play compatible folder videos in order and send them to YouTube Live. Includes setup, encoder settings, security, and troubleshooting.

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

To stream videos in a folder to YouTube one after another, create an ordered FFmpeg concat-demuxer list, then send its output to the stream URL and key shown in YouTube Studio’s Live Control Room. Direct concatenation works only when the files have matching streams, codecs, and time bases; mixed files may need to be normalized first.

Before you start

  • Install FFmpeg and make sure its ffmpeg command is available in your terminal or command prompt.
  • Have the video files ready and check whether they use compatible streams, codecs, and time bases. FFmpeg’s concat demuxer documentation describes these requirements.
  • Your YouTube channel must be eligible to livestream. YouTube’s live-streaming eligibility guidance says channels need verification, no live-streaming restriction in the prior 90 days, and a user who is at least 16. Account restrictions and requirements can change, so check YouTube Help before the event.

Make an ordered list of the videos

Create a plain-text file named videos.ffconcat in the folder containing the videos. Put the exact header on the first line, then add one file entry per video. The entry order is the playback order; do not rely on the operating system’s folder listing to choose it for you.

ffconcat version 1.0
file 'clip-01.mp4'
file 'clip-02.mp4'
file 'clip-03.mp4'

Use simple relative filenames where possible. Paths containing whitespace or special characters must follow FFmpeg’s concat-script quoting and escaping rules. The demuxer’s safe mode is enabled by default and rejects some paths and directives. Avoid disabling it unless you understand the security implications and trust every path and list entry.

Generating the list for a larger folder

If you generate the list automatically, sort the filenames explicitly and escape each path for FFmpeg’s concat syntax. This prevents an unexpected playback order and avoids malformed entries. Keep the generated list beside the media and use relative paths when practical.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Get YouTube’s stream URL and key

  1. Open YouTube Studio and go to the Live Control Room. Create or select the live stream you intend to use.
  2. Copy the stream URL and stream key displayed there. YouTube describes a stream key as “your YouTube stream’s password and address” in its Manage live stream settings help page.
  3. Keep the key private. Do not publish it in a script, screenshot, code repository, or shared command. If it may have been exposed, reset it in Live Control Room.
  4. Prefer the RTMPS URL if your FFmpeg setup supports it. YouTube explains how to reveal and copy the RTMPS URL in its RTMPS ingestion guidance.

Choose output settings that fit the files and connection

The command below re-encodes the concatenated video as H.264 and audio as AAC, with constant bitrate output and a two-second keyframe interval. Encoding to a consistent output profile can be useful when the source files need normalization, but it requires more CPU than copying compatible streams. The example is not a universal quality or bitrate prescription: choose resolution and bitrate based on the source material, available upload capacity, and YouTube’s current encoder guidance.

As checked on 2026-10-03, YouTube’s encoder guidance recommends 10 Mbps for H.264 at 1080p30 and 4 Mbps at 720p30. It recommends CBR and keyframes every two seconds, and says not to exceed four seconds. The page also lists H.264, H.265/HEVC, and AV1 video options and AAC or MP3 audio; exact codec compatibility depends on the ingestion protocol and current YouTube support. Check the live YouTube encoder settings before streaming.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

Start the FFmpeg stream

From the folder containing videos.ffconcat, run this example after replacing the placeholders. Use the RTMPS URL copied from YouTube when supported; otherwise use the matching URL provided in Live Control Room.

ffmpeg -re -f concat -safe 1 -i videos.ffconcat 
  -c:v libx264 -preset veryfast -b:v 10M -maxrate 10M -bufsize 20M 
  -pix_fmt yuv420p -g 60 -keyint_min 60 -sc_threshold 0 
  -c:a aac -b:a 128k -ar 44100 
  -f flv "RTMPS_OR_RTMP_URL/STREAM_KEY"

This example’s 10 Mbps video bitrate and 60-frame GOP correspond to the 1080p30 H.264 example profile: at 30 frames per second, 60 frames is two seconds. If your chosen resolution or frame rate differs, adjust the bitrate and GOP accordingly. Do not paste a real key into a public post or a script you plan to share. FFmpeg’s -re reads at a rate suitable for live output rather than sending the file as fast as possible; -f flv is used for RTMP-family output.

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.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
  1. Start FFmpeg and check that it connects without errors.
  2. In Live Control Room, wait for the encoder preview. For a scheduled stream, select Go live when the preview is ready.
  3. Watch YouTube’s stream-health indicators during the broadcast, especially after it begins and when the video changes.
  4. When finished, stop FFmpeg and follow the Live Control Room end-stream workflow as applicable.

When the files do not concatenate cleanly

Streams, codecs, or time bases differ

The concat demuxer is a packet-level method, not a general-purpose converter. Compare the files’ stream count, codecs, and time bases. If they do not match, normalize the inputs to a common format before concatenating or use a different workflow that decodes and re-encodes them. The right conversion settings depend on the actual sources and target profile, so there is no safe one-command fix for every mixed folder.

There are gaps or timestamp artifacts

FFmpeg calculates the next file’s timestamps using the preceding file’s duration. Incorrect or missing duration estimates can create gaps or artifacts. If you know a file’s correct duration, the concat list supports a duration directive to override the estimate; use an accurate value rather than guessing.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

A path is rejected

Safe mode is on by default and allows only a restricted set of relative paths and directives. Rename files to simple portable names and use relative entries if possible. Use -safe 0 only for a trusted list and paths that require it; this disables a safety check, not a compatibility requirement.

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

Troubleshooting the YouTube connection

  • No encoder preview or connection failure: Check that the stream URL and key were copied correctly, that the URL uses the selected protocol, and that your FFmpeg build supports the protocol. YouTube’s RTMPS guidance notes that some encoders may not support RTMPS.
  • Stream health warnings: Check that your sustained upload capacity can handle the selected output bitrate. Test with representative movement and audio before the event, and monitor stream health while live.
  • Unexpected playback order: Reorder the file lines in videos.ffconcat; the list, not the directory, controls sequence.
  • The stream starts but later stops: Check FFmpeg’s terminal output and the Live Control Room status, then verify the input list, connection details, and local network stability before restarting.

Copyright and reused-content considerations

Only stream videos and audio you have the rights or permission to use. A livestream does not remove copyright obligations, and YouTube’s rules and channel-specific restrictions still apply. If the videos are repetitive or reused, assess whether the channel’s content meets YouTube’s current monetization and platform policies rather than assuming that looping makes it eligible. See YouTube’s channel monetization policies and copyright guidance.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
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.

Or let it run in the cloud

FFmpeg requires a computer and reliable connection to keep sending the stream. StreamNeo is a YouTube-only cloud service for uploaded videos: upload a recording or build a playlist, add your YouTube stream key once, and go live. Nothing has to stay on at home; it streams files as uploaded up to 4K 60fps at one price per slot, and automatically recovers if YouTube drops the stream. The first day is free with no card. Monthly is $9.99 per month. See StreamNeo, or start your free 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 Patch Notes

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

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.