To stream a prerecorded video to YouTube Live from a Contabo VPS, run FFmpeg on the VPS, read the file at real-time speed and send it to YouTube’s ingest address with the stream key from Live Control Room. The method is straightforward; choosing a suitable Contabo plan is not something to guess, because the current capacity and terms need checking before you rely on it overnight.
This is an encoder feed, not a video upload. YouTube receives a live signal while FFmpeg plays the file, and you control the event in Live Control Room. The steps below cover channel setup, key handling, FFmpeg, and the tests to make before you schedule a long broadcast.
Prepare the channel before renting capacity
Start in YouTube Studio and confirm the channel is allowed to go live. YouTube says the channel must be verified and must not have had a live-streaming restriction in the previous 90 days. Enable live streaming ahead of the date you need it: a first-time activation can take time, so do not treat an unprepared channel as a last-minute test.
Decide what the channel is broadcasting and whether the event should be public, unlisted or private. An unlisted test is useful when you need to inspect playback without putting the test in front of subscribers. If the video contains devotional music, local programming or other material you did not create, make sure you have the rights and permissions needed for your use; a working encoder does not settle copyright or monetisation questions.
Check the file on a local machine or the VPS before configuring the stream. Note its resolution, frame rate, video and audio codecs, duration, and whether the audio is present throughout. If the source is a single bhajan album loop, for example, verify that the last seconds join acceptably to the opening, and listen for silence or a clipped transition. A stream can be technically healthy while the programme itself has an obvious flaw.
If you are weighing output quality before choosing a server, the advice in resolution choices for a 24/7 nature ambience stream is relevant to the same trade-off: a higher-resolution feed needs more sustained upload capacity, but does not automatically improve the experience for every viewer.
Create the encoder event in Live Control Room
In Live Control Room, create a stream or select an existing one that is intended for encoder use. Set its title, description, visibility and schedule deliberately. Scheduling an event and starting the outgoing encoder are separate actions: the VPS can be sending a feed while the event is still waiting for you to start it in the control room, depending on the event setup.
Open the stream settings and copy the ingest URL and stream key privately. YouTube’s guide to creating a live stream with an encoder walks through the Live Control Room workflow. Use the exact endpoint shown for that stream; do not assume a URL copied from an old tutorial is the current one for your event.
YouTube recommends RTMPS, a secure extension to RTMP. Its encoder settings guidance also lists supported ingest codecs and stream parameters. The example later in this guide uses an RTMPS-style destination, but the endpoint format and protocol availability depend on what YouTube provides and what your FFmpeg build supports. Treat the dashboard value as authoritative.
A useful way to test without disrupting a planned programme is to create a separate unlisted test event, rather than repurposing a public event and forgetting to restore its settings. Check that the account selected in Studio is the channel you intend to broadcast from; organisations with several channels can otherwise copy a valid key for the wrong destination.
Treat the stream key as a password
The stream key authorises an encoder to send a feed to the associated YouTube stream. Keep it out of screenshots, articles, public repositories, shared support tickets, and scripts that other users can read. Do not paste the full destination containing the key into a public terminal transcript or a message asking for troubleshooting help.
A shell command can be recorded in shell history, and a script file may be readable by more people than you expect. Restrict access to any file containing the credential, and avoid including it in logs. For a one-off trial you might paste it into an interactive command, but that still leaves a history and process-visibility consideration. Choose a secret-handling method appropriate to the VPS account and who has access to it; do not mistake a hidden display for secure storage.
If you think a key has escaped, reset or rotate it in YouTube Studio and update the encoder with the new value. YouTube’s stream settings and key-management help explains the controls. After changing it, test the new credential before relying on a scheduled broadcast.
Select a Contabo VPS from verified current details
This guide does not name a recommended Contabo plan. Plan specifications, sustained upload performance, traffic terms and reliability were not verified for this article, and a headline CPU or port figure is not enough to establish that a VPS will run your particular stream continuously. Check Contabo’s current plan pages and terms directly before ordering, then measure the VPS you actually receive.
Compare candidates against the workload rather than choosing by storage or headline price alone. FFmpeg can simply pass through compatible video and audio, or it can transcode to a YouTube-friendly output. Copying compatible streams generally reduces processing work; transcoding consumes CPU and can fail or fall behind if the VPS cannot keep up. For a file whose codecs or frame rate need conversion, test the real command under load rather than infer capacity from the plan label.
| What to verify | Why it matters | Practical check |
|---|---|---|
| Sustained outbound bandwidth | The video feed must reach YouTube continuously, with spare capacity for variation | Measure a sustained upload from the VPS and compare it with the selected output bitrate, leaving headroom |
| CPU capacity | Transcoding requires ongoing encoding work; a busy CPU can cause lag or dropped frames | Run the intended FFmpeg settings on the actual file and inspect CPU use and output progress |
| Traffic allowance and overage terms | A continuous feed transfers data for as long as it runs | Read the current allowance, billing basis, and what happens if usage exceeds it |
| Network reliability and location | A broken route interrupts delivery even when FFmpeg is still running | Review current provider terms and perform a test at the times and duration that resemble your use |
| Storage and transfer method | The source file must be present and readable on the VPS | Allow for the source file plus any additional working space needed for the workflow |
For bitrate context, YouTube’s current H.264 recommendations include 8 Mbps for 720p30, 14 Mbps for 1080p30, and 17 Mbps for 1080p60. These are platform recommendations, not a promise that a given VPS can sustain them. Consult the current codec-specific table before selecting a format, and use a lower target if your measured connection cannot carry the chosen feed reliably.
YouTube advises leaving 20% upload headroom. Its streaming tips on bandwidth and setup are a useful reference when comparing a measured VPS connection with your output. Do not equate a provider’s advertised maximum port speed with a measured, sustained upload to the YouTube ingest point.
Run FFmpeg at the file’s real-time pace
Install an FFmpeg build suitable for the VPS operating system, upload the media file or make it accessible to the VPS, and confirm the file path. Check the FFmpeg version and available protocols if you encounter an output error. The FFmpeg command-line documentation describes input and output option ordering; options apply to the relevant input or output, so moving them casually can change what the command does.
The -re option reads a file at its native rate rather than allowing FFmpeg to send it as fast as it can be processed. FFmpeg documents it as equivalent to -readrate 1, and notes its usefulness for simulating a live input from a file. Without real-time pacing, a short prerecorded file can be pushed much faster than its intended duration, which is not the continuous live-feed behaviour you want.
Here is an illustrative loop-and-encode template:
ffmpeg -re -stream_loop -1 -i /path/video.mp4 \\
-c:v libx264 -preset veryfast -b:v 4500k -maxrate 4500k -bufsize 9000k \\
-r 30 -g 60 -c:a aac -b:a 128k -ar 44100 \\
-f flv 'rtmps://INGEST_HOST/APP/STREAM_KEY'
Replace the path and destination with values for your own file and the exact ingest URL and key shown in Live Control Room. Never publish a working key in a copied command. The bitrate in this example is illustrative only, not a universal recommendation: choose bitrate, resolution and frame rate from YouTube’s current table and your measured sustained upload. The command also forces H.264 and AAC output, so it uses CPU for video encoding rather than simply copying the input.
FFmpeg’s -stream_loop -1 repeats the input indefinitely. Remove that option if you need the event to end with the file, or use a different playlist or scheduling workflow if you want several sources in sequence. A repeated loop restarts the same media; it does not create new content or guarantee a seamless join. Inspect the source’s ending and opening, and make sure the audio does not produce a click, gap or abrupt change at each repeat.
The -g 60 value in the example pairs with a 30 fps output for a two-second keyframe interval. YouTube recommends a two-second interval and says not to exceed four seconds. Match frame rate and keyframe settings intentionally; a command that happens to run is not proof that its output matches the platform’s recommended ingest settings. FFmpeg documents RTMP and RTMPS output in its protocol reference.
If the source already uses a supported codec, resolution and frame rate, stream copying may avoid the expense of transcoding, but the output still needs to meet the ingest requirements. Do not substitute -c copy blindly: incompatible codecs or timing can produce a feed YouTube rejects or plays incorrectly. A useful companion is the FFmpeg settings guide for a 24/7 1080p YouTube stream, but check its examples against the current YouTube table and your own file.
Test the preview and stream health
Start with a short unlisted test before using a public event. Launch FFmpeg and wait for Live Control Room to indicate that it has received the feed. Inspect the preview for the correct image, aspect ratio, frame pacing and audio. A terminal with no immediate error is not enough: the encoder may be connected while the selected file has no audio, the wrong scene, or a blank opening.
Check YouTube’s stream health indicators while the feed runs. If it reports bitrate or connection trouble, lower the output target, check the VPS’s measured outbound capacity and investigate whether another process is using the network. If the image is fine but audio is absent, inspect the file’s audio stream and the FFmpeg mapping rather than repeatedly restarting the same command.
Test long enough to expose the issues relevant to your broadcast. For a planned overnight devotional stream, check the video and sound, verify the repeat point, and observe FFmpeg’s progress and resource use while the test continues. YouTube recommends setting up in advance and monitoring the stream. A short preview confirms the path works now, not that a particular VPS will stay connected throughout a future night.
When you are satisfied, end the test event and encoder cleanly. For a scheduled broadcast that requires a manual start in Live Control Room, remember to perform that control-room step after the feed is ready. YouTube says streams under 12 hours are automatically archived; do not assume an event exceeding that duration will be archived in the same way. Consider the archive behaviour when planning a long loop and check the current YouTube guidance.
For a feed assembled from multiple prerecorded files, plan the sequence separately from the encoder. The filename organisation guide for automatic YouTube Live playlist scheduling covers a different workflow, but illustrates why source order and file management should be settled before the event rather than improvised after it begins.
Plan for traffic, failures and restarts
A continuous stream sends data for as long as it runs. Estimate transfer from the chosen video and audio bitrates and planned run duration, then compare that estimate with the current traffic allowance and overage terms shown by Contabo. The exact billing treatment can change, so verify it on the provider’s current site rather than relying on a forum post or an old plan screenshot.
Then measure the actual VPS upload to the destination region or service you intend to use. Repeat the check at realistic times and watch whether the transfer rate remains above the combined stream bitrate with YouTube’s recommended headroom. A result from your home broadband connection says nothing about the VPS link. If the capacity is uncertain, choose a lower output resolution or bitrate and test again before committing to a long event.
A VPS can restart after maintenance, a process can exit, or the route to YouTube can drop. Decide what should happen on failure before the channel goes live: who will notice, who can restart the encoder, and whether the event can resume with the same stream configuration. YouTube’s preview and health display can reveal delivery problems, but they do not themselves restart your local FFmpeg process.
For repeat operation, arrange a supervised process or a restart policy appropriate to your operating system, and test it by deliberately stopping FFmpeg during an unlisted test. Confirm that the process starts again, that it reads the correct file, that the key remains protected, and that YouTube receives the resumed feed. Avoid assuming a restart mechanism is working simply because it is enabled. If ongoing process supervision and recovery are the work you do not want to manage on a VPS, StreamNeo removes that specific burden by running an uploaded file as a YouTube live stream with monitoring and automatic restart, while leaving you responsible for the channel and content.
Before committing, compare the operating options on the pricing page. When the file and channel are ready, start free — 24-hour trial, no card.
FAQ
Can I stream a video file to YouTube Live without OBS?
Yes. FFmpeg can read a file at real-time speed and publish an encoder feed to the URL and key provided by YouTube, so a graphical encoder such as OBS is not required for this method. You still need to configure and monitor the event in Live Control Room.
Which Contabo VPS plan should I use?
This guide cannot verify a current plan’s sustained upload, CPU capacity, traffic allowance or reliability, so it would be misleading to name a best plan. Compare current provider terms, measure the VPS you receive, and test the exact output settings and file before using it for a long broadcast.
How much upload bandwidth does a 1080p stream need?
There is no single value for every 1080p stream: YouTube’s H.264 recommendations list 14 Mbps for 1080p30 and 17 Mbps for 1080p60. Check the current codec-specific table and leave the 20% headroom YouTube recommends; confirm the VPS can sustain the resulting rate rather than relying on a headline port speed.
Will FFmpeg keep looping if the connection drops?
The -stream_loop -1 option repeats the source file, but it does not by itself supervise FFmpeg or reconnect every kind of failed session. Test your process recovery separately, watch the Live Control Room health display, and verify that a restart can reconnect without exposing the stream key.