Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsTo loop a prerecorded video into a 4K 60fps YouTube Live stream from Google Cloud, create a YouTube live stream and copy its RTMPS ingest URL and stream key, then run FFmpeg on a Compute Engine VM with the input looped and paced in real time. Whether to copy the file’s existing streams or re-encode them depends on the file and your chosen output settings. The VM, network route, and total cost must be checked for your region and workload; no single machine type is guaranteed to handle every 4K60 file.
Before you start: check the file and decide whether to encode
Inspect the recording’s video and audio codecs, resolution, frame rate, and audio format before choosing FFmpeg output options. If its streams already match the output format you intend to send, stream-copying may avoid a costly encode. If they do not, you will need to re-encode to a format and bitrate suitable for YouTube Live. The correct choice depends on the source file and target output; neither a general-purpose VM nor a GPU can be assumed sufficient for an unspecified transcoding workload.
- Confirm that the file has the intended 2160p resolution and 60 fps frame rate if you expect a 4K60 output.
- Choose an output codec and bitrate using YouTube’s current encoder guidance, not just the source file’s properties.
- Plan to test the actual FFmpeg process on the selected VM and route before leaving it unattended.
Create the YouTube Live stream and protect its key
- In YouTube Studio, create or open the live event and its stream settings.
- Copy the stream URL and stream key shown in the settings, then configure FFmpeg to send its output to YouTube’s ingest endpoint.
- Treat the stream key like a password: do not publish it, commit it to a public repository, or expose it in screenshots. If you believe it has been compromised, reset it in YouTube Studio and update the encoder.
YouTube’s live stream settings guidance describes the stream URL and key used by an encoder. Use RTMPS where available, as YouTube recommends it.
Prepare a Google Cloud VM and account for egress
Create a Compute Engine VM in the region you intend to use, install FFmpeg using the method appropriate to the VM’s operating system, and make the media file accessible to the VM. The exact machine family and size depend on whether you are copying streams or encoding them, the selected codec and settings, and the source file. No universal VM recommendation is established for every 4K60 loop.
Recommended Free Tools
#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.
Before committing to a configuration, check that the VM can sustain the chosen output rate to YouTube. Google Cloud documents external egress limits that depend on the machine and applicable per-instance, per-flow, and project limits. A published maximum is not a throughput guarantee for your VM or route. YouTube’s bitrate recommendation is an ingest target, not evidence that a particular Google Cloud configuration can sustain it.
Build the FFmpeg command for a prerecorded loop
FFmpeg’s -stream_loop -1 option loops an input indefinitely. For a file that must be delivered at real-time speed, use -re before the relevant input; FFmpeg documents this as equivalent to -readrate 1. Input options belong before their corresponding -i.
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.
ffmpeg -stream_loop -1 -re -i /path/to/video.mp4 [output options] -f flv "rtmps://YOUR_INGEST_URL/YOUR_STREAM_KEY"
Replace the file path and ingest URL with your own values, and supply output options appropriate to the source and your selected encoding path. The bracketed text is explanatory, not literal FFmpeg syntax. Do not paste a real stream key into a shared script or shell history that other users can access.
For stream-copying, the output options must pass through compatible audio and video streams without re-encoding. For transcoding, choose the video and audio encoders and their settings explicitly. The command above is a structural example, not a tested, universal 4K60 command; validate it with your file, FFmpeg build, VM, and YouTube event.
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.
FFmpeg cautions against using low read rates with an actual capture device or live stream because packet loss may result. That caution is distinct from this prerecorded-file workflow, where -re paces file input.
Match YouTube’s ingest settings to the codec
YouTube’s current Help guidance supports H.264, H.265/HEVC, and AV1 encoder choices, recommends constant bitrate (CBR), allows up to 60 fps, and recommends a two-second keyframe interval that does not exceed four seconds. Select the applicable codec-specific row in YouTube’s encoder settings rather than treating one bitrate as universal.
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
| Setting | Guidance and application |
|---|---|
| Transport | YouTube recommends RTMPS. |
| Rate control | Use CBR as recommended by YouTube’s encoder guidance. |
| Frame rate | YouTube documents support up to 60 fps. |
| Keyframes | Two-second interval recommended; no more than four seconds. |
| H.264 at 2160p60 | YouTube’s encoder table lists 35 Mbps as the recommended setting. This figure is for H.264 at 2160p60, not every supported codec. |
Check YouTube’s encoder settings, bitrates, and resolutions when configuring the event: guidance can change, and the correct bitrate depends on the codec and resolution. YouTube automatically transcodes received streams into multiple playback formats, but that does not remove the need to send a stable, correctly configured input.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Test the stream before leaving it unattended
- Start a test using the representative video and audio you plan to loop.
- Confirm the event receives a 2160p60 signal and check YouTube’s stream health messages.
- Watch for dropped frames, unstable bitrate, audio problems, and failures around the end-to-start loop transition.
- Observe the VM’s CPU or accelerator load and network behavior for long enough to reveal sustained problems, not just startup success.
- Only leave the process unattended after the file, FFmpeg settings, YouTube ingest, VM, and route work together reliably.
YouTube states, “We recommend testing before you start your live stream.” Its guidance also recommends monitoring stream health during the event. The procedure here has not been independently tested as a particular VM configuration.
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.
Estimate the full Google Cloud cost
There is no defensible universal cost for this setup without a region, machine type, disk, stream duration, encoding workload, and current prices. Compute Engine lists VM compute separately from other cost categories; an attached GPU is charged in addition to the machine type, while internet data transfer out is priced separately. Include the time the VM runs and any ongoing resource charges, then use Google Cloud’s current estimator for the actual region and configuration.
- Compute Engine pricing covers VM pricing categories.
- GPU pricing explains that an attached GPU adds a charge beyond the machine type.
- VPC network pricing covers internet data transfer out separately.
- Google Cloud VM network bandwidth documentation explains configuration-dependent egress limits.
Common problems and what to check
- YouTube does not receive a signal: Verify the RTMPS endpoint, event state, and stream key. If the key may be exposed or invalid, reset it in YouTube Studio and update FFmpeg.
- The stream arrives at the wrong resolution or frame rate: Check the actual source properties and output encoding settings, then verify the received signal and event settings. A filename alone does not establish that the file is 2160p60.
- Bitrate fluctuates or YouTube reports poor health: Confirm CBR and the codec-specific bitrate guidance, then investigate sustained VM and route throughput. Google Cloud’s documented limits are ceilings conditioned on configuration, not a guarantee of delivered bandwidth.
- Video stutters or the VM struggles: Determine whether FFmpeg is re-encoding. Re-encoding 4K60 may demand substantial compute; test a suitable machine and any accelerator with the actual file rather than assuming a VM or GPU is adequate.
- The file races ahead or playback timing is wrong: For prerecorded-file real-time output, check that
-reappears before the relevant-i. Do not apply low read-rate pacing indiscriminately to a live input or capture device. - The loop fails at the boundary: Test the end-to-start transition with the actual recording and inspect its audio and video streams. The available guidance does not establish that every file loops seamlessly.
Or let it run in the cloud
If maintaining a VM and FFmpeg process is more infrastructure than you want, StreamNeo is a YouTube-only cloud service for looping uploaded videos. 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 your upload as made, up to 4K 60fps, at one price per slot, and can recover automatically if YouTube drops the stream. The first day is free with no card. Monthly billing is $9.99 per month.
Quick Recap
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.




