To stream a playlist from a VPS, first transfer video files you own or have permission to use, then make an ordered list for FFmpeg and configure an encoder feed to YouTube Live. Moving files alone does not start a broadcast: FFmpeg must read the playlist and send the feed using credentials from YouTube Studio.
This guide follows that path from channel access to a monitored test. The VPS account, operating system, storage and network capacity vary by provider, so use the host details supplied with your own VPS rather than assuming a particular configuration.
Confirm YouTube Live access and create an encoder stream
Before preparing a long transfer, make sure the channel can currently use live streaming. YouTube’s eligibility guidance says a channel needs verification and must not have a live-streaming restriction in the previous 90 days; first-time activation can take up to 24 hours. Check the current YouTube live-streaming eligibility and setup guidance, because access requirements and Studio screens can change.
In YouTube Studio, open Live Control Room and create or select a stream intended for encoder software. The Control Room provides the server URL and stream key that the encoder needs. You will use these later in FFmpeg; neither the playlist nor the VPS upload supplies them.
Treat the stream key as a password. Do not put it in a public script repository, paste it into a support forum, or include it in a screenshot. If you save it in a shell script, restrict access to that file and consider how shell history, backups and account permissions could expose it. If you suspect it has leaked, replace or reset it through YouTube Studio and update the encoder configuration.
Also check that each item in the playlist is content you have the necessary rights to stream. Owning a file or having it on your computer is not by itself proof that you have rights to broadcast its audio and video. YouTube’s encoder setup guidance also points creators to rights and policy considerations; consult current official guidance for your situation.
Prepare and order the owned video files
Start on the computer that holds the media. Make a working folder containing only the clips you intend to include, and give the files simple names that are easy to type and distinguish, such as clip01.mp4, clip02.mp4 and clip03.mp4. Avoid relying on a file browser’s display order: alphabetical order, modified date and the playlist’s playback order are separate things.
Write down the intended sequence before transferring. For example, a devotional channel might place an opening visual first, then a set of owned bhajan recordings in a deliberate order, and finish with a closing card. Keep the actual list of filenames beside that plan so that you can compare it with the list created on the VPS.
The concat method below works most predictably when the files have compatible stream layouts and codec and time-base parameters. If clips were exported with different resolutions, frame rates, audio layouts or codecs, inspect them before choosing stream-copy or re-encoding. A useful starting point is FFmpeg’s official concat demuxer documentation, which describes how the demuxer reads listed files in sequence and the constraints to consider.
This is a good point to check local files for accidental duplicates, truncated exports or a missing final clip. A typo in the eventual playlist can stop playback at the wrong point or skip material, and it is easier to fix the source folder before sending a large library over the network. Keep a separate copy of the original material if it matters to your channel; a VPS transfer is not a backup plan by itself.
Connect to the VPS and choose a destination
Use the hostname or IP address, account name, SSH port and authentication method provided by your VPS provider. Connect with SSH from your workstation and verify that you are reaching the expected host. If the SSH client reports a changed host identity unexpectedly, do not accept it automatically; confirm the change with the provider or your administrator first.
Choose a destination directory that is writable by the account which will run FFmpeg, and has enough free space for the media and any operational files. A path such as /srv/stream/videos is an example, not a required convention. The provider may have a different home directory, mounted storage, permissions policy or preferred path. Create the directory only after checking the account and target location.
For example, once connected, you might create a directory and inspect its ownership and free space with ordinary shell tools:
mkdir -p /srv/stream/videos
ls -ld /srv/stream/videos
df -h /srv/stream/videos
If the account cannot create that path, do not solve the problem by making broad permission changes across the system. Ask the administrator or use a location the account is authorised to write. The files must be readable to the process that will launch FFmpeg, while the stream key should remain accessible only to the appropriate user.
VPS selection affects more than storage. Think about sustained outbound capacity, CPU available for any re-encoding, storage headroom, location relative to your audience and whether your provider’s terms fit the workload. The research for this workflow does not establish current limits for any particular VPS provider, so check the provider’s own current plan details rather than assuming a transfer rate or resource allowance.
Transfer files with SCP or SFTP
For a one-time upload, scp provides a direct command-line path over SSH. From the local machine, a recursive directory transfer can look like this:
scp -r ./videos user@host:/srv/stream/videos/
Replace user, host and the destination with the values for your VPS. If SSH uses a non-default port, consult the client’s option syntax and account configuration before running the transfer. OpenSSH documents scp and its current behaviour in its manual pages; current scp uses the SFTP protocol by default, while still being invoked as scp.
A graphical SFTP client is often easier if you prefer to see the local and remote folders side by side. Configure the host, username, port and approved authentication method, then navigate to the destination directory and upload the selected folder or files. SFTP operates over SSH, so the connection is encrypted, but that does not remove the need to verify the server identity or protect account credentials.
For a recurring library update, rsync over SSH can avoid retransmitting unchanged file data. One pattern is:
rsync -av --progress ./videos/ user@host:/srv/stream/videos/
The trailing slash on the local source means to copy the contents of videos into the remote directory. Without it, directory nesting may differ from what you expect. Read the command before repeating it, especially if you later add deletion options: a sync command can remove remote files if configured to mirror removals. The rsync manual describes its options and behaviour; use the documentation that matches the installed version.
Whichever method you choose, prefer key-based SSH authentication where available and keep private keys out of shared folders. Do not paste a password or private key into a command that could be stored in shell history. For very large files or a connection that might drop, transfer in manageable stages and resume or retry using the chosen tool’s documented behaviour rather than presuming the first attempt completed.
Verify file paths and playlist order
After the transfer, inspect the remote directory. Compare the local and remote file counts and sizes, and open or probe a sample file before relying on the full set. For media that must match exactly, generate checksums on both ends and compare them; this is an operational verification practice, not a YouTube requirement.
Create a text file called playlist.txt in the media directory. Use one line per file in the exact order you want played, with the file directive and a relative filename:
file 'clip01.mp4'
file 'clip02.mp4'
file 'clip03.mp4'
Keep the list and the media together, and use straightforward filenames without unusual characters. Relative paths make it easier to move the folder as a unit and fit the concat demuxer’s safe-path defaults. If a filename contains a quote or another awkward character, renaming it to a plain portable name is usually less error-prone than escaping it by guesswork.
Check every line against the remote directory spelling, including capitalisation. Linux filesystems commonly distinguish Clip01.mp4 from clip01.mp4. A small review can catch a missing file before the encoder starts:
cd /srv/stream/videos
ls -lh
cat playlist.txt
If the list refers to a file in a subdirectory, make the relative path explicit and confirm it resolves from the location where the playlist is stored. Avoid inserting arbitrary absolute paths into a list while keeping -safe 1; the safe-path mode is intended to restrict what paths the concat demuxer accepts. See the FFmpeg concat documentation for the exact path rules for your build.
Configure FFmpeg playback and YouTube ingest
Once the files and order are checked, configure FFmpeg to read the concat list at normal playback speed and send an encoded feed to the exact ingest endpoint shown in Live Control Room. The following is an illustrative starting pattern for compatible inputs, not a universal preset:
ffmpeg -re -f concat -safe 1 -i /srv/stream/videos/playlist.txt \\
-c:v libx264 -preset veryfast -b:v 4500k -maxrate 4500k -bufsize 9000k \\
-pix_fmt yuv420p -g 60 -c:a aac -b:a 128k -ar 44100 \\
-f flv 'rtmps://SERVER/APP/STREAM_KEY'
Replace the placeholder URL with the exact RTMPS server URL and key from your Control Room. Do not publish a command containing the real key. If you keep a command file, set permissions so other accounts cannot casually read it. FFmpeg options are order-sensitive in relation to inputs and outputs, so test the actual command with the installed version and inspect its output for errors.
Here -re paces file input at its native rate rather than reading the whole file as quickly as possible. The concat demuxer supplies files in the listed order. The video and audio options encode H.264 and AAC in this example, while the FLV output format is commonly used for the ingest feed. YouTube’s encoder settings page lists accepted formats and recommends a two-second keyframe interval, with intervals not exceeding four seconds. The example’s -g 60 is only a suitable two-second interval when the video frame rate makes it so; choose a GOP value based on the actual output frame rate and current YouTube guidance.
If the inputs are already compatible with one another and the ingest requirements, stream-copy may reduce CPU work by avoiding a re-encode. It is not a safe shortcut merely because all filenames end in .mp4: containers do not tell you whether the underlying stream parameters match. If you need uniform output, re-encoding gives you more control but consumes VPS CPU and can become the limiting resource. Test with representative clips and watch the process and stream health rather than assuming a setting is correct.
The command as shown does not automatically repeat the playlist forever. It describes one pass through the listed inputs. If your goal is an all-day loop, decide how you want to repeat the playlist and validate the chosen FFmpeg arrangement before relying on it; loop behaviour depends on how the concat input and command are structured. A practical guide to sending an encoder feed into YouTube Live covers the separate ingest concept, while FFmpeg bitrate and audio choices for continuous music streams can help frame output trade-offs.
Test the broadcast in Live Control Room
Start with a controlled test rather than treating a successful file transfer as proof of a working stream. Launch FFmpeg during a period when you can watch the terminal and Live Control Room. Check that the process reads each intended file, that the outgoing connection does not immediately fail, and that the incoming preview appears in the Control Room before you choose to go live.
Review stream health, audio and video continuity, and the playback transition between clips. Listen for silence, clipped audio or mismatched levels; look for a frozen image, black frames, abrupt aspect-ratio changes or gaps at joins. A concat list can be syntactically valid while the source material still produces an awkward transition. If a file fails, stop and correct the path, media compatibility or permissions rather than repeatedly restarting the same broken command.
YouTube advises testing ahead of time and having upload capacity with headroom. The VPS’s outbound connection is the relevant path for an encoder running on the VPS, not the upload speed at your home desk. Check the provider’s actual network allowance and observe the real feed under the intended output settings. If you also manage a local machine as a fallback, the advice in keeping an overnight YouTube stream running on a spare PC is a separate operational approach rather than a substitute for VPS testing.
Keep an eye on VPS resources during the test. Re-encoding can use more CPU than stream-copy, and storage checks matter if you are adding more clips later. If you see dropped frames, ingest warnings or repeated reconnects, note the exact FFmpeg output and Control Room message before changing settings. The FFmpeg reconnect troubleshooting guide may be relevant when the failure is specifically a reconnect problem.
Only after the preview and checks are satisfactory should you start the broadcast in Live Control Room, following its current prompts. Starting FFmpeg sends an encoder feed; the Control Room status and your action there determine whether the event is live to viewers. Keep the stream key private after testing, and remove temporary copies from places where they are no longer needed.
If you would rather not keep a VPS session and encoder command running yourself, StreamNeo can remove the specific burden of operating a computer continuously by turning an uploaded file into a YouTube stream; it is separate from this self-managed FFmpeg workflow.
Before committing, compare the operating options on the pricing page. When the file and channel are ready, start free — 24-hour trial, no card.
FAQ
Does transferring the playlist to the VPS start the YouTube stream?
No. Transfer only copies files to the VPS. You still need an ordered playlist, a running FFmpeg process configured with the correct YouTube ingest URL and stream key, and to check the incoming feed in Live Control Room.
Can I use SFTP instead of SCP?
Yes. A graphical or command-line SFTP client can transfer the files over SSH, provided you have the correct host, account and destination details. The transfer method does not create the playlist order or start an encoder feed.
Will the example FFmpeg command work for every set of videos?
No. It is an example for compatible inputs, and the encoding values may not suit your source frame rate, resolution, available CPU or current YouTube settings. Test representative clips, consult the current YouTube encoder guidance and inspect the actual feed before relying on it.
Does having the video files mean I can stream them?
Not necessarily. Stream only audio and video that you own or have the required rights to use, and check current YouTube policy and applicable requirements for your content. A file transfer does not grant rights or platform approval.