Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Run two prerecorded YouTube Live loops from one VPS by starting two separate FFmpeg processes, each with its own input, YouTube stream key, output settings, log, and restart policy. Pace each file with -re, loop it with -stream_loop -1, use the RTMPS endpoint shown in YouTube Live Control Room, and confirm that the server can handle both streams’ combined upload bitrate and encoding workload.

The commands below are starting points, not a universal VPS sizing or encoding preset. Test both streams together: the required CPU, memory, and network capacity depend on whether you copy or re-encode the media, its properties, and the VPS’s sustained performance.

What you need before starting

  • A Linux VPS with enough sustained outbound bandwidth for both streams and enough CPU capacity if FFmpeg will encode either output.
  • Two local media files, or two separate inputs you can access from the VPS. This example uses local files.
  • A YouTube channel with live streaming enabled and a distinct stream destination/key for each intended stream. Retrieve each endpoint and key in YouTube Live Control Room.
  • FFmpeg installed on the VPS, plus a process supervisor or other restart mechanism and separate logs for the two processes.

Use the exact RTMPS URL supplied by Live Control Room; do not assume an RTMP address and an RTMPS address are interchangeable. YouTube recommends RTMPS, which encrypts the connection using TLS/SSL. Treat each stream key like a password: keep it out of public scripts and redact it from logs or support requests.

Choose whether to copy or re-encode

Re-encode when you need control over output settings

Re-encoding lets you set output resolution, frame rate, bitrate, codec, and keyframe interval, but each FFmpeg process then performs its own encoding work. The example below uses H.264 and AAC. Its 5 Mbps video rate is an illustrative setting corresponding to YouTube’s recommended H.264 bitrate for 720p30; it is not proof that your source is 720p30 or that these settings suit it.

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.
#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.

Copy when the source is already compatible

Stream copy can reduce encoding work, but it is appropriate only if the source codecs and media characteristics are compatible with YouTube’s ingest requirements and your chosen output. Inspect the source first; do not assume a file will work unchanged. YouTube’s current RTMP/RTMPS encoder guidance lists H.264, H.265/HEVC, and AV1 video, with CBR recommended. FFmpeg’s documented real-time file-input example uses FLV output.

Prepare YouTube’s output settings

YouTube’s current encoder guidance, accessed 2026-10-03, recommends a two-second keyframe interval and says not to exceed four seconds. It supports frame rates up to 60 fps. Its recommended H.264 video bitrates vary by resolution and frame rate:

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.
Output Minimum H.264 video bitrate Recommended H.264 video bitrate
720p30 3 Mbps 8 Mbps
1080p30 5 Mbps 14 Mbps
1080p60 6 Mbps 17 Mbps

YouTube recommends 128 Kbps stereo audio. These are YouTube’s published recommendations, not measurements of your actual network use; allow for transport overhead and bitrate variation when planning capacity. Use settings that match the desired output and the actual media rather than copying a bitrate from an example blindly.

Run the first loop

  1. Place the media on the VPS. Confirm the file path, readable permissions, video and audio streams, and desired resolution and frame rate.
  2. Build the command with input options before the input and output options before the destination. FFmpeg options generally apply to the next input or output.
  3. Replace the endpoint placeholder. Use the exact RTMPS URL and stream key shown for this stream in Live Control Room.
  4. Start the process and check YouTube stream health. Verify that video moves, audio is present if expected, and YouTube reports a healthy incoming stream.
ffmpeg -re -stream_loop -1 -i /path/to/stream-one.mp4 
  -c:v libx264 -preset veryfast -b:v 5M -maxrate 5M -bufsize 10M 
  -g 60 -keyint_min 60 -sc_threshold 0 
  -c:a aac -b:a 128k -ar 44100 
  -f flv 'rtmps://INGEST_URL/STREAM_KEY'

The 60-frame keyframe settings in this example correspond to a two-second interval at 30 fps. If you choose a different frame rate, adjust the GOP/keyframe values to maintain the intended interval. Confirm the command’s output against your actual frame rate and YouTube’s current guidance before relying on it.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

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.

Start the second loop as a separate process

Run a second FFmpeg process for the other file and destination. Keep its command, stream key, log, and restart policy distinct from the first so a failure or configuration change can be isolated. Do not send both processes to the same stream key unless that is explicitly the intended YouTube configuration.

ffmpeg -re -stream_loop -1 -i /path/to/stream-two.mp4 
  -c:v libx264 -preset veryfast -b:v 5M -maxrate 5M -bufsize 10M 
  -g 60 -keyint_min 60 -sc_threshold 0 
  -c:a aac -b:a 128k -ar 44100 
  -f flv 'rtmps://SECOND_INGEST_URL/SECOND_STREAM_KEY'

Replace the second file and endpoint with the actual values. Treat the sample bitrate and encoding settings as illustrative, and choose the appropriate settings independently for each source. A process supervisor can restart a process that exits; configure and test each service independently rather than assuming that one service’s health guarantees the other’s.

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

Size the VPS for both streams together

Add the two configured outgoing stream bitrates to estimate the sustained upload requirement. YouTube says total stream bitrate must not exceed available upload bandwidth and recommends leaving 20% room. Applying that reserve to the combined bitrate of two independent outputs is a planning inference, not a published YouTube rule specifically for this two-stream setup.

  • Check the VPS’s sustained outbound capacity in its actual region, not just a headline port speed. Leave room above the combined target bitrate.
  • Determine whether each output is copied or encoded. Two separate software encodes can require substantially more CPU than sending compatible streams without re-encoding; no universal CPU-core or memory figure is established for a given quality.
  • Test both processes at once. Monitor CPU, memory, network throughput, FFmpeg logs, dropped frames, and YouTube stream health while they run.
  • Account for filters, scaling, other VPS workloads, and bitrate bursts in addition to the nominal streams.

A one-stream test cannot establish that the VPS can sustain two simultaneous outputs. Choose a VPS only after checking both streams under the configuration you intend to keep running.

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.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Keep the streams running and recover safely

FFmpeg documents reconnect options for certain protocols, including reconnecting on network errors and limiting retry delays. The applicable options depend on the protocol and failure mode; they do not guarantee recovery from every RTMP/RTMPS, network, or YouTube-side interruption. Use separate logs, monitor for a dead process or unhealthy stream, and test the actual failure-and-recovery behavior before leaving either stream unattended.

  • Use a supervisor configured to restart a failed FFmpeg process, with distinct service definitions for each stream.
  • Log each stream separately and ensure the logs do not expose unredacted keys.
  • Test a controlled interruption and confirm both the process and YouTube ingest recover as expected.
  • In Live Control Room, reset a compromised stream key and update the matching FFmpeg command or service configuration.

YouTube recommends testing before going live with audio and moving video similar to the real content, then monitoring stream health and messages. A process that is running is not by itself proof that YouTube is receiving a healthy stream.

Account for YouTube’s long-stream archive and DVR behavior

YouTube says streams under 12 hours are automatically archived. Separately, DVR rewind may be limited or unavailable for streams longer than 12 hours. DVR concerns viewers pausing, rewinding, and resuming during a live stream; archive availability is a separate behavior. Check current YouTube help and channel settings if either behavior matters to your broadcast.

Troubleshoot common failures

YouTube does not receive the stream

  • Check the endpoint and key. Confirm that the command uses the exact RTMPS endpoint and the key for that stream from Live Control Room. A reset key must also be updated on the VPS.
  • Check the local input. Verify that the file exists, is readable, and contains the expected media streams.
  • Check FFmpeg output and YouTube health messages. Keep the two processes’ logs separate so you can identify which stream is failing.

The stream stutters or drops frames

  • Check combined network load. Compare actual outbound throughput with the two streams’ aggregate configured bitrate and leave headroom.
  • Check encoding load. If both processes re-encode, inspect CPU use and reduce workload or revise output settings only after testing.
  • Check output settings. Confirm codec, CBR behavior, resolution, frame rate, and keyframe interval against YouTube’s guidance and the source file.

A process exits or does not recover

  • Read that process’s log to identify whether the input, encoder, or connection failed.
  • Confirm the supervisor is configured for that service and test a restart rather than relying on FFmpeg protocol reconnect behavior alone.
  • Verify YouTube ingest health after restart. A restarted process may still have a bad endpoint, key, or incompatible output.

Audio is missing or the output is rejected

  • Confirm the input has an audio stream if one is expected.
  • Check that the selected audio codec and bitrate are appropriate; YouTube recommends 128 Kbps for stereo audio.
  • Test with representative moving video and audio before leaving the stream unattended.

Or let it run in the cloud

If managing two VPS processes, their capacity, and their recovery is more work than you want, StreamNeo keeps prerecorded videos looping on YouTube from the cloud. Upload the recording or build a playlist, add your YouTube stream key, and go live. Nothing has to stay on at home; streams run at the quality uploaded up to 4K 60fps for one flat price per slot, with automatic recovery if YouTube drops the stream. The first day is free with no card. Monthly: $9.99 per month. Start a free day with StreamNeo.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.