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 DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
DocumentaryTube
concat demuxer

How to Use FFmpeg Concat Files for a Continuous YouTube Livestream

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

Use FFmpeg’s concat demuxer to play a text playlist of compatible media files in order, then send the resulting stream to YouTube Live. To keep it repeating, loop the concat input and pace it as a real-time source where your setup requires that. A playlist alone does not guarantee gapless playback or a failure-proof broadcast: matching streams, accurate durations, a suitable output configuration, and a monitored test all matter.

What a concat file does—and what it does not

FFmpeg’s concat demuxer reads a script listing media files and presents their packets in sequence as though they had been muxed together. It adjusts timestamps so the first file begins at zero and each subsequent file begins where the previous one is expected to end. This is a useful no-re-encode approach when the inputs are compatible.

It is not a video editor or a broadcast reliability layer. It does not make mismatched files compatible, correct faulty duration information, or ensure YouTube receives a healthy stream. A wrong duration estimate—including one caused by a truncated file—can produce timestamp artifacts or gaps.

Check the source files before building the playlist

The concat demuxer works best when each file has matching streams, codecs, and time bases. In practice, check that the files have the same relevant video and audio stream layout and compatible encoding properties. Test the actual files together; similar filenames or extensions do not establish compatibility.

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.
  • Use complete, readable source files rather than files that are still being copied or recorded.
  • Check that every entry has the audio and video streams your output workflow expects.
  • Verify durations when continuity matters. Add explicit duration directives only when you know the correct duration; guessing can make timestamp continuity worse.
  • If the files require format conversion or stream-layout changes, use a concat-filter workflow that re-encodes as needed instead of assuming the demuxer can join them unchanged. See the FFmpeg FAQ on concatenating video files.

Create the concat script

Save a UTF-8 plain-text file with one file directive per media file. When the script begins with the exact header below, FFmpeg can recognize the format automatically. The header must be the first line, with no leading spaces or byte-order mark.

ffconcat version 1.0
file 'intro.mp4'
file 'program-a.mp4'
file 'program-b.mp4'

Replace the example names with paths to your own files. If the playlist and videos are not in the same directory, use appropriate paths for your operating system. FFmpeg’s script syntax has specific quoting and escaping rules for paths containing special characters; follow the official concat script syntax rather than assuming shell-style quoting applies.

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.

If a file’s stored duration is inaccurate, the script can include a duration directive after that file’s entry, but only when you have a reliable duration value. The concat demuxer uses duration estimates to position following files, so an incorrect override can introduce rather than fix discontinuities. Consult the concat demuxer documentation for the directive’s syntax and behavior.

Connect the playlist to YouTube Live

The exact FFmpeg command depends on your installed build, the source streams, whether you can copy or must encode them, and the YouTube ingest mode selected for the broadcast. There is no single command that is guaranteed for every playlist and setup. Treat any command assembled for your files as a starting template, then validate it privately before using it for a public livestream.

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. Choose an ingest route in YouTube Live Control Room. For a conventional continuous encoder output, use the RTMP-style ingest route and its configured endpoint. YouTube recommends encrypted RTMPS transport when available. Do not substitute HLS packaging instructions: YouTube’s HLS ingest has separate segment and rolling-playlist requirements and higher latency. See YouTube’s HLS ingestion requirements.
  2. Get the stream URL and key from YouTube. Encoder interfaces may request the stream URL and stream name separately or combine them, depending on the application. Keep the stream key private; anyone who obtains it may be able to send a stream to your channel. See YouTube’s live stream configuration documentation.
  3. Configure FFmpeg’s input and output deliberately. Use the concat script as a concat-demuxer input, loop it using the loop option documented for your installed FFmpeg version, and pace file input in real time when appropriate for your source and output. Select an encoder, container, and protocol supported by the chosen YouTube ingest route. Do not assume stream copy is valid unless the combined source streams and output requirements support it.
  4. Match YouTube’s video settings guidance. YouTube recommends constant bitrate (CBR), a two-second keyframe interval, and no more than four seconds between keyframes. Use settings suited to the resolution, frame rate, encoder, and ingest profile you select; these are platform recommendations, not proof that a particular command will work with every input. Review YouTube’s live encoder settings.
  5. Test and monitor. Before going live to viewers, test with representative motion and audio, inspect FFmpeg’s logs, confirm YouTube receives healthy video and audio, and monitor stream health during the broadcast. A successful start does not establish that every later file transition will be clean.

Choose between the concat demuxer and concat filter

Approach When it fits Trade-off
Concat demuxer Input files have compatible streams, codecs, and time bases, and you want to join packet streams without re-encoding. Duration inaccuracies or incompatibilities can cause artifacts or gaps; it does not normalize unlike inputs.
Concat filter Inputs need processing or re-encoding to concatenate them as a consistent output. Requires encoding rather than the demuxer’s no-re-encode path; configure and test the output for the chosen YouTube ingest.

FFmpeg’s FAQ recommends the concat filter when concatenation requires re-encoding; the demuxer is the no-re-encode option when the formats and streams are compatible. The two methods solve different input problems, so choose based on the files rather than on a blanket preference for one command.

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

Keep the broadcast running—and know the limits

A repeated playlist is only one part of a continuous livestream. The machine running FFmpeg, its network connection, the process itself, source-file access, and YouTube’s ingest all remain potential failure points. Check logs and stream health rather than treating a looping input as a guarantee that the channel stays live.

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

For a cloud-hosted alternative to maintaining your own FFmpeg process, StreamNeo keeps a YouTube channel live from 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 uploaded quality up to 4K 60fps at one price per slot, with automatic recovery if YouTube drops the stream. The first day is free with no card. Monthly pricing is $9.99 per month. Start your free day with StreamNeo.

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.

Troubleshoot common failures

  • FFmpeg does not recognize the script: Check that ffconcat version 1.0 is the exact first line, with no leading whitespace or byte-order mark, and that the input is specified as a concat-demuxer script.
  • A file cannot be opened: Check each path relative to where FFmpeg is running, confirm permissions and filenames, and apply FFmpeg’s documented escaping rules to special characters.
  • Video or audio breaks at a transition: Compare the files’ streams, codecs, and time bases, and verify that the files are complete. Incorrect duration estimates can misplace following timestamps; use a known duration only if adding an override.
  • The stream starts but YouTube reports unhealthy video or audio: Review FFmpeg logs and output settings against the selected ingest route, then test with representative audio and motion. Confirm that the chosen container, protocol, encoder, and stream layout work together.
  • Playback is not continuous or the broadcast stops: Confirm the input loop and real-time pacing behavior for your installed FFmpeg build, then investigate process, machine, network, and ingest health separately. A concat playlist does not recover a failed local process or connection.
  • The stream key may have been exposed: Treat it as a credential. Replace or reset it through YouTube’s live setup and update the encoder configuration before resuming.

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.

Read next

Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

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.