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
Admit one · Blog

How to Rotate a YouTube Stream Playlist from a Remote Folder on a VPS

A VPS encoder—not YouTube Studio—reads the remote media and sends the live feed. Learn how to build a repeating FFmpeg playlist, connect it to YouTube, handle updates, and troubleshoot failures.
Opened Runtime8 min Written byDocumentaryTube Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To rotate videos from a remote folder on a VPS, make the folder’s files available to an encoder on the VPS, have the encoder read a playlist in the order you want, and send its audio/video feed to YouTube using the current server URL and private stream key from Live Control Room. YouTube Studio manages the broadcast; it does not read or rotate the VPS folder. The exact setup depends on whether the folder is mounted, synchronized, or accessed over a network protocol, and on the playlist format and media files.

Decide what “remote folder” and “rotate” mean for your setup

Before building the command, settle four choices. They determine whether a playlist works as written and what happens when you add or replace a file.

  • How the VPS sees the folder: it may be mounted as a directory, synchronized onto VPS storage, or accessed directly over a protocol such as SFTP.
  • What the playlist contains: an FFmpeg concat manifest is a text file listing media paths. It is not an HLS playlist. If your folder contains HLS segments and a manifest, use an HLS-capable workflow instead.
  • What “rotate” means: play the list once, repeat it in the same order, shuffle it, or rebuild it as the folder changes. Those behaviors are not interchangeable.
  • What the media contains: a concat manifest is simplest when the listed files have matching streams, codecs, and time bases. Mixed files may need normalization or a different workflow.

The example below assumes a Linux VPS, a folder already mounted at /mnt/media, compatible video files, and a fixed-order playlist that repeats. If your storage method, formats, or update behavior differ, adapt and test the input before going live.

Make the remote folder available to the VPS

Mounted or synchronized storage

For a mounted folder, confirm that the mount is active after a VPS reboot and that the account running FFmpeg can read the files. For synchronized storage, decide how updates reach the VPS and avoid replacing a file while FFmpeg is reading it. A mount or sync process is separate from playlist ordering: the encoder can only read files that are accessible at the paths in its manifest.

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.

Direct SFTP access

FFmpeg documents SFTP input options, including private-key configuration and host-key verification. Use them only if the FFmpeg build installed on your VPS supports the required protocol and options. Verify access with a small test before using it for a continuous broadcast; network interruptions, latency, and storage availability can affect reads. Prefer key-based authentication, retain host-key verification, and do not put a storage password in a URL that may appear in process listings or logs.

Create an FFmpeg concat playlist

For a folder mounted at /mnt/media, create a text manifest such as /etc/stream/playlist.txt. Each entry names one file, in playback order:

file '/mnt/media/documentary-01.mp4'
file '/mnt/media/documentary-02.mp4'
file '/mnt/media/documentary-03.mp4'

Use paths that exist on the VPS, not paths from your laptop. Paths containing spaces or special characters must be escaped or quoted correctly for the concat file syntax. Keep the manifest readable only by the service account that needs it if the paths or filenames are sensitive.

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’s concat demuxer presents listed files sequentially and adjusts timestamps. It expects matching streams, codecs, and time bases; inaccurate or unavailable duration metadata can cause artifacts at transitions. Test the complete list—not just the first file—before relying on it live. If your files do not meet those conditions, normalize them to a consistent format or choose a workflow designed for mixed inputs.

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

Configure the encoder and send the feed to YouTube

Set the output values deliberately

The manifest controls sequence; the encoder controls the outgoing video and audio. Set output resolution, frame rate, video bitrate, audio settings, and keyframe interval to values supported by your media, VPS capacity, network, and the current YouTube encoder instructions. There is no single bitrate or keyframe value that is correct for every resolution and frame rate, so this example requires you to define those values rather than silently choosing them.

Store the current YouTube server URL and private stream key, plus your chosen output settings, in a root-readable environment file or another protected service configuration. Do not commit credentials to a public script, print them in logs, or paste them into a command that will be saved in shell history. The variable names used by this example are YOUTUBE_SERVER_URL, YOUTUBE_STREAM_KEY, VIDEO_BITRATE, VIDEO_BUFFER, OUTPUT_FPS, GOP_FRAMES, and AUDIO_BITRATE.

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.

Run a repeating playlist

With those variables set in the environment used to launch FFmpeg, a basic repeating, re-encoded example is:

ffmpeg -re -stream_loop -1 -f concat -safe 0 -i /etc/stream/playlist.txt 
  -r "$OUTPUT_FPS" -c:v libx264 -b:v "$VIDEO_BITRATE" 
  -maxrate "$VIDEO_BITRATE" -bufsize "$VIDEO_BUFFER" -g "$GOP_FRAMES" 
  -c:a aac -b:a "$AUDIO_BITRATE" -f flv 
  "${YOUTUBE_SERVER_URL}/${YOUTUBE_STREAM_KEY}"

This example repeats the manifest in its listed order; it does not shuffle or discover new files. It re-encodes to H.264 video and AAC audio, so check that the VPS has enough CPU for the selected output settings. The output values must be set before the command can run. Confirm the server URL and key format shown in Live Control Room rather than copying a stale value from an old event.

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

If your files already have compatible streams and you want to avoid re-encoding, stream-copy may be an option, but only after testing that the files, timestamps, and outgoing format work together for your event. It is not a safe substitute for the re-encoding example in every playlist.

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

Handle folder updates and playlist changes

Do not assume that a running FFmpeg process will notice files added to the folder or edits to the manifest. The refresh behavior depends on the input format and command. Test it with the actual FFmpeg build and playlist before treating it as automatic.

A predictable approach is to generate a new manifest separately, validate it, then replace the active manifest and restart or reload the encoder at a controlled boundary. Do not overwrite the only working manifest while a script is generating it. If uninterrupted playback during updates matters, test the transition and recovery behavior explicitly; a supervisor restarting a process does not guarantee that the new list is valid or that YouTube ingest remains connected.

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

Connect the YouTube event and start the broadcast

  1. Open YouTube Studio’s Live Control Room. Create or schedule the broadcast and copy its current server URL and stream key into the protected VPS configuration.
  2. Start the VPS encoder. Check the FFmpeg logs for playlist, input, encoding, and connection errors without exposing credentials.
  3. Wait for the preview. YouTube’s encoder instructions say to connect the encoder and wait for the preview in Live Control Room.
  4. For a scheduled event, click “Go live” once the preview appears. The encoder sends the feed; the scheduled event and the incoming stream are separate parts of the setup.

YouTube states that enabling live streaming for the first time may take up to 24 hours. Its encoder instructions also state that streams under 12 hours are automatically archived. Check the current account and event behavior in YouTube Studio, especially if this is a first broadcast or the stream is intended to run longer.

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.

Keep the encoder running and protect credentials

For a Linux VPS using systemd, run the encoder from a dedicated service account and configure a service manager to restart it after an unexpected exit. Capture logs, monitor whether the process is running and whether YouTube is receiving the feed, and test recovery after a VPS reboot. A restart policy is one part of operations, not a guarantee of continuous service: it cannot by itself fix an unreadable file, a bad manifest, a failed mount, a network outage, or rejected ingest.

  • Restrict access to the stream key, storage credentials, environment file, manifest, and logs.
  • Alert on a stopped process and on failed ingest, not only on VPS availability.
  • Test a restart with representative media and confirm that the intended broadcast resumes correctly.
  • Keep a known-good manifest and a recovery procedure in case a folder update introduces an unreadable file.

For a graphical production workflow involving scenes and sources, OBS is another encoder option. OBS WebSocket can control scenes and sources; it is included in OBS Studio 28 and later, and OBS recommends password protection. FFmpeg is the more direct fit when the job is a scripted file sequence and no graphical scene workflow is needed.

Check rights and monetization separately from the technical setup

A successful encoder connection does not establish that you have the right to stream every file in the folder or that a channel will qualify for monetization. Use material you own or are licensed to stream, and check YouTube’s current copyright and monetization requirements for the channel and content. Repeating a playlist is a playback behavior, not proof of rights or monetization eligibility.

Troubleshoot common failures

Symptom Likely cause What to check
FFmpeg reports that a file cannot be opened The remote mount is unavailable, permissions are insufficient, or a manifest path is wrong. Confirm the mount is active, check the service account’s read access, and test each manifest path from the VPS.
Playback stops or breaks at a transition Files have mismatched streams, codecs, or time bases, or duration metadata is inaccurate. Test each transition and normalize incompatible inputs; review duration metadata and FFmpeg logs.
New files do not appear in rotation The active process may not reload a changed manifest, or the remote folder has not synchronized. Confirm the sync or mount state, then test a controlled manifest replacement and encoder restart.
YouTube does not show a preview The encoder may not be connected, the stream URL or key may be stale or mistyped, or the feed may have failed before ingest. Copy current values from Live Control Room, inspect connection errors with secrets redacted, and confirm the encoder process is sending data.
The VPS repeatedly restarts FFmpeg but the stream remains unavailable Restarting the process cannot repair a persistent input, credential, configuration, or network problem. Read the service and FFmpeg logs, fix the underlying error, then verify preview and ingest recovery rather than relying on the restart count.
The VPS cannot keep up with encoding The selected resolution, frame rate, or encoding settings may exceed available CPU capacity. Check resource use and test with representative files; reduce the encoding workload or select a suitable VPS before going live.

Or let it run in the cloud

If you do not need a VPS to read a changing remote folder, StreamNeo is a simpler option for keeping an uploaded-video playlist live on YouTube: upload a recording or build a playlist, add your YouTube stream key once, and go live. Nothing has to stay on at home. Each slot streams what you upload, up to 4K 60fps, at one price per slot; it does not re-encode. It can recover automatically if YouTube drops the stream. The first day is free with no card, one free day per account. The monthly price is $9.99 per month. StreamNeo plays uploaded videos, not a live camera feed, and it streams to YouTube only. See StreamNeo, or start the free first day.

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

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

  1. How to Migrate a 24/7 YouTube Stream to a New VPSAdmit one · BlogHow to Migrate a 24/7 YouTube Stream to a New VPSOpened04 OCT 2026Runtime6 min
  2. How to Run a YouTube Playlist on a Headless Linux Server—and Broadcast It LiveAdmit one · BlogHow to Run a YouTube Playlist on a Headless Linux Server-and Broadcast It LiveOpened04 OCT 2026Runtime6 min
  3. How to Make a 24/7 Indian Music YouTube Stream Restart After a Server RebootAdmit one · BlogHow to Make a 24/7 Indian Music YouTube Stream Restart After a Server RebootOpened04 OCT 2026Runtime6 min
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

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.