Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober 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 Now×
Skip to content
VGSources
Blog

How to Stream a 24/7 YouTube Playlist from a VPS with Separate Video and Audio Files

Use FFmpeg on a VPS to map separate video and audio playlists into one YouTube RTMPS stream. Prepare compatible files, test playlist timing, and supervise recovery.
Length6 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Run FFmpeg on the VPS with one input for the video playlist and another for the audio playlist, map the video stream from the first and the audio stream from the second, then publish the combined output to YouTube over RTMPS. Before leaving it unattended, verify that the files are compatible, decide how the two playlists should repeat, and test transitions and recovery. The example below is a starting point, not a guarantee that every media combination or FFmpeg build will work unchanged.

What you need before starting

  • A VPS able to access your media files and run FFmpeg. There is no universal CPU, memory, or storage size: requirements depend on whether you copy or transcode, the media resolution and bitrate, disk use, and your provider’s limits.
  • FFmpeg built with the required input and output support. Check the installed build and its documentation; supported options and protocols can vary.
  • A YouTube channel with live streaming available, plus its current RTMPS ingestion address and stream key from YouTube Live Control Room or the LiveStreams API.
  • Video and audio files prepared as two playlists. YouTube receives one combined stream, so FFmpeg must select and map one video stream and one audio stream into its output.

YouTube describes RTMPS as a secure extension to RTMP. Its documented RTMPS connection uses port 443; obtain the active endpoint and stream key for your own broadcast rather than relying on a static sample. See YouTube’s RTMPS guidance, the LiveStreams API, and YouTube’s RTMPS ingestion documentation.

Inspect and prepare the playlists

Check what the files contain

Inventory each file’s container, video and audio codecs, dimensions, frame rate, sample rate, and duration. The exact file mix matters: a concat list that works for one set of files may fail or produce a bad transition with another. Use FFmpeg’s probing tools and test representative files before building a long-running stream.

Use the concat demuxer when files are compatible

For files that can be concatenated without conversion, create a text file for each playlist. For example, video-list.txt might contain:

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.
file '/media/video-01.mp4'
file '/media/video-02.mp4'

And audio-list.txt might contain:

file '/media/audio-01.mp3'
file '/media/audio-02.mp3'

Use paths that exist on the VPS, and ensure the FFmpeg process can read them. The concat demuxer is the no-re-encoding route when input formats permit it. If files differ in ways that prevent clean concatenation, normalize them first or use an FFmpeg filter workflow that re-encodes as needed. FFmpeg explains these alternatives in its concatenation FAQ.

Decide whether the playlists are independent or paired

If video and audio are separate shows that may repeat independently, each input can loop on its own. Their total durations determine when each starts over, so they will not remain synchronized just because both loop. If particular audio belongs with particular video, define a paired schedule deliberately—such as matching item order and durations—and test the boundaries. A single independent loop command cannot infer the intended pairing.

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.

Combine the inputs and send them to YouTube

This schematic command loops the two concat inputs independently, maps video from the first input and audio from the second, and sends a FLV-muxed output to an RTMPS address:

ffmpeg 
  -stream_loop -1 -f concat -safe 0 -i /media/video-list.txt 
  -stream_loop -1 -f concat -safe 0 -i /media/audio-list.txt 
  -map 0:v:0 -map 1:a:0 
  -c:v copy -c:a copy 
  -f flv "rtmps://YOUR_CURRENT_INGEST_ENDPOINT/YOUR_APPLICATION/YOUR_STREAM_KEY"

Replace the example address with the active RTMPS endpoint and stream key shown for your broadcast. Do not publish the key in a public script, screenshot, log, or article. Treat it like a password; restrict access to any file or service that stores it.

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.

-c:v copy and -c:a copy request stream copy rather than re-encoding. They are appropriate only when the source streams and transitions are acceptable for the output and the installed FFmpeg build and YouTube ingest accept them. If not, remove the copy options and configure suitable encoders and filters for your actual files. There is no single safe set of codec, bitrate, resolution, or frame-rate values for unknown input media; check the current guidance for the chosen YouTube ingest mode and verify the preview.

FFmpeg documents RTMPS among its RTMP protocol variants and shows RTMP output with the FLV muxer. Confirm that your FFmpeg build supports the protocol and options you use in the protocol documentation, formats documentation, and FFmpeg documentation. Option order and behavior can depend on the installed version and the selected input and output formats, so validate the command on the VPS before relying on it for continuous playback.

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

Test the stream before leaving it unattended

  1. Start a test broadcast and check YouTube’s live preview. Confirm that the picture and sound are both present and that the intended streams are mapped.
  2. Watch transitions at the end of each file and playlist. Look for gaps, abrupt changes, missing audio, or an input that stops instead of advancing.
  3. Observe what happens when one playlist reaches its end before the other. Independent loops repeat on their own timelines; use a paired schedule if the content must stay synchronized.
  4. Restart FFmpeg during a test. Verify that the process obtains the intended files and credentials and resumes a sensible playlist position.
  5. Check the VPS’s CPU, memory, disk activity, network use, and provider limits under the actual workload. Transcoding can require substantially different resources from stream copying, so choose capacity from measurement rather than a generic VPS-size rule.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Keep the process supervised and plan for failures

A shell session alone is not an operations plan for a 24/7 stream. Run FFmpeg under a process supervisor appropriate to your VPS, configure how it restarts after a crash or reboot, and monitor both the process and the YouTube broadcast. Decide how credentials are supplied after a restart and how to avoid repeatedly publishing an unintended playlist position.

FFmpeg documents an RTMP FIFO muxer configuration that attempts recovery after temporary failures. It can be considered as one part of a recovery design, but it does not guarantee uninterrupted delivery or YouTube availability. See the FFmpeg formats documentation and test failure and restart behavior in your own setup.

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.

RTMPS or HLS?

Ingest option What it means for this setup
RTMPS RTMP over TLS/SSL; YouTube documents port 443 and provides RTMPS ingestion addresses. It is the straightforward choice for the FFmpeg workflow above.
HLS A segment-based alternative with different setup requirements. YouTube requires muxed audio and video for HLS and describes it as generally higher latency than RTMP-based ingestion. It is not interchangeable with the RTMPS command above; consult YouTube’s HLS setup guidance for supported requirements and use cases.

Copyright and channel-policy checks

Having the technical ability to loop files does not establish that you have the rights to stream them. Confirm permission for every audio and video track and review YouTube’s current live-streaming rules before broadcasting. Repeated playback also does not make reused material original or resolve rights questions. Keep records of licenses and permissions, and do not use the stream key to broadcast material you are not authorized to use.

Or let it run in the cloud

If you do not want to operate a VPS and supervise FFmpeg, StreamNeo is a cloud service for keeping a YouTube channel live from uploaded videos. Upload a recording or build a playlist, add your YouTube stream key, and go live. It plays uploaded videos, not a live camera feed.

  • Nothing has to stay on at home: the stream runs from the cloud, so your computer can be off.
  • Every slot streams the uploaded file as made, up to 4K 60fps, at one flat price per slot with no re-encode or quality tiers.
  • Automatic recovery attempts to resume if YouTube drops the stream.
  • The first day is free, with no card required.
  • Monthly: $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 quests from Patch Notes

  1. How To Create Custom Stickers & Shoutouts In Monster Hunter WildsMonster Hunter WildsBlog20min
  2. How to Get XL Gogoat in Pokemon Legends Z-A (An Extra-Large Gogoat)Pokemon Legends Z-ABlog20min
  3. How to Get Rotting Lightbringer in Diablo 4Diablo 4Blog17min
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
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.