Free tools Windows power users keep installed
One-click scans. No signup required.
Use FFmpeg’s -stream_loop -1 before the input file’s -i option to repeat a video indefinitely. Add -re to pace a local file in real time, then send the encoded output to the stream URL and key supplied by YouTube Live Control Room. The command below is a documented-options example, not a tested or guaranteed configuration; verify it with your file, FFmpeg build, upload connection and YouTube stream preview.
What you need before starting
- A video file available on the machine running FFmpeg.
- An FFmpeg build with the required input, encoding and output support. Confirm the command is available in your terminal with
ffmpeg -version. - A YouTube channel with access to YouTube Live and a stream created or selected in Live Control Room.
- A stable upload connection with enough capacity for the chosen video bitrate.
This method sends a prerecorded file as a live encoder feed; it does not turn on a camera. The video repeats until you stop FFmpeg or end the stream.
Get YouTube’s stream URL and key
- In YouTube Studio, open Live Control Room and create or select the stream. YouTube’s encoder setup guide describes this workflow.
- Copy the stream URL and stream key shown for that stream. Use the exact URL YouTube provides, preferably its RTMPS endpoint when your FFmpeg build supports it. YouTube recommends RTMPS, the encrypted form of RTMP, in its encoder settings guidance.
- Keep the key private. It functions like a password for the stream: anyone who obtains it may be able to send video to your channel’s live event.
Choose encoder settings
The right settings depend on the file’s resolution and frame rate, your upload capacity, and YouTube’s current recommendations. The following H.264 figures are platform guidance published by Google / YouTube Help and accessed on October 3, 2026; they are not measured performance guarantees.
| H.264 output | Minimum bitrate | Recommended bitrate |
|---|---|---|
| 720p at 30 fps | 3 Mbps | 8 Mbps |
| 1080p at 30 fps | 5 Mbps | 14 Mbps |
YouTube’s settings page lists H.264, H.265 (HEVC) and AV1 video, AAC or MP3 audio, constant bitrate encoding, and frame rates up to 60 fps. It recommends a two-second keyframe interval and says the interval should not exceed four seconds. Settings can change, so check the current YouTube encoder recommendations before a broadcast.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →#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.
The sample below encodes video as H.264 with libx264 and audio as AAC. Its bitrate and keyframe values are only examples, not universal settings. For its -g 60 value to represent a two-second interval, the output must be 30 fps. Adjust resolution, frame rate, bitrate and GOP length together for your intended output. Allow headroom above the stream bitrate on the upload connection, and test using similar movement and audio to the actual video.
Start an infinite loop with FFmpeg
- Open a terminal in the directory containing the video, or use its full file path.
- Substitute the local input filename and the exact YouTube RTMPS URL and stream key for the placeholders below. Do not share the completed command or expose the key in a public log, screenshot or post.
- Run the command and wait for FFmpeg to connect and begin sending media.
ffmpeg -re -stream_loop -1 -i input.mp4
-c:v libx264 -preset veryfast
-b:v 4500k -maxrate 4500k -bufsize 9000k -g 60
-c:a aac -b:a 128k
-f flv "rtmps://YOUR_YOUTUBE_INGEST_URL/YOUR_STREAM_KEY"
Replace input.mp4 with your file and replace the quoted destination with the URL and key from Live Control Room, formatted as required by the endpoint. The example’s options are a synthesis of documented FFmpeg and YouTube settings; the command has not been tested and may need adjustments for your build, file and ingest URL.
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.
Why the options are in this order
-rereads the local file at its native frame rate, equivalent to-readrate 1. Without real-time pacing, FFmpeg generally processes a file as quickly as it can rather than sending it at live speed. FFmpeg cautions against applying low-rate real-time pacing to actual capture or live inputs; it is useful here because the input is a local file.-stream_loop -1is an input option. FFmpeg documents-1as an infinite loop; put the option before the-ifor the file it controls. The loop continues until the FFmpeg process or stream is stopped.-c:v libx264and-c:a aacencode video and audio rather than assuming the source’s codecs and container can be passed through unchanged.-b:v,-maxrate,-bufsizeand-gcontrol video rate and keyframe behavior in this example. Choose values for the output format and current YouTube guidance; do not treat the sample numbers as a recommendation for every resolution or frame rate.-f flvselects the FLV output muxer used for this RTMP/RTMPS-style ingest pattern. The destination must still be the precise endpoint and key YouTube supplied.
Confirm that YouTube is receiving the loop
- Keep FFmpeg running and check Live Control Room for the incoming preview. If the stream is scheduled, YouTube’s workflow may require you to click Go live after the preview appears.
- Check the stream preview for picture and sound, then monitor stream health for connection or encoding warnings. Confirm that playback continues past the end of the source file and begins again.
- When finished, stop FFmpeg and end the stream in Live Control Room. YouTube says streams under 12 hours are automatically archived; do not assume the same archive behavior for longer streams.
Re-encode or stream copy?
The sample re-encodes because that gives you control over output codecs and encoding properties that can match YouTube’s ingest guidance. It also uses compute on the machine running FFmpeg. Stream copy can reduce encoding work, but only if the file’s codecs, timestamps, audio and output muxer are suitable. FFmpeg and YouTube’s cited documentation do not guarantee that an arbitrary file will work with stream copy, so test that approach before relying on it.
Troubleshooting
| Symptom | Likely cause | What to check |
|---|---|---|
FFmpeg rejects -stream_loop or does not repeat the file |
The option may be after the input it should control, or the build may differ. | Place -stream_loop -1 before that file’s -i. Check the installed build and its help or documentation. |
| The video races through the file | The local-file input is not being paced for real-time output. | Use -re before -i for this local-file workflow. |
| YouTube shows no preview or rejects the connection | The destination URL or key may be wrong, or the build may not support the selected RTMPS endpoint. | Copy both values again from Live Control Room, keep the key private, and confirm the local build supports the endpoint. Do not guess an ingest URL. |
| Video or audio is missing, or YouTube reports poor stream health | The chosen codecs, bitrate, frame rate, keyframe interval, upload capacity or media may not suit the stream. | Check the file’s streams and output settings; compare them with YouTube’s current encoder recommendations. Test with representative audio and movement, and monitor stream health. |
| The live event has a preview but is not public | A scheduled stream may still be waiting for the creator’s launch action. | After the preview appears, check Live Control Room for the Go live action. |
| The loop transition pauses or jumps | Gapless looping behavior is not established for every file and setup; media boundaries and timestamps can affect the result. | Test the full transition with the actual file and build before depending on continuous playback. The command alone does not guarantee a seamless join. |
Copyright and YouTube policy checks
Before streaming, make sure you have the rights needed to broadcast the video and all included audio. A looping live stream does not make copyrighted or otherwise restricted material permissible. YouTube may apply its copyright and live-stream rules to the content; review the applicable policies and check for restrictions in your account before scheduling a broadcast.
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.
Or let it run in the cloud
If your goal is an always-on YouTube channel rather than learning to maintain an FFmpeg process, StreamNeo runs uploaded videos from the cloud: upload a recording or build a playlist, add your YouTube stream key once, and go live. Nothing has to stay on at home. Each slot streams the upload as made, up to 4K 60fps, at one flat price per slot; it automatically recovers if YouTube drops the stream. The first day is free with no card. Monthly is $9.99 per month. StreamNeo is for YouTube streams from uploaded videos, not camera broadcasts. Start your free day on StreamNeo.
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
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.




