Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsTo rotate videos from a remote folder on a VPS, the VPS must be able to read the files and run an encoder such as FFmpeg. The encoder sends the video and audio to YouTube using the current stream URL and private stream key from YouTube Studio; YouTube Studio does not read or rotate the VPS folder for you. The exact setup depends on how the folder reaches the VPS, what playlist format it uses, and whether updates must appear while a stream is running.
Choose how the remote folder reaches the VPS
First decide what “remote folder” means in your setup. It may be mounted as a directory on the VPS, synchronized or copied onto its disk, or accessed directly over a network protocol. These are different storage arrangements; a playlist that works with local paths will not necessarily work unchanged with a remote URL.
As an Amazon Associate I earn from qualifying purchases.
- Mounted directory: The files appear at a path on the VPS. The encoder reads them like local files, but availability still depends on the mount and its network connection.
- Synchronized or copied directory: A separate process makes files available on VPS storage. Decide how often it syncs and what happens if a file is replaced while FFmpeg is reading it.
- Direct remote access: FFmpeg documents protocols including SFTP, with options for an SSH private key and host-key verification. Whether these options work in your installation depends on how FFmpeg was built and on the storage service and network.
Keep storage credentials out of public scripts, logs, and URLs that could be exposed in process listings. If you use SFTP, use key-based access and retain host verification where supported. Test that the VPS can read every media file before configuring the broadcast.
Choose a playlist format and define what “rotate” means
An FFmpeg concat manifest is a text file listing media paths in playback order. It is not an HLS playlist. For files accessible by path on the VPS, a simple manifest can look like this:
#1 Best Overall
file '/srv/media/video-01.mp4'
file '/srv/media/video-02.mp4'
file '/srv/media/video-03.mp4'
The paths above are examples; use the actual paths visible to the FFmpeg process. Follow FFmpeg’s concat demuxer documentation for escaping or quoting paths with spaces or special characters. The concat demuxer expects the files to have matching streams, codecs, and time bases. Incorrect or unavailable duration metadata can cause timestamp problems or artifacts.
Before starting the stream, decide whether the sequence should play once, repeat as a cycle, or change when the folder contents change. A text manifest defines an order; it does not by itself establish a shuffle policy or a universal live-refresh behavior. Test the precise command and FFmpeg build with representative files, including the way you intend to loop or update the list.
Rank #2
Repeat a fixed sequence
For a fixed cycle, configure the FFmpeg process to repeat the input or use a supervisor-driven approach that starts a new playback cycle. Verify the behavior on your installed FFmpeg version instead of assuming a manifest will restart or reload itself. A process restart policy alone does not prove that the next cycle will read the expected files.
Include new or changed files
If the folder changes during a broadcast, establish how the manifest is regenerated and how the running encoder will see that change. Test whether your chosen input and command reopen or reload the manifest, or whether you must restart the encoder. Do not assume that adding a file to the directory changes a playlist already being read.
Rank #3
Configure FFmpeg to send the feed to YouTube
- Check the VPS inputs. Confirm the FFmpeg build supports the protocol you need, and that the running account can read the manifest and every listed file. Test with files representative of the final playlist.
- Check media compatibility. Confirm the inputs have compatible streams, codecs, and time bases for concat. Decide whether the encoder can pass the streams through or needs to transcode them. Stream copying avoids a transcode but is suitable only when the resulting streams meet YouTube’s current ingest requirements; the correct bitrate, resolution, frame rate, and codec settings depend on your media and the current YouTube guidance.
- Prepare the playlist. Save the concat manifest at a known path, in the intended order. Validate paths and file access before trying to start a public broadcast.
- Set up the output privately. In YouTube Studio’s Live Control Room, create or schedule the broadcast and copy its current server URL and private stream key into the encoder configuration. Treat the key as a credential. Do not paste a real key into a public script or publish it in logs.
- Run the encoder and inspect its output. Start FFmpeg under the service account that will operate it. Watch its logs for input, timestamp, codec, and connection errors. For a scheduled stream, YouTube’s encoder instructions say to start the encoder, wait for the preview in Live Control Room, and then click Go live.
- Verify the whole cycle. Confirm that the preview appears, the broadcast receives audio and video, the playlist reaches its end, and the next cycle begins as intended. Also test what happens after a file is unavailable, the storage connection drops, or the encoder restarts.
The exact FFmpeg command cannot safely be universal: the storage path or protocol, manifest format, media codecs, YouTube output settings, and desired refresh behavior all affect it. Build and test a command for those inputs rather than copying a command meant for a different folder or playlist.
Keep the VPS job supervised and observable
A continuous stream needs more than an FFmpeg process that starts successfully. Run it under a process supervisor suitable for the VPS operating system, capture logs with secrets removed, and alert on a stopped process or failed ingest. Test recovery by restarting the service and checking that it reconnects, rereads the expected inputs, and produces a usable YouTube preview.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Rank #4
A public VPS example uses a systemd service with restart behavior for an FFmpeg job, but that is one Ubuntu deployment, not a guarantee of uninterrupted streaming. A supervisor can restart a process; it cannot ensure that storage, the VPS network, input files, or YouTube ingest are available.
Schedule the YouTube event separately from the encoder
YouTube treats the broadcast event and the incoming stream as separate objects: the event is what viewers watch, while the encoder supplies its live feed. YouTube’s Live Streaming API models these separately as a liveBroadcast and a liveStream; a broadcast can be bound to a stream, and a stream can be bound to more than one broadcast. This distinction matters if you automate broadcast scheduling through the API. For a Studio-created scheduled event, connect the encoder and use the preview-and-Go-live sequence described above.
YouTube Help says first-time live-stream activation may take up to 24 hours and that streams under 12 hours are automatically archived. These are YouTube’s stated operating details, not a promise about a particular account or event; check the current behavior and eligibility in YouTube Studio before planning a launch or archive workflow.
Troubleshoot common failures
- FFmpeg cannot open a listed file: Check the path as seen by the service account, mount or sync status, file permissions, and manifest quoting. A path that exists on your own machine may not exist on the VPS.
- Concat fails or playback has timestamp artifacts: Check that the files have matching streams, codecs, and time bases, and that duration metadata is correct. Test files individually and then as a sequence.
- The remote directory is inaccessible: Check the mount, synchronization job, or protocol connection; verify network reachability and credentials. Confirm that the installed FFmpeg build supports the protocol and its required options.
- New files do not appear: Confirm that the synchronization process has delivered them, update the manifest, and test whether the running encoder reloads it. If it does not, use a controlled restart or another tested refresh design.
- YouTube shows no preview or the encoder disconnects: Confirm that the current stream URL and key were copied correctly, the key has not been exposed or replaced, and the encoder is still sending data. Check FFmpeg logs and the Live Control Room status.
- The encoder restarts but the stream does not recover: Inspect the restart logs and test the full recovery path, including access to storage, reading the manifest, and reconnecting to YouTube. Restart behavior is not the same as verified recovery.
- The stream reaches the end and stops: Check whether the configured loop behavior applies to the chosen input format and FFmpeg build. Test a full cycle before relying on it for a scheduled broadcast.
Cost and operational trade-offs
A VPS workflow gives you control over file access, ordering, and automation, but you are responsible for the encoder process, storage access, logging, monitoring, and recovery. The cost depends on your VPS and storage provider and on whether the job transcodes; no provider or current VPS price is specified here. Transcoding can require more CPU than passing through compatible streams, so test resource use on the actual media and instance rather than sizing from a generic figure.
If you need scenes, sources, or a graphical production workflow instead of a file playlist, OBS is another encoder option. OBS documents WebSocket control for automating scenes and sources; WebSocket is included in OBS Studio 28 and later, and OBS recommends enabling password protection. For a scripted file sequence, FFmpeg may be the more direct option. Choose based on remote-media access, sequence and refresh behavior, transcoding load, recovery needs, and whether you need a graphical scene workflow.
Or let it run in the cloud
If your goal is to keep uploaded recordings or a playlist running on YouTube rather than maintain a VPS that reads a changing remote folder, StreamNeo is a cloud alternative. Upload a recording or build a playlist, add your YouTube stream key once, and go live. It plays uploaded videos, not a live camera feed, and it does not replace a workflow that specifically needs to read and rotate files directly from a remote folder.
- Nothing has to stay on at home; the stream runs from the cloud.
- Any quality up to 4K 60fps streams as uploaded, 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 required.
The monthly option is $9.99 per month. Start your free StreamNeo day.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallQuick Recap
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.




