October 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 NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
VGSources
FFmpeg

How to Create a YouTube Live Playlist from Folder Files with FFmpeg

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.

To loop video files from a folder into a YouTube Live broadcast, put their paths in an ordered FFmpeg concat list, then send that input to YouTube’s ingest URL with a stream key. Use -re to pace file playback in real time and -stream_loop -1 to repeat the list. The folder itself is not a YouTube playlist: FFmpeg reads a text file that defines the order.

1. Create an ordered playlist file

In the folder you will use as the working directory, create a UTF-8 plain-text file named playlist.txt. Put this exact header on the first line, followed by one file line per video in the order you want them played:

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

The header must be the first line for automatic concat-format recognition. Paths are interpreted relative to the process working directory unless you specify otherwise. Names containing spaces or special characters must be quoted and escaped according to FFmpeg concat-script syntax. For paths that FFmpeg considers unsafe, the concat demuxer’s default -safe 1 check rejects them. Prefer safe relative paths; use -safe 0 only when necessary, such as for absolute paths, and only when the playlist contents are trusted. See the FFmpeg concat demuxer documentation.

A list is static while FFmpeg is running. If you add or remove files, regenerate the text file in a deliberate, deterministic order before starting the broadcast; FFmpeg does not automatically discover new folder contents during playback.

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.

2. Check whether the files are compatible

The concat demuxer joins files without making unrelated media compatible. FFmpeg’s documentation says, “All files must have the same streams (same codecs, same time base, etc.).” Compare the files’ video and audio streams, codecs, time bases, dimensions, frame rates, and audio layout. Matching file extensions alone do not establish compatibility.

Use FFmpeg’s probing tools to inspect the inputs. If stream structure or parameters differ, normalize them beforehand by transcoding to a consistent format. Re-encoding takes CPU or GPU capacity and may change quality, but is the safer general approach for mixed sources. Stream copying can reduce processing load when files already match; it still requires validating that transitions and the output container work for the whole sequence.

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.

Concat uses each file’s duration to place the next one. Missing or inaccurate duration metadata can cause artifacts at transitions. If you know a file’s duration accurately, a concat-script duration directive can override its stored duration; do not use an estimate as though it were exact.

3. Get the YouTube Live ingest details

  1. In YouTube Studio, open Live Control Room and create or schedule an encoder stream.
  2. Open the stream settings and copy the ingest URL and stream key shown for that stream.
  3. Keep the key private. Do not put it in a public script, screenshot, or log; an environment variable is one way to avoid writing it directly into a shared file.

The URL is the destination and the key authorizes the incoming stream. Use the exact details shown for the active stream; YouTube’s setup steps are in its encoder stream guide. For a scheduled broadcast, YouTube’s workflow includes checking the incoming preview and then selecting Go live.

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.

4. Send the repeating playlist with FFmpeg

For a compatible set of H.264/AAC MP4 files and an RTMP endpoint, this is an illustrative command shape—not a tested, universally copy-and-run recipe:

ffmpeg -re -stream_loop -1 -f concat -safe 0 -i playlist.txt 
  -c:v libx264 -pix_fmt yuv420p -preset veryfast -b:v 5M -maxrate 5M -bufsize 10M 
  -r 30 -g 60 -c:a aac -b:a 128k -ar 44100 
  -f flv "$YOUTUBE_RTMP_URL/$YOUTUBE_STREAM_KEY"

Set YOUTUBE_RTMP_URL and YOUTUBE_STREAM_KEY in your shell environment to the values YouTube provided. Confirm the exact destination format for your channel and stream. This example uses -safe 0 because folders often involve absolute paths; remove it if your playlist uses safe relative paths. Do not use it with untrusted playlist contents.

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

-re paces file input at its native rate rather than sending it as fast as the machine can read it. -stream_loop -1 is an input option that repeats the input indefinitely. The command re-encodes video and audio to a consistent output; its bitrate, frame rate, and GOP settings are examples, not suitable values for every source or connection. FFmpeg documents these input options in its command-line documentation.

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

5. Choose video and audio settings for YouTube

YouTube’s current RTMP/RTMPS guidance lists H.264, H.265, and AV1 as video codec options; H.264 is used in the example above. It recommends a two-second keyframe frequency and says not to exceed four seconds. For the example’s 30 fps output, -g 60 sets a 60-frame GOP, or two seconds. If you change the frame rate, adjust the GOP to preserve the intended interval. The guidance calls for constant bitrate (CBR), progressive scan, square pixels, and Rec. 709 for SDR; it lists AAC or MP3 audio and recommends stereo AAC at 128 Kbps. Consult YouTube’s live encoder settings for current details.

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.

For H.264, YouTube’s settings page accessed October 3, 2026 lists these recommended bitrates and separate minimums. Recommendations are not minimum requirements:

Output YouTube-recommended H.264 bitrate Listed minimum
720p30 8 Mbps 3 Mbps
1080p30 14 Mbps 5 Mbps
1080p60 17 Mbps 6 Mbps

Choose a resolution and frame rate that the source supports and your sustained upload connection can handle. These YouTube figures are service recommendations and minimums, not a guarantee that a particular connection or broadcast will be stable. Test ahead of the actual stream and check Live Control Room’s stream health.

6. Preview, go live, and end the broadcast

  1. Start FFmpeg and check its output for input, encoding, and connection errors.
  2. In YouTube Live Control Room, confirm the incoming preview and monitor stream health, picture, audio, and upload stability.
  3. For a scheduled stream, select Go live after the preview is ready.
  4. To finish, stop the encoder and use the Live Control Room’s End Stream workflow where applicable.

YouTube says streams under 12 hours are automatically archived. An FFmpeg process that loops indefinitely does not mean YouTube will archive an indefinitely long broadcast; plan the stream duration with that platform behavior in mind. See the YouTube encoder setup guide.

Common problems and fixes

  • Concat errors or missing files: Check each path, the working directory, quote and escape syntax, and whether the default safe-path check is rejecting a path. Use -safe 0 only when required and only with a trusted list.
  • Artifacts between clips: Compare stream structure, codecs, time bases, dimensions, frame rates, audio layout, and duration metadata. Normalize incompatible inputs or correct a known duration in the concat script.
  • YouTube does not show a preview: Verify that FFmpeg is using the exact ingest URL and active stream key, that the key has not been reset, and that the outgoing format matches YouTube’s encoder guidance.
  • Dropped frames or poor stream health: Reduce resolution, frame rate, or bitrate to fit sustained upload capacity; follow YouTube’s settings for the chosen codec and test before the broadcast.
  • The broadcast does not archive as expected: Check the under-12-hour automatic archive condition. Infinite input looping does not override YouTube’s archive behavior.

Or let it run in the cloud

If you do not want a computer at home to keep the FFmpeg process running, StreamNeo is a cloud option for keeping a YouTube channel live from uploaded videos. Upload a recording or build a playlist, add your YouTube stream key once, and go live. It loops the uploaded videos from the cloud, so your computer and home connection do not have to stay on.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • One flat price per slot for any uploaded quality up to 4K 60fps, without re-encoding or quality tiers.
  • Automatic recovery if YouTube drops the stream.
  • The first day is free with no card (one free day per account).

Monthly: $9.99 per month. See StreamNeo or pricing and billing options. Start your free day on StreamNeo.

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.

Read next

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
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.