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 DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
DocumentaryTube
FFmpeg

How to Set Up Restream on a VPS for a Continuous YouTube Stream

Run FFmpeg on a VPS, send its RTMP output to Restream, and enable YouTube as a destination. This guide covers setup, encoder settings, reliability, and archive limits.

By DocumentaryTube Team 6 min read
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To run a continuous YouTube stream through Restream, keep FFmpeg running on a VPS, send its output to a Restream RTMP endpoint, and enable your YouTube channel as a destination in Restream. YouTube must already be enabled for live streaming. The VPS runs the encoder; Restream relays its feed to YouTube. The steps below cover setup, stream settings, recovery, and the limits of a single long broadcast.

Before you begin

  • A YouTube channel with live streaming enabled. YouTube requires phone verification and, for a first live stream, a 24-hour wait after enabling access. Restream’s YouTube guide says the account used to add the channel must be its owner; a manager or editor account is not sufficient.
  • A VPS with enough sustained outbound bandwidth for your chosen stream bitrate. Restream recommends at least 10 Mbps upload and 25 Mbps or more for Full HD in its encoder setup guidance. These are Restream recommendations, not a universal VPS sizing rule. Check the host’s egress capacity and data-transfer terms.
  • FFmpeg, a media file or other encoder input, and a Restream encoder stream. Install FFmpeg from a maintained package source for the VPS operating system; exact installation commands depend on that OS.
  • Access to the correct Google/YouTube account and a way to store the Restream stream key securely. Do not expose a live key in a public script, repository, screenshot, or command transcript.

Set up the Restream-to-YouTube path

  1. Enable YouTube Live first. Complete channel phone verification and the live enablement flow. If this is the channel’s first live stream, allow the 24-hour activation wait before troubleshooting the encoder.
  2. Connect the channel in Restream. In Restream’s Channels area, authorize the Google account that owns the intended YouTube channel. If multiple Google accounts are signed in, confirm that Restream connected the right channel.
  3. Create an encoder stream. In Restream, choose New Stream, then Encoder | RTMP. Enable YouTube as a destination for that stream, then copy the endpoint URL and stream key. Restream supports external encoders using RTMP and SRT; this walkthrough uses FFmpeg with RTMP. Follow the current Restream interface if labels change. See Restream’s encoder setup steps.
  4. Put the media and protected credentials on the VPS. Upload or otherwise make the source file available on the VPS. Store the endpoint and key in a restricted configuration or environment mechanism rather than a public command history. Restream says its key stays static unless reset, but a newly created RTMP stream may have a different key.
  5. Configure FFmpeg to publish to Restream. FFmpeg’s documented RTMP output syntax is ffmpeg [input options] -i INPUT [output options] -f flv "rtmp://HOST/APP/STREAM_KEY". Replace the endpoint with the exact URL Restream provides and pass the key through the protected mechanism you chose. Use RTMPS when available and appropriate; FFmpeg describes RTMPS as RTMP over a secure SSL connection. Do not assume an endpoint or ingest server that is not shown in your Restream account. See the FFmpeg RTMP protocol documentation.
  6. Start the encoder and verify the event. Run FFmpeg, then check YouTube’s live control room for incoming video, audio, and stream health. Confirm the correct destination is live before leaving the VPS unattended.

Choose encoder settings that match YouTube

Restream’s YouTube guidance lists the following encoder settings. Treat them as Restream’s recommendations, and check the current destination guidance and live control room before relying on a configuration.

Setting Restream guidance for YouTube
Video codec H.264
Resolution 240p through 2160p
Video bitrate 3,000–40,000 Kbps, depending on resolution and frame rate
Frame rate Up to 60 FPS
Rate control CBR (constant bitrate)
Keyframe interval Two seconds recommended; four seconds maximum
Audio codec AAC or MP3
Audio bitrate 128 Kbps stereo or 384 Kbps 5.1
Audio sample rate 44.1 kHz stereo or 48 kHz 5.1

For a file already encoded to the desired settings, re-encoding is not always necessary, but the output still has to be accepted by the destination. If you need to encode, set the codec, rate control, bitrate, frame rate, keyframe interval, and audio format deliberately rather than relying on defaults. The exact FFmpeg options depend on the input and whether you are copying streams or encoding them; verify the actual output in YouTube’s live control room.

Keep the process supervised and plan for interruption

A VPS can keep running after your own computer is shut down, but that alone does not make the broadcast self-healing. Use a service manager and logs to observe the FFmpeg process and relaunch it after a process failure. FFmpeg’s FIFO muxer documents options to continue real-time processing during temporary output failures and attempt recovery; see the FIFO muxer documentation. Recovery options are resilience aids, not a guarantee of seamless reconnection or that YouTube will resume the same event automatically.

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.

Validate restart and reconnection behavior with the actual VPS, Restream account, and YouTube event before depending on unattended operation. Keep access to logs and a way to stop or restart the encoder. A network, VPS, encoder, Restream, or YouTube interruption can still break the live event.

How long can you stream, and what happens to the archive?

Restream says it has no stream-duration limit, but warns that server maintenance may restart a stream that runs continuously for more than 24 hours. It suggests restarting every 24 hours to reduce interruption risk. That is a recommendation, not a promise of uninterrupted service. Restream’s duration guidance explains the maintenance caveat.

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.

Duration and YouTube archiving are separate questions: Restream’s YouTube guide says YouTube has no stream-duration limit, but only archives streams under 12 hours. If you need a YouTube VOD, plan an event shorter than 12 hours or make a separate recording. A continuous live service does not mean one broadcast will be archived forever as a single video.

Restream relay or direct YouTube output?

If YouTube is your only destination, a VPS encoder can send directly to YouTube instead of routing through Restream. Restream’s encoder workflow is useful when you want to manage YouTube as a destination through its relay, or may send the same encoder feed to additional destinations. The trade-off is an extra service and a separate place to manage channel authorization and stream settings. The cited setup documentation does not establish a current vendor reliability comparison or pricing comparison, so choose based on your destination needs and verify current service terms.

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.

Troubleshooting: “My stream doesn’t start on YouTube”

  • YouTube shows no incoming stream. Confirm the channel’s live access is enabled, including the initial phone verification and 24-hour wait if it is a first stream. Check that the correct YouTube channel is enabled in Restream, and that FFmpeg is publishing to the endpoint and key for the same Restream encoder stream.
  • The stream key is rejected or the feed reaches the wrong destination. Recheck for a copied key or endpoint error. Restream’s key remains static unless reset, but a newly created RTMP stream may use a different key. Keep the destination selection and encoder stream paired.
  • YouTube receives video but reports poor health or buffering. Check that the VPS sustains the required outbound bitrate and that the chosen resolution and frame rate use a matching bitrate. Compare against Restream’s resolution-dependent guidance and confirm the VPS provider’s egress limits.
  • The stream connects but video or audio is not accepted as expected. Verify H.264 video, CBR, a two-second keyframe interval (no more than four seconds), and supported audio codec, bitrate, and sample rate. Inspect the live control room rather than assuming the FFmpeg process running means the event is healthy.
  • The encoder stops after a network or output failure. Inspect FFmpeg and service-manager logs, then check VPS connectivity and the Restream endpoint. A supervised process and FFmpeg FIFO recovery options can help with failures, but neither ensures that the same YouTube event resumes seamlessly.
  • A long broadcast is interrupted or has no YouTube archive. Plan for a possible Restream maintenance restart after more than 24 hours, and for YouTube’s under-12-hour archive condition. Schedule restarts and separate recordings according to whether continuity or a VOD matters most.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or let it run in the cloud

If you want a continuous YouTube stream from uploaded videos without maintaining an encoder process on a VPS, StreamNeo is a cloud alternative. Upload a recording or build a playlist, add your YouTube stream key once, and go live. Nothing has to stay on at home; it streams the uploaded video at the quality you made it, up to 4K 60fps, for one flat price per slot. It can automatically recover if YouTube drops the stream. The first day is free with no card. Monthly: $9.99 per month. StreamNeo is for YouTube streams from uploaded videos, not camera-based live video. Learn more at StreamNeo, or start your free first day.

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

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 from the Screening Room

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
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.