To keep a prerecorded playlist live on YouTube while your own computer is off, run FFmpeg on an always-on Ubuntu VPS, loop media you have rights to use, and send the output to YouTube Live over RTMPS. Use systemd to restart a failed encoder process, then monitor YouTube’s stream health: a restart policy can recover some process failures, but it cannot prevent a host, network, media, or YouTube-side interruption.
What you need before you start
- An Ubuntu VPS that permits continuous outbound video streaming under its service terms.
- Enough sustained outbound capacity for the selected stream bitrate, plus any transfer allowance required by the provider. A fast advertised port does not by itself establish sustained throughput.
- Disk space for your playlist files and, if you want a local archive, a separate recording.
- FFmpeg installed on the server. If you will encode or transcode in real time, the VPS also needs enough CPU capacity for that workload.
- A YouTube channel with livestreaming enabled, a stream key, and videos and audio you have the necessary rights to use.
An India-region VPS may reduce network distance for an operator or audience in India, but an India location is not a YouTube requirement and does not guarantee better reliability. Compare sustained egress or transfer limits, CPU, storage, support, and restart and monitoring facilities—not just the advertised port speed or monthly price.
Prepare YouTube Live and protect the stream key
- In YouTube Studio, open the live control room and create or select a live stream. Follow the current setup flow to obtain its stream URL and stream key; YouTube’s interface and eligibility requirements can change.
- Use the RTMPS ingestion address shown by YouTube where available. YouTube recommends RTMPS, a secure extension of RTMP, and says the connection encrypts data to Google’s servers.
- Treat the stream key like a password. Do not put it in a public repository, screenshot, shared log, or a script you plan to publish. Restrict access to any server-side configuration containing it, and rotate the key in YouTube Studio if it is exposed.
- Check the stream’s health in YouTube Studio after the encoder connects. An FFmpeg process that is still running does not prove that video and audio frames are advancing at YouTube.
Build a playlist on the VPS
Keep the input set manageable
Upload the video files to a directory on the VPS and make a list in the order you want them played. The FFmpeg concat demuxer is a practical option when files have compatible streams, codecs, and parameters. For example, create /opt/youtube-live/playlist.txt with one entry per file:
file '/opt/youtube-live/video-01.mp4'
file '/opt/youtube-live/video-02.mp4'
file '/opt/youtube-live/video-03.mp4'
Use paths that exist on the server and are readable by the account that runs FFmpeg. Test the playlist from beginning to end before relying on it. Mixed resolutions, codecs, frame rates, audio layouts, damaged files, or inconsistent timestamps can cause concat or playback problems; make the files compatible or use a deliberate encoding workflow instead.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
#1 Best Overall
- 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.
Choose copy or real-time encoding
If all playlist files have compatible streams and already meet the output requirements, copying the streams avoids real-time video encoding and its CPU load. If you need to normalize or change the output, encode on the VPS and confirm that its CPU can sustain the workload. Do not assume that an inexpensive VPS can transcode high-resolution video continuously.
YouTube’s encoder guidance lists H.264, H.265/HEVC, and AV1 video options, supports up to 60 fps, recommends constant bitrate (CBR), and recommends a two-second keyframe interval; do not exceed four seconds. Select resolution and bitrate using the current YouTube live settings for your chosen format, and choose a level your VPS connection can sustain reliably. YouTube transcodes incoming video for different viewer formats. Test representative motion and audio and watch stream health before leaving a playlist running.
Rank #2
- 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.
Run FFmpeg continuously and loop the playlist
For compatible playlist files, a command pattern is to use FFmpeg’s concat demuxer with looping enabled and stream copy. Replace the RTMPS destination with the ingestion URL and key supplied for your stream, and validate option support against the FFmpeg version installed on your VPS:
ffmpeg -re -stream_loop -1 -f concat -safe 0
-i /opt/youtube-live/playlist.txt
-c copy -f flv 'rtmps://YOUR_YOUTUBE_INGEST_URL/YOUR_STREAM_KEY'
The destination above is a format illustration, not a real YouTube endpoint or key: use the exact RTMPS URL and key shown in YouTube Studio, and never publish the resulting command with the key embedded. The concat playlist must be readable and the inputs compatible. The -re option reads at the media’s natural rate rather than sending files as fast as possible. Stream-copying preserves the source encoding; it does not convert an unsuitable source into YouTube’s preferred settings.
Rank #3
- 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.
Before making the process persistent, run it interactively and confirm that FFmpeg advances through multiple files, returns to the first file, and delivers healthy video and audio to YouTube. Inspect FFmpeg output and YouTube Studio’s stream-health indicators. Avoid sharing logs without checking them for credentials.
Have Ubuntu restart the encoder with systemd
Use a systemd service so the encoder starts after a reboot and systemd can restart it when the process exits. A production setup should keep the command and credentials in access-controlled files rather than a public script. The following service shows the supervision pattern; adapt the paths and credential handling to the account and FFmpeg command you tested.
Rank #4
- 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
[Unit]
Description=YouTube playlist stream
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=stream
WorkingDirectory=/opt/youtube-live
ExecStart=/opt/youtube-live/start-stream.sh
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
Save the unit as /etc/systemd/system/youtube-playlist.service, ensure the service account can read the playlist and execute the start script, then load and start it:
sudo systemctl daemon-reload
sudo systemctl enable --now youtube-playlist.service
sudo systemctl status youtube-playlist.service
sudo journalctl -u youtube-playlist.service -f
Keep the start script private and ensure it does not print the stream key. Restrict permissions on any credential file to the service account and administrator. Restart behavior only helps when the process exits; it will not necessarily detect a frozen input, stalled frames, broken audio, loss of outbound connectivity, or a rejected stream. Check both service logs and YouTube stream health, and arrange a human or external monitoring process to respond to alerts.
Recommended Free Tools
Best Value
- 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.
Plan for archives, copyright, and monetization
A 24/7 broadcast may not produce a complete replay
YouTube’s archive guidance says streams under 12 hours can be automatically archived, while a stream exceeding 12 hours may not be captured at all. A single uninterrupted 24/7 broadcast therefore should not be treated as a guaranteed complete replay. YouTube recommends keeping a local recording backup if an archive matters; that requires separate storage and capacity planning on the VPS or another recording system.
Rights permission and monetization are different questions
YouTube’s livestream terms require the provider to have the necessary rights for worldwide use of live content, including applicable music rights. A file being available online, or technically playable in a loop, does not grant permission. Use original material or content licensed for this use, including the necessary music rights.
Copyright permission alone does not establish monetization eligibility. YouTube applies its monetization policies to livestreams and evaluates originality and authenticity. On July 15, 2025, YouTube clarified and renamed its “repetitious content” policy as “inauthentic content,” including repetitive or mass-produced material. A channel built around looping content should assess whether it offers meaningful original, educational, or other value; continuous duration by itself does not qualify it for monetization. Eligible monetized livestreams may earn through ads, Super Chat or Super Stickers, and memberships, but ads are not guaranteed to serve.
Troubleshoot common failures
- FFmpeg exits as soon as it starts: Check the service account’s permissions, playlist path, file readability, FFmpeg options, and the service journal. Test the exact command interactively under the same account.
- The stream connects but YouTube reports poor health: Check sustained upload capacity, bitrate stability, keyframe interval, and whether frames and audio are advancing. Reduce output demands or use a more capable connection if the VPS cannot sustain the selected stream.
- Playback stops at a file boundary or will not loop: Verify the concat list syntax, file paths, and compatibility of the inputs. Test a short playlist repeatedly before leaving it unattended.
- Video plays but audio is missing or inconsistent: Inspect the source files for audio streams and matching layouts, then test representative playlist transitions. If necessary, normalize the playlist through an encoding workflow that the VPS can sustain.
- The process is active but the live feed is frozen: Process status is not a complete health check. Review FFmpeg output and YouTube’s stream-health view; restart or repair the input/network issue rather than relying on systemd to detect a stall automatically.
- The stream disconnects and returns: A systemd restart can relaunch an exited process, and YouTube may accept a reconnection, but neither is a guarantee against every interruption. Monitor reconnects and verify the stream recovered at YouTube.
- The live stream is not archived as expected: Do not rely on YouTube to capture a broadcast exceeding 12 hours. Keep a separate local recording if a complete archive is important.
Or let it run in the cloud
If you would rather not maintain a VPS and FFmpeg service, StreamNeo is a YouTube-only cloud service for uploaded videos and playlists: upload your recording or build a playlist, add your YouTube stream key once, and go live. Nothing has to stay on at home; it streams your upload as made up to 4K 60fps at one flat price per slot, with automatic recovery if YouTube drops the stream. The first day is free with no card. Monthly service is $9.99 per month. India users can pay by UPI or card; card checkout is available worldwide. Learn more at StreamNeo or see plans, then start the free first day.
Free tools Windows power users keep installed
One-click scans. No signup required.
Quick 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.




