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

To rotate videos stored across several folders, generate a text playlist that lists each file in the order you want, then pass that playlist to FFmpeg’s concat demuxer. This works best when every file has matching stream layouts, codecs, and time bases. If they differ and you can re-encode, use the concat filter workflow instead. The playlist is a fixed sequence: it does not, by itself, watch folders for new files.

Choose the right FFmpeg concatenation method

FFmpeg’s concat demuxer reads a sequence of files and adjusts their timestamps so each follows the previous one. It is the straightforward option for a fixed playlist when the inputs are compatible. See the FFmpeg concat demuxer documentation and the FFmpeg FAQ on concatenating video files for the method’s requirements and alternatives.

  • Use the concat demuxer to play listed files in sequence without a re-encode, provided their streams, codecs, and time bases match.
  • Use the concat filter when you need to re-encode or normalize inputs that do not match. The filter workflow is more involved because it processes media streams rather than simply reading a compatible file list.
  • Do not assume folder rotation is automatic. The demuxer reads the paths in the playlist; scanning folders, choosing files, and setting their order are separate tasks.

FFmpeg’s documentation warns that concat demuxer inputs must have the same streams, including codecs and time bases. Stream-length mismatches can also introduce gaps. A 2024 FFmpeg-user mailing-list reply about files with varied formats, dimensions, and aspect ratios recommends transcoding to consistent properties before concatenating; treat that as practical community advice, not a guarantee for every file set or build. See the January 2024 mailing-list discussion.

Build a playlist from multiple folders

Create a plain-text concat list with one file directive per video. Put the full path to each file in the order it should play. For example, this illustrates playlist syntax only; it is not a tested command or complete YouTube Live configuration:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Capture Card, 4K HDMI Video Capture Card, Game Capture Card, 1080P 60FPS Video Capture Device, HDMI to USB 3.0 Capture Card for Streaming, Work with Camera/Xbox/PS4/PS5/PC/OBS
  • 【1080P HD High Quality】Capture resolution up to 1080p for video source and it is ideal for all HDMI devices such as PS4, PS3, Xbox One, Xbox 360, Wii U, DVDs, DSLR, Camera, Security Camera and set top box. Note: Video input supports 4K30/60Hz and 1080p120/144Hz. Does not support 4K120Hz/144Hz. Output supports up to 2K30Hz.
  • 【Plug and Play】No driver or external power supply required, true PnP. Once plugged in, the device is identified automatically as a webcam. Detect input and adjust output automatically. Won't occupy CPU, optional audio capture. No freeze with correct setting.
  • 【Compatible with Multiple Systems】suitable for Windows and Mac OS. High speed USB 3.0 technology and superior low latency technology makes it easier for you to transmit live streaming to Twitch, Youtube, Facebook, Twitter, OBS, Potplayer and VLC.
  • 【HDMI LOOP-OUT】Based on the high-speed USB 3.0 technology, it can capture one single channel HD HDMI video signal. There is no delay when you are playing game live.
  • 【Support Mic-in for Commentary】Rybozen capture card has microphone input and you can use it to add external commentary when playing a game. Please note: it only accepts 3.5mm TRS standard microphone headset.
file '/media/folder-a/clip-01.mp4'
file '/media/folder-b/clip-02.mp4'
file '/media/folder-a/clip-03.mp4'
  1. Decide the order. Choose alphabetical order, a shuffled sequence, or a schedule you define. A directory’s name or the concat demuxer does not determine your intended rotation.
  2. Enumerate the selected files. Scan the folders with a script or other file-management method, then write the chosen paths into the list. The concat demuxer does not scan directories for you.
  3. Save the list. Keep it in a location accessible to the FFmpeg process, and use path quoting appropriate to your operating system and FFmpeg version. Confirm how paths containing quotes or special characters should be escaped before using them.
  4. Check representative inputs. Verify that files have compatible streams, codecs, and time bases before relying on a long playlist. If they are heterogeneous, test a normalized, re-encoded set with the concat filter instead.

The playlist example above demonstrates only the list format. It does not specify a complete FFmpeg invocation, encoder settings, an RTMP destination, or a stream key.

Looping a fixed list is not the same as watching folders

A finite playlist can be repeated as a workflow choice, but repeating it does not discover videos added later. The concat documentation establishes sequential reading of the paths in a list; it does not establish a robust live-refresh mechanism for edits to that list or a directory watcher. If your playlist changes, do not assume a running FFmpeg process will pick up the change seamlessly. Plan to regenerate the list and restart or otherwise manage the process, then test the behavior with your exact FFmpeg build and files.

Rank #2
Guermok Video Capture Card, 4K USB3.0 HDMI to USB C, 1080P 60FPS & 2K 30FPS
  • 【1080P 60FPS Video Capture Card】 This HDMI game capture card is based on USB3.0 high speed transmission port, input resolution up to 4K@30HZ, output resolution up to 2K@30Hz or 1920×1080@60Hz. Type c and USB interface can meet most of the devices in daily life. Easily meet the online capture, real-time recording, online meetings, live gaming and other functions, so you have a better visual enjoyment. Note: For capture use only; requires capture software to function and is not intended for direct screen casting to a monitor or TV
  • 【Ultra Low Latency Screen Sharing】 HDMI capture card is made of good quality aluminum alloy with strong heat dissipation, allowing you to enjoy ultra low latency while live gaming or video recording or live streaming, avoiding blue screens and lag. This HDMI to USBC capture card supports easy recording of good quality audio or HD video and transferring it to your computer or streaming platform, allowing you to record 60 fps HD video directly on your hard drive and real-time preview
  • 【Plug and Play, Easy to Carry】 This HDMI 1080P video capture card does not require any additional drivers or external power supply, just plug and play for fast capture. The capture card is small and lightweight, so you can put it in your bag for emergencies, making it very portable for outdoor live streaming. It's also a great way to share content in game recording, video conference, video recorder and online teaching
  • 【Wide Compatibility USB Capture Card】 Easily streams to Facebook, Youtube or Twitch. With the connection, this HDMI to USB C/3.0 video capture devices can be working on several Operating Systems and various software: Windows 7/ 8/ 10, Mac OS or above, Linux, Android, Laptop, Xbox One, PS3/PS4/PS5, Camera, DVDs, Set Top Box, Webcame, DSLR, Switch/Switch 2, TV BOX, HDTV, Potplayer/VLC, ZOOM, OBS Studio etc.
  • 【Package Content & Note】 1x HD Audio Capture Card , 1x USB 3.0 to USB C Adapter (A-side 3.0, B-side 2.0), 1x user manual. Please note that you need to restart the OBS Studio software after the audio setup is complete, otherwise it will result in no sound output. When using an adapter, if the device is recognized as USB 2.0, try using the other side with the USB-C port. Simply flip the capture card and reconnect it to be recognized as USB 3.0

Connect FFmpeg to YouTube Live carefully

The concat setup determines which media FFmpeg reads; it does not establish the current YouTube ingest address, stream-key procedure, or recommended output settings. Before building a production command, check YouTube’s current official live-streaming instructions and the requirements shown for your own event. Confirm the output against your FFmpeg build, source streams, and destination settings rather than copying an unverified RTMP command.

  • Keep the stream key private; treat it as a credential and do not publish it in scripts, screenshots, or logs that others can access.
  • Test the complete chain with representative files before scheduling a continuous broadcast, including audio, transitions between files, and the destination’s acceptance of the output.
  • Use only material you have the rights to stream. A technically valid playlist does not establish permission to broadcast its contents, and YouTube’s current copyright and reused-content rules should be checked for the channel and content involved.

Troubleshoot common playlist problems

Symptom Likely cause What to check
FFmpeg cannot open a listed file The path is incorrect, inaccessible to the process, or quoted incorrectly for the operating system or build. Check the exact path, permissions, playlist location, and escaping rules for paths with special characters.
Files fail to concatenate cleanly Inputs may have different streams, codecs, or time bases, which the concat demuxer requires to match. Inspect the files and test a representative sequence. If properties differ, normalize or transcode them and use the concat filter workflow.
There is a gap or an unexpected transition Stream durations may not align, or source files may have differing media characteristics. Review the source files around the transition and test the full sequence; the demuxer may introduce gaps when stream lengths do not align.
A newly added video does not play The running process is reading its existing sequence rather than acting as a verified folder watcher. Regenerate the playlist and use a tested restart or process-management approach; seamless live refresh is not established by the concat-list workflow.
YouTube does not accept the output The destination configuration or output settings may not match current platform requirements. Check YouTube’s current official instructions and the event’s ingest details, then validate the complete command with your FFmpeg version and stream key.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or let it run in the cloud

If your goal is to keep uploaded videos playing continuously on a YouTube channel rather than to build and maintain an FFmpeg playlist, StreamNeo is the cloud alternative. Upload a recording or build a playlist, add your YouTube stream key, and go live. Nothing has to stay on at home; it plays uploads, not a live camera feed. It keeps the video at its uploaded quality up to 4K 60fps for one flat 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. This is a different workflow from configuring FFmpeg directly. Start with StreamNeo’s free first day.

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 #4
Sale
Elgato 4K X Capture Card, HDMI 2.1, 4K144 Ultra-Low Latency
  • Seamless Broadcasting and Versatile Streaming: Connect effortlessly to any app such as OBS, Streamlabs, Twitch Studio, Restream, Zoom, Teams, and stream flawlessly on various platforms like YouTube, Twitch, Discord, Facebook Gaming, etc., providing you with unparalleled flexibility and reach.
  • Next-gen capture: Unleash the full potential of your content with cutting-edge 4K resolution, delivering crystal-clear visuals at an impressive 144 frames per second.
  • HDMI 2.1 in/out: Elevate your recording capabilities with HDMI 2.1 support, allowing you to document high frame rates up to 240fps in glorious 1080p resolution for an unparalleled viewing experience.
  • VRR passthrough: Immerse yourself completely in the gaming experience as our Variable Refresh Rate (VRR) passthrough ensures flawlessly smooth gameplay, eliminating screen tearing for an uninterrupted visual feast.
  • Ultra-low latency: Stay in the moment with ultra-low latency powered by USB 3.2 Gen 2, ensuring your broadcast and gameplay remain perfectly synchronized, delivering an immersive and responsive streaming experience.
Rank #3
Capture Card 4K HDMI Video Streaming to USB 3.0 1080P 60FPS Capture Device
  • High-Quality Video Capture, 4K HDMI Capture Card Ready: Capture smooth and vibrant video with this 4K HDMI capture card, engineered for gamers and content creators who demand crisp 1080P 60FPS video quality. Whether you're streaming to Twitch or recording gameplay for YouTube, your footage will look professional and detailed
  • Plug-and-Play USB Capture Card, No Drivers Needed: Designed as a USB capture card for streaming, this device works instantly out of the box, just plug into your PC or laptop and start capturing. Fully compatible with popular software like OBS Studio, Streamlabs, and XSplit, making setup quick and stress-free for beginners and pros alike
  • Universal Compatibility PS5, Xbox, Switch & More: Stream or record gameplay from virtually any HDMI-enabled device including Nintendo Switch, PS5, Xbox Series X, DSLR cameras, and PCs. The video capture card for gaming supports seamless passthrough so you can play without lag while your audience watches every frame in real time
  • Low-Latency Performance for Smooth Streaming: This capture card for streaming minimizes delay between gameplay and broadcast, so you get reliable, low-latency capture that works well for competitive gaming, live broadcasts, and podcast sessions. Suitable for those building their channel with high-quality, engaging content
  • Compact & Portable Design for Content Creators: Lightweight and portable, this USB 3.0 capture card works well for creators who travel or switch gaming setups often. Throw it in your bag and stream or record wherever you are, at home, events, LAN parties, streaming or studio sessions

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.