October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober 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 Rotate Playlists Across Multiple YouTube Channels with FFmpeg Scripts

FFmpeg can sequence local media for a live output, but YouTube playlist membership requires the Data API. Here’s how to choose and configure each workflow across channels.

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

First decide what you mean by “playlist”: FFmpeg can rotate local media files in a stream, while YouTube’s Data API changes which uploaded videos appear in a YouTube playlist. They are separate workflows. This guide covers both, with the local-media method first.

Choose what you want to rotate

If you mean… Use… What changes
Play local recordings one after another in a live output FFmpeg concat demuxer The sequence of media packets sent by FFmpeg
Change the uploaded videos listed in a YouTube playlist YouTube Data API playlistItems methods The video references in the playlist

Neither method automatically schedules YouTube broadcasts. If you want a live broadcast to start and stop on a timetable, treat that as a separate YouTube Live API workflow.

Rotate local video files in an FFmpeg stream

This method makes FFmpeg read a text list of files in order and send them to an output. It does not edit a YouTube playlist. The concat demuxer treats the files as one virtual sequence; FFmpeg’s documentation warns that the files must have matching streams, including codecs and time bases. Differences in stream lengths or inaccurate duration metadata can cause gaps or artifacts, so test the full sequence before relying on it.

1. Prepare the media and decide on the output

  • Check that the files you plan to join have compatible stream layouts, codecs, and time bases. A file that looks similar may still differ in frame rate, audio layout, or timestamps.
  • Decide whether the output is a live stream, a rendered file, or another destination. FFmpeg accepts multiple input and output URLs; the inputs, stream mapping, codecs, and destination must be chosen for the actual job.
  • For multiple channels, plan a distinct output configuration and YouTube live stream resource for each channel. In the documented YouTube Live API workflow, each channel needs its own liveStream resource.

2. Create an ordered concat list

Save a plain-text file named playlist.ffconcat. Put the entries in the order you want them played. For example:

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.
ffconcat version 1.0
file '/media/intro.mp4'
file '/media/episode-a.mp4'
file '/media/episode-b.mp4'

Use paths that exist on the machine running FFmpeg. The absolute example paths require -safe 0 in the command below; use that option only with a list you control. For a list of relative, safe paths, use -safe 1 and paths relative to the list file.

3. Run FFmpeg against one output

For a live output that can accept the files’ existing encoded streams, this is an illustrative starting command:

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.
ffmpeg -re -f concat -safe 0 -i playlist.ffconcat -c copy -f flv "$YOUTUBE_RTMP_URL"

Set YOUTUBE_RTMP_URL in the process environment to the current ingest URL and stream key for the intended channel. Do not put a real key in the script, playlist file, source control, shell history, or logs. The command copies the existing audio and video rather than re-encoding them. It will not work for every collection of files or every output: use it only when the streams are compatible with one another and with the destination. If encoding or stream mapping is required, specify those deliberately for the installed FFmpeg build and the current YouTube Live requirements. Do not assume one bitrate, resolution, keyframe interval, or ingest setting fits every channel and source.

4. Repeat the configuration for each channel

To send the same sequence to several channels, run a separately configured FFmpeg process for each destination, with that channel’s own stream resource and credentials. To send different sequences, give each process its own concat list. This keeps each channel’s output and failure handling distinct; changing a local list does not change the membership of a YouTube playlist.

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.

Before leaving a stream unattended, play through the complete sequence and inspect the transitions, audio, and end of the list. Confirm how the process should behave after the last entry: the concat list alone does not define broadcast scheduling or whether a broadcast should restart, remain live, or stop.

Change videos inside YouTube playlists with the Data API

If “rotate” means adding or removing uploaded videos in each channel’s YouTube playlist, use YouTube Data API playlistItems methods, not FFmpeg. You need the correct playlist ID and video ID, and an authorized request for the channel and playlist. The insert operation is not an anonymous FFmpeg command.

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
  1. Identify the destination playlist ID for the intended channel. YouTube’s playlist implementation guide describes locating the playlist ID before making changes.
  2. If the script needs to inspect the existing entries, call playlistItems.list. Listing is separate from editing.
  3. To add an uploaded video, make an OAuth-authorized playlistItems.insert request identifying the destination playlist and video resource.
  4. For an existing entry, use the corresponding update or delete method and the playlist-item identity. An insert does not replace an existing item automatically.
  5. Verify the resulting playlist on the intended channel before running the change across other channels.

Google for Developers’ API references list a quota cost of 1 unit per playlistItems.list call and 50 units per playlistItems.insert call. The API overview reports a default allocation of 10,000 units per day for most endpoints, excluding specially allocated search and video-upload methods, and says default quota is subject to change. These are quota accounting values, not a runtime guarantee. Check the project’s current quota before estimating how often a multi-channel script can read or change playlists.

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

Keep playlist automation separate from broadcast automation

A YouTube playlist is a list of videos; a live broadcast is a separate resource lifecycle. If your goal is scheduled live broadcasts, design the broadcast and stream-resource steps separately from the FFmpeg file list or playlist-item edits. The YouTube Live API documentation says a different liveStream resource is needed for each channel. Decide whether each run should start a new broadcast, continue an existing live session, or simply change the media in an encoder process; the concat list does not make that decision for you.

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.
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.

Copyright and channel eligibility checks

  • Use media you own or are authorized to stream, including music, footage, and any third-party material inside a recording. Being able to access a video or add it to a playlist does not establish permission to rebroadcast it.
  • Keep records of licenses and permissions for every channel using the sequence. A playlist shared across channels does not transfer rights between them.
  • Review YouTube’s current copyright and monetization policies for the channel and material involved. Repeating or rearranging videos does not by itself establish that a channel meets monetization requirements.

Common problems and fixes

Symptom Likely cause What to check
FFmpeg refuses to open a list entry The path is wrong, inaccessible to the FFmpeg process, or blocked by safe-path handling. Check the path and file permissions. Use relative safe paths with -safe 1, or use -safe 0 only for a trusted list you control.
Playback has a gap, glitch, or audio/video discontinuity at a file boundary Inputs have incompatible streams, timestamps, or inaccurate duration metadata. Compare the files’ stream properties, then test the sequence end to end. The concat demuxer does not guarantee seamless joins for arbitrary files.
The live output is rejected or does not play correctly The copied streams may not suit the destination, or the output URL and key may be incorrect. Check the destination and channel-specific stream credentials, then verify the source streams against current YouTube Live requirements. Re-encode only with deliberate settings for the specific inputs and output.
A playlist API request cannot add a video The request may lack authorization or identify the wrong playlist or video. Confirm OAuth authorization for the intended channel and check both IDs. Do not treat playlist listing and insertion as the same operation.
API calls work at first but later fail for quota Repeated reads or writes have exhausted the project allocation. Avoid unnecessary calls, especially inserts, and check the current project quota before increasing rotation frequency.
A script sends to the wrong channel Channel-specific playlist IDs, stream resources, or keys may have been mixed up. Keep each channel’s configuration separate and verify the destination before launching each process. Protect stream keys from logs and shared scripts.

Or let it run in the cloud

If your goal is to keep prerecorded videos live on YouTube rather than maintain FFmpeg processes yourself, StreamNeo is a separate cloud option: upload a recording or build a playlist, add your YouTube stream key once, and go live. It loops uploaded videos from the cloud; it does not manage YouTube playlist membership or stream from a camera.

  • Your computer and home connection do not have to stay on.
  • Any uploaded quality up to 4K 60fps streams as made, at one flat price per slot with no quality tiers.
  • StreamNeo automatically recovers if YouTube drops the stream.
  • The first day is free with no card; one free day is available per account.
  • Monthly: $9.99 per month. UPI and cards are accepted in India; card checkout is available worldwide.

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

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.