Free tools Windows power users keep installed
One-click scans. No signup required.
You can run a prerecorded video as a YouTube Live stream from a Linux virtual machine (VM) on Google Cloud Compute Engine: make sure the channel can livestream, create a stream in YouTube Studio, configure an encoder on the VM to send the video to YouTube, then test and monitor the broadcast. The VM must stay running while the loop is live, and Google Cloud billing is required. This guide covers the setup and the decisions to make before you start; it does not provide an unverified copy-and-paste FFmpeg loop command.
Before you start
- YouTube channel: YouTube requires a verified channel with no live-streaming restrictions in the previous 90 days. Check YouTube’s live-streaming eligibility guidance before configuring the VM.
- Google Cloud: Use a Google Cloud project with billing enabled. Compute Engine VM runtime and network use can incur charges; check current Google Cloud pricing for your region and configuration before leaving a VM running.
- Video: Have an authorized prerecorded video available to the VM. The referenced Google Cloud instructions do not prescribe a particular upload method or storage product, so choose one that fits your file size and workflow.
- Encoder: You need software on the VM that can send the video to YouTube over RTMPS and repeat it. The precise loop syntax and reconnect behavior depend on the encoder and its build.
1. Create a Linux VM in Compute Engine
- In the Google Cloud console, select a billing-enabled project and open the Compute Engine VM creation page. Follow Google Cloud’s Linux VM creation guide; Ubuntu 24.04 LTS is one example shown in that guide, not a requirement for this workflow.
- Choose a machine type and region appropriate to the encoder and stream you intend to run. No particular VM size is established here as sufficient for every video, resolution, or frame rate. Check that the instance’s network capacity and your chosen encoder can sustain the outgoing stream.
- Create the instance, then use the console’s SSH connection option to connect. Install and configure an encoder that supports your source media and YouTube’s current ingest requirements.
- Make the source video accessible to the VM. Keep it in a location the encoder can read for the entire broadcast, and confirm that the VM has enough storage if you copy the file onto its disk.
Do you need an inbound firewall rule?
Usually not just to send a stream from the VM to YouTube. Google documents that the default VPC rules allow outgoing traffic and block incoming traffic by default. A VM-initiated broadcast uses outbound networking; available egress still depends on the machine type and network route. Do not open an inbound port unless another part of your setup actually requires one. See Google Cloud’s VPC networking overview.
2. Create the YouTube stream and protect its key
- In YouTube Studio, open Live Control Room and create or schedule a stream. Select a privacy setting suited to your test and intended audience; use private or unlisted for a pre-publication test.
- Copy the server URL and stream key shown for the stream into the encoder’s ingest settings. YouTube describes stream keys as “like your YouTube stream’s password and address.” Treat the key as a credential: do not expose it in a public repository, public logs, or screenshots.
- Prefer the RTMPS server URL for encrypted ingest. If YouTube initially shows an RTMP URL, reveal and select the RTMPS URL in Live Control Room. See YouTube’s instructions for encrypting a stream using RTMPS and managing live stream settings.
If the stream key is exposed, reset it in Live Control Room before broadcasting again. Do not reuse a compromised key.
3. Configure the encoder for YouTube
Set the encoder to send the video and audio to the RTMPS ingest URL using the stream key. Match its output to YouTube’s current guidance rather than relying on a fixed bitrate that may not suit your chosen resolution and frame rate.
#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.
| Setting | YouTube guidance |
|---|---|
| Ingest protocol | RTMP or RTMPS; RTMPS is recommended for encrypted ingest. |
| Video codec | H.264, H.265, or AV1 are listed in YouTube’s encoder guidance. |
| Audio codec | AAC or MP3. |
| Rate control | Constant bitrate (CBR). |
| Frame rate | Up to 60 fps. |
| Keyframe interval | Two seconds recommended; do not exceed four seconds. |
| Bitrate | Choose the value in YouTube’s current recommendations for the selected resolution and frame rate; it varies with those settings. |
Use YouTube’s encoder settings, bitrate, and resolution guidance when configuring the actual output. These are platform recommendations, not a guarantee that an arbitrary VM or encoder configuration will maintain the stream.
Looping the source video
The encoder must be configured to repeat the prerecorded file rather than exit after one playback. The exact FFmpeg loop flags and command syntax were not verified here, and behavior can vary by FFmpeg version and build. Consult the current documentation for the encoder you install, then validate the loop with a real test stream before relying on it. Do not assume a command found for another version will restart cleanly or reconnect after an interruption.
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.
4. Test, publish, and monitor
- Start with the YouTube stream set to private or unlisted. Start the encoder on the VM and wait for the feed to appear in Live Control Room.
- Check the preview for the correct picture and confirm that audio is present, audible, and synchronized. Monitor the stream health indicators and resolve warnings before changing the privacy setting or sharing the broadcast.
- Confirm that the source repeats as intended, including the transition from the end of the video back to its beginning. A successful initial connection alone does not establish that the loop or recovery behavior works.
- For a public broadcast, review the video and audio rights and follow YouTube’s copyright and live-stream policies. A loop being technically valid does not make its content authorized. YouTube’s encoder setup guidance says streams under 12 hours are automatically archived; plan for that when choosing stream duration and archive handling.
- Keep the VM running for the entire broadcast. If you stop or delete it, the encoder process stops. Delete the instance when you no longer need it to avoid further VM runtime charges, following Google’s VM guide.
Troubleshooting
| Symptom | Likely checks and fixes |
|---|---|
| YouTube does not accept the stream | Confirm the channel meets YouTube’s live-stream eligibility requirements, that the correct stream is selected, and that the encoder uses the matching server URL and stream key. Prefer the RTMPS URL from Live Control Room. |
| Live Control Room shows no preview | Check that the encoder is running, the VM has outbound connectivity, and its output uses a supported codec and valid ingest settings. Recheck the stream key and server URL for transcription or copy errors. |
| Video or audio is missing or incorrect | Inspect the source file and encoder output separately. Confirm the selected video and audio codecs are supported, then check the preview and audio in Live Control Room before going public. |
| The stream stops when you disconnect | Confirm the VM itself is still running and that the encoder process remains active. A stream hosted on the VM depends on the VM and encoder continuing to run. |
| The VM cannot sustain the selected output | Revisit the resolution, frame rate, bitrate, machine type, and available egress. YouTube’s bitrate recommendations depend on resolution and frame rate, and capacity varies with VM configuration and routing. |
| The loop fails at the end of the file or after an interruption | Verify the loop and reconnect settings against the installed encoder’s current documentation, then repeat a test stream. Exact FFmpeg looping and robust reconnection settings are not established here. |
DIY VM versus a managed loop
Compute Engine gives you control of the VM and encoder, but you are responsible for configuration, keeping the instance available, and diagnosing failures. YouTube’s encoder guide also describes AJA PlayToStream as a way to schedule prerecorded media directly to YouTube Live without a computer; that is an adjacent option, not the same Compute Engine workflow. See YouTube’s encoder setup guidance.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Or let it run in the cloud
With StreamNeo, upload the recording, add your YouTube stream key, and go live. It loops uploaded videos to YouTube from the cloud, so nothing has to stay on at home. Each slot streams the file as uploaded, up to 4K 60fps, at one price per slot; StreamNeo automatically recovers if YouTube drops the stream. The first day is free with no card. Monthly pricing is $9.99 per month. See StreamNeo or plan details; UPI and cards are available in India, and card checkout is available worldwide. Start your free day on StreamNeo.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Quick Recap
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.
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
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.
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.

