Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →To loop a video on YouTube Live from a Contabo VPS, run FFmpeg with -stream_loop -1 before the input file, then send its output to YouTube’s ingest server using the stream key from YouTube Studio. The loop option repeats the input; it does not by itself keep the VPS, network connection, or FFmpeg process running reliably. You must choose settings the server and its sustained upload connection can handle, and monitor the stream in YouTube Live Control Room.
What you need before starting
- A video file accessible on the Contabo VPS, or a way to transfer it there.
- FFmpeg installed on the VPS, with the video and audio encoders you intend to use available in that build.
- A YouTube channel with live streaming enabled and a stream configured in Live Control Room.
- The ingest server URL and stream key for that YouTube stream.
- A Contabo plan whose current CPU, memory, traffic allowance, and terms suit your chosen encoding workload and continuous transfer. Verify these details with Contabo; a particular plan’s suitability is not established here.
This guide uses FFmpeg’s documented input-loop option and an illustrative H.264/AAC command. Check the options supported by the FFmpeg version and build installed on your VPS before running it. The command is an example, not a tested Contabo configuration.
Set up the YouTube Live stream
- In YouTube Studio, open Live Control Room and create a stream or select an existing one. YouTube’s encoder setup guide describes the workflow.
- Copy the stream’s server URL and stream key from the stream settings. YouTube describes the key as a password and address for the stream. Treat it as a credential: do not publish it, commit it to a shared script, or paste it into a public support post. If someone else obtains it, reset it in YouTube Studio. See YouTube’s stream settings guidance.
- Decide whether you are starting a scheduled stream or an immediate one. For a scheduled stream, YouTube’s setup guide says to wait for the encoder preview and select Go live. Stop the encoder and end the stream in Live Control Room when finished. Check the current auto-start and auto-stop controls, since they affect how the stream begins and ends.
Choose output settings that fit the VPS and connection
YouTube’s encoder guidance, accessed October 3, 2026, recommends RTMPS and lists H.264, H.265/HEVC, and AV1 as supported video codecs, subject to encoder support. It lists AAC or MP3 audio, constant bitrate (CBR), frame rates up to 60 fps, and a two-second keyframe interval (not exceeding four seconds). For H.264, YouTube’s recommended video bitrate is 14 Mbps for 1080p30 and 8 Mbps for 720p30; its recommended stereo audio bitrate is 128 Kbps. These are YouTube ingest recommendations, not a guarantee that a given VPS can encode or upload at those settings. Consult the current YouTube encoder settings.
| Example output | YouTube H.264 recommendation | When to consider it |
|---|---|---|
| 1080p30 | 14 Mbps video | Use if the source merits this resolution and sustained upload capacity and server resources are adequate. |
| 720p30 | 8 Mbps video | A lower-bitrate option when bandwidth or encoding capacity is more limited. |
YouTube recommends leaving 20% upload-bandwidth headroom above the stream’s total bitrate. That headroom matters because audio and video together use bandwidth, and a connection operating at its limit can become unstable. Test at your intended settings with representative motion and audio; check YouTube’s preview, stream-health indicators, and error messages before relying on the stream. During a live session, monitor health rather than assuming a successful start guarantees uninterrupted delivery. See YouTube’s streaming tips and its encoder guidance.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minute#1 Best Overall
- Includes Raspberry Pi 5 with 2.4Ghz 64-bit quad-core CPU (8GB RAM)
- Includes 128GB Micro SD Card pre-loaded with 64-bit Raspberry Pi OS, USB MicroSD Card Reader
- CanaKit Turbine Black Case for the Raspberry Pi 5
- CanaKit Low Noise Bearing System Fan
- Mega Heat Sink - Black Anodized
Run FFmpeg with an infinitely looping input
FFmpeg’s official documentation defines -stream_loop as the number of times an input stream is looped: 0 means no loop and -1 means infinite loop. It is an input option, so place it before the input it controls: -stream_loop -1 -i input.mp4. This repeats the file as input; it does not promise uninterrupted network delivery, restart a failed process, or recover a dropped connection. See the FFmpeg command-line documentation.
After transferring the file to the VPS, substitute its path, the YouTube ingest URL, and the stream key in this illustrative command:
Rank #2
- Includes Raspberry Pi 4 4GB Model B with 1.5GHz 64-bit quad-core CPU (4GB RAM)
- Includes Pre-Loaded 32GB EVO+ Micro SD Card (Class 10), USB MicroSD Card Reader
- CanaKit Premium High-Gloss Raspberry Pi 4 Case with Integrated Fan Mount, CanaKit Low Noise Bearing System Fan
- CanaKit 3.5A USB-C Raspberry Pi 4 Power Supply (US Plug) with Noise Filter, Set of Heat Sinks, Display Cable - 6 foot (Supports up to 4K60p)
- CanaKit USB-C PiSwitch (On/Off Power Switch for Raspberry Pi 4)
ffmpeg -re -stream_loop -1 -i /path/to/video.mp4
-c:v libx264 -preset veryfast -b:v 14M -maxrate 14M -bufsize 28M
-r 30 -g 60 -keyint_min 60 -sc_threshold 0
-c:a aac -b:a 128k -ar 44100
-f flv "rtmps://INGEST_SERVER_URL/STREAM_KEY"
-rereads the file at its native playback rate, rather than sending it as fast as possible.-stream_loop -1requests infinite looping of the input file.-c:v libx264selects the H.264 encoder commonly exposed by FFmpeg builds. If your build lacks it, choose an encoder that is installed and supported by YouTube.-preset veryfasttrades some compression efficiency for lower encoding work; actual CPU demand depends on the file, settings, and build.-b:v,-maxrate, and-bufsizeare example rate-control choices, not values mandated by FFmpeg’s loop documentation. The 14 Mbps target corresponds to YouTube’s H.264 1080p30 recommendation; select bitrate for your chosen resolution and available sustained bandwidth.-r 30sets the example output frame rate.-g 60and-keyint_min 60request a 60-frame GOP at 30 fps, corresponding to a two-second interval. Encoder behavior and support can vary by build.-c:a aac -b:a 128kselects AAC audio at YouTube’s recommended stereo bitrate.-ar 44100sets the example audio sample rate; confirm it suits your source and encoder.-f flvselects the muxer commonly used for RTMP-family ingest. Use the RTMPS server URL YouTube provides.
The output URL above is illustrative: replace the full value with the exact ingest server URL and stream key shown for your stream, using the format required by your FFmpeg output. Do not share a command containing a live key. To avoid leaving the credential in shell history or visible process listings, consider a more secure credential-handling method appropriate to your server and FFmpeg setup.
Start, verify, and stop the stream
- Start the command in a terminal on the VPS. Keep the session attached while verifying the first connection, or use a process manager only after configuring it deliberately.
- In Live Control Room, wait for the incoming preview and inspect picture, sound, motion, stream health, and any encoder errors. If it is scheduled, select Go live when the preview is ready.
- Once live, monitor both FFmpeg output and YouTube’s stream-health indicators. A repeating source does not make the VPS process or network connection failure-proof.
- To finish, stop FFmpeg cleanly and end the stream in Live Control Room according to the stream’s current start/stop settings.
YouTube says encoder streams shorter than 12 hours are automatically archived. That is a YouTube archive behavior, not a guarantee that a long-running FFmpeg process or VPS connection will stay up for that duration or longer. See YouTube’s encoder setup information.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Contabo checks and common problems
Before committing to a continuous broadcast, check the current details for your chosen Contabo plan: CPU allocation and limits, memory, traffic allowance, and any applicable usage terms. Also verify that the VPS can sustain the encoder workload and the upload rate you select. YouTube’s bitrate recommendations cannot establish Contabo capacity, and no specific Contabo plan is identified here as sufficient.
| Symptom | Likely cause | What to check or do |
|---|---|---|
| Video ends instead of repeating | The loop option is missing or placed after the input it should control. | Put -stream_loop -1 before the relevant -i option. |
| YouTube does not receive a signal | Incorrect ingest URL or key, an unreachable endpoint, or an FFmpeg output/configuration error. | Copy the current server URL and key from Live Control Room, verify the output URL format, and read FFmpeg’s error output. Keep the key private. |
| Stream health reports instability or dropped frames | The VPS may be short of CPU, or available sustained upload bandwidth may not support the total bitrate. | Check server load and connection capacity; reduce resolution, frame rate, or bitrate if needed, then test again with YouTube’s recommended 20% bandwidth headroom. |
| Video appears but sound is absent or wrong | The source may lack an audio stream, or the selected audio mapping/encoding may not match it. | Inspect the source streams and FFmpeg output; confirm the chosen audio encoder and bitrate are supported by the installed build and accepted by YouTube. |
| FFmpeg stops after an error or disconnect | The loop option only repeats media input; it does not supervise or restart the process or guarantee reconnection. | Review the error, correct its cause, and configure and test process supervision or a deliberate restart procedure separately. Verify recovery in Live Control Room before depending on it. |
Or let it run in the cloud
If you would rather not maintain an FFmpeg process on a VPS, StreamNeo is a cloud service for keeping a YouTube channel live from 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; StreamNeo runs in the cloud, streams uploads as made up to 4K 60fps at one flat price per slot, and automatically recovers if YouTube drops the stream. The first day is free with no card. Monthly pricing is $9.99 per month. It streams to YouTube only and plays uploaded video, not a live camera feed. See StreamNeo or current plans. Start your free first day with StreamNeo.
Quick Recap
Best Value
- Includes Raspberry Pi 5 16GB with 2.4Ghz 64-bit quad-core CPU (16GB RAM)
- Includes 128GB Micro SD Card pre-loaded with 64-bit Raspberry Pi OS, USB MicroSD Card Reader
- CanaKit Turbine Black Case for the Raspberry Pi 5
- CanaKit Low Noise Bearing System Fan
- Mega Heat Sink - Black Anodized
Rank #4
- Broadcom BCM2711, quad-core Cortex-A72 (ARM v8) 64-bit SoC @ 1. 5GHz
- 2. 4 GHz and 5. 0 GHz IEEE 802. 11b/g/n/ac wireless LAN, Bluetooth 5. 0, BLE
- 2 × USB 3. 0 ports, 2 x USB 2. 0 Ports
- 2 × micro HDMI ports supproting up to 4Kp60 video resolution
- Micro SD card slot for loading operating system and data storage
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.

