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 Rotate a YouTube Stream Playlist from a Remote Folder on a VPS

A practical guide to serving a YouTube live stream from a VPS: make remote media accessible, build and loop an FFmpeg concat manifest, connect the encoder to Live Control Room, and plan for updates and failures.

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

To rotate a YouTube playlist stored remotely, run an encoder such as FFmpeg on your VPS, make the media available to it, and send the encoder’s output to YouTube using the current stream URL and private stream key from Live Control Room. YouTube Studio schedules and manages the broadcast; it does not read or rotate files in your VPS folder. The exact setup depends on how the folder reaches the VPS, the playlist format, the media’s codecs, and whether changes should appear while a stream is running.

Choose how the VPS will access the folder

“Remote folder” can mean several different things. Decide which applies before building the playlist; file access and playlist order are separate parts of the setup.

  • Mounted folder: The remote storage appears at a path on the VPS. FFmpeg reads files through that mount, so network or mount failures can interrupt input.
  • Synchronized folder: A separate process copies files onto the VPS. Decide how often it syncs and how it handles a file that FFmpeg is currently reading.
  • Remote protocol: FFmpeg accesses the storage over a protocol such as SFTP. The installed FFmpeg build must support the protocol, and network stability, latency, and authentication become part of the stream’s reliability.

The example below assumes compatible files are available as local paths on the VPS, either on local disk or through a mounted or synchronized folder. It does not apply unchanged to every SFTP service, HLS playlist, or other remote media format.

Choose a playlist format and rotation policy

Use an FFmpeg concat manifest for a sequence of files

FFmpeg’s concat demuxer reads a text manifest containing a file directive for each path and presents those files in sequence. It expects the files to have matching streams, codecs, and time bases. Differences in duration metadata can cause timestamp artifacts. Paths with spaces or special characters also need correct quoting or escaping.

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.

For example, a manifest at /srv/stream/playlist.txt might contain:

file '/srv/media/gameplay-01.mp4'
file '/srv/media/gameplay-02.mp4'
file '/srv/media/gameplay-03.mp4'

This is an FFmpeg concat manifest, not an HLS playlist. The paths are illustrative: use paths that exist and are readable on your VPS, and escape any special characters as required by FFmpeg’s concat syntax.

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.

Decide what “rotate” means

  • Play once: Send the listed files in order and stop at the end.
  • Repeat the same cycle: Loop the manifest as an input, after confirming the installed FFmpeg build handles your files and sequence as expected.
  • Include folder changes: Define how the manifest is regenerated and how the running encoder will load it. Do not assume that adding a file or editing the manifest automatically changes an already-running process. Test the precise command and format; a restart may be needed to pick up a new manifest.

If you replace a manifest during a live stream, test the update procedure with representative media first. Also decide what should happen if synchronization changes or removes a file while FFmpeg is reading it.

Prepare the YouTube broadcast and encoder

  1. Enable live streaming in time. YouTube says first-time live-stream activation may take up to 24 hours. Check the account’s current status in YouTube Studio before planning a launch.
  2. Create or schedule the broadcast. Open YouTube Studio’s Live Control Room and set up the event. YouTube treats the broadcast event and the incoming encoder stream as separate objects; the incoming stream supplies the event’s audio and video.
  3. Copy the current ingest details. Copy the stream URL and private stream key shown for the stream in Live Control Room. A key is a credential: do not publish it, commit it to a public repository, or put it in logs.
  4. Connect FFmpeg and check the preview. Configure the encoder to send to the current YouTube ingest destination and verify that the preview appears in Live Control Room. For a scheduled stream, YouTube’s instructions say to start the encoder, wait for the preview, and then click Go live.
  5. Confirm archive behavior for your event. YouTube says streams under 12 hours are automatically archived. Check the current event and account behavior in Studio rather than assuming every broadcast will be archived in the same way.

Run a basic FFmpeg concat stream

For a mounted or synchronized folder and a compatible concat manifest, this command illustrates a looping, real-time input sent as an FLV output:

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.
ffmpeg -re -stream_loop -1 -f concat -safe 0 -i /srv/stream/playlist.txt -c copy -f flv "$YOUTUBE_RTMP_OUTPUT"

Here, YOUTUBE_RTMP_OUTPUT represents the complete output destination configured using the current server URL and stream key from Live Control Room. Keep it private. This is an example, not a universal command: the output protocol, input files, installed FFmpeg build, and YouTube ingest settings must agree.

  • -re reads the input at its media rate rather than sending files as fast as the VPS can process them.
  • -stream_loop -1 asks FFmpeg to repeat the input indefinitely. Verify the behavior with your installed version and manifest before using it for a live broadcast.
  • -f concat selects the concat demuxer, while -safe 0 allows paths such as the absolute paths in the example manifest. Use this only with a manifest you control.
  • -c copy passes through the input streams without re-encoding. It avoids transcoding work, but is appropriate only when the streams are compatible with one another and with the chosen output and YouTube ingest.

If the files do not have matching streams, codecs, and time bases, or their streams are not accepted by the output, do not assume this copy command will work. You may need to normalize or transcode the files before streaming. The appropriate resolution, frame rate, bitrate, keyframe interval, and encoder settings depend on your source media and current YouTube ingest requirements; this setup’s operating system, media properties, and target quality are not specified here, so there is no single safe set of numbers to prescribe. Check the current encoder guidance in YouTube Studio and test the full chain before scheduling a broadcast.

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

Access SFTP media without exposing credentials

FFmpeg documents SFTP paths and options for SSH private keys and host verification, but support depends on the FFmpeg build installed on the VPS. If you stream directly from an SFTP location, verify that the build supports it and test how the connection behaves under interruption before relying on it continuously. A mounted or synchronized directory may be easier to operate, but still depends on the storage connection and update process.

  • Prefer key-based authentication where the storage service supports it, and retain host-key verification.
  • Do not place storage passwords in a URL that could appear in process listings or logs.
  • Restrict access to the YouTube stream key and storage credentials, and keep them out of public scripts and repositories.
  • Check that the VPS can read every referenced file and that the remote service will not move or delete a file while it is in use.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Keep the encoder running and detect failures

For continuous operation, run FFmpeg under a process supervisor appropriate to the VPS operating system, retain useful logs, and alert on a stopped process or failed ingest. A systemd service with restart behavior is one documented approach for an Ubuntu deployment, not a guarantee of uninterrupted streaming. A restart policy cannot fix unavailable media, invalid files, a broken network path, or a YouTube ingest problem.

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.
  • Test that the service starts after a VPS reboot and that it can read the manifest and media under the service account.
  • Check logs for file-open errors, stream mapping or codec errors, and output connection failures.
  • Verify the YouTube preview after a process restart, then confirm the scheduled broadcast is live when expected.
  • Test manifest updates and recovery deliberately. A process that restarts successfully may still fail to load a changed list or reconnect to the intended event.

If you automate YouTube broadcast scheduling through its API, account for the distinction between a liveBroadcast event and a liveStream ingest source. YouTube’s API documentation describes broadcasts as bindable to streams; do not treat creating an event as a substitute for starting the encoder.

Troubleshoot common failures

  • No preview in Live Control Room: Confirm that FFmpeg is running, can reach the current ingest destination, and is using the current stream URL and key. Check the FFmpeg output and VPS network path.
  • FFmpeg cannot open a manifest entry: Check the path from the VPS’s perspective, file permissions for the service account, and concat-manifest quoting. A path visible on your desktop is not necessarily available at the same path on the VPS.
  • Playback breaks at a file boundary: Check that the files have matching streams, codecs, and time bases, and verify their duration metadata. The concat demuxer uses durations when positioning the next file, so inaccurate metadata can cause artifacts.
  • A newly added file does not play: Confirm that synchronization completed and that the manifest includes the file. Then test whether your running command reloads the list; if not, plan a controlled restart rather than assuming folder changes are picked up automatically.
  • The stream stops after a network or VPS interruption: Check the supervisor’s logs and restart behavior, then confirm the input can be read and YouTube shows a preview after recovery. Automatic process restart alone does not establish that ingest recovered.
  • Credentials appear in logs or process details: Rotate any exposed stream key or storage credential, remove the exposure, and change how the service receives secrets. Never share a stream key in a support request or public post.

Or let it run in the cloud

If your goal is to keep uploaded videos or a playlist live on YouTube without operating a VPS encoder, StreamNeo is the cloud alternative to try first: it keeps the stream running from the cloud, accepts uploads as made up to 4K 60fps at one flat price per slot, and offers a first day free with no card. To use it, upload a recording or build a playlist, add your YouTube stream key, and go live. It loops uploaded videos; it is not a remote-folder watcher, so use the VPS method above if live changes to a remote directory are essential.

  • Nothing has to stay on at home; StreamNeo runs the stream in the cloud.
  • Any quality up to 4K 60fps as uploaded is covered at one price per slot, with no re-encode or quality tiers.
  • It automatically recovers if YouTube drops the stream.
  • The first day is free with no card. The Monthly price is $9.99 per month.

Start your free StreamNeo 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 Patch Notes

Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
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.