On an Ubuntu VPS, install FFmpeg with sudo apt update and sudo apt install ffmpeg, then verify it with ffmpeg -version. The package comes from Ubuntu’s repositories, so its version depends on the Ubuntu release and available updates. Once installed, you can use FFmpeg to send a video to YouTube Live, provided you use the stream-specific ingest details from YouTube and configure a secure RTMPS connection correctly.
Before you install FFmpeg
Connect to your Contabo VPS over SSH using an Ubuntu account that can run commands with sudo. Contabo’s selected image determines the Ubuntu release; check it before troubleshooting package availability or looking for release-specific package details:
As an Amazon Associate I earn from qualifying purchases.
lsb_release -a
If that command is unavailable, inspect:
cat /etc/os-release
Ubuntu’s package index lists FFmpeg for Ubuntu 22.04 LTS and 24.04 LTS. The retrieved package data shows 7:4.4.2-0ubuntu0.22.04.1 for Jammy and 7:6.1.1-3ubuntu5 for Noble; these are examples, not guaranteed versions for every machine, since updates and architecture can affect what apt installs. See Ubuntu Packages.
Recommended Free Tools
Install and verify FFmpeg
-
Refresh apt’s local package metadata:
sudo apt update -
Install the Ubuntu package:
sudo apt install ffmpeg -
Confirm that the executable is available and inspect its build information:
#1 Best Overall
CanaKit Raspberry Pi 4 4GB Starter PRO Kit - 4GB RAM- 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 -version
Ubuntu lists FFmpeg in the Universe component. If apt reports that it cannot locate the package, confirm the installed Ubuntu release and that the usual Ubuntu repositories are enabled before considering other installation sources. Avoid adding an arbitrary PPA as the first troubleshooting step. Package availability and versions are documented at Ubuntu Packages and FFmpeg’s download page.
Get the right YouTube Live ingest details
YouTube’s ingest address and stream name/key belong to a specific stream. Copy the current values from YouTube Studio or the YouTube LiveStreams API; do not rely on an example URL or key from a tutorial. The API provides ingestion information for a stream, including its ingestion address and stream name: YouTube LiveStreams API.
- Ingest URL: the server address YouTube supplies for the stream.
- Stream name/key: the credential that identifies the stream. Keep it private; do not include it in public scripts, screenshots, or logs.
Some encoders accept the server URL and stream name separately. Others expect a combined destination in the form STREAM_URL/STREAM_NAME. Follow the format required by the encoder and the current values shown for your YouTube stream.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #2
- 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
Use RTMPS for a conventional FFmpeg stream
For a conventional H.264 stream with low latency, RTMPS is a practical RTMP-style option. YouTube requires an rtmps URL for this secure connection, TLS to the ingestion server on port 443, and the correct hostname supplied through TLS SNI. Sending cleartext RTMP to an RTMPS endpoint can cause timeouts. See YouTube’s RTMPS ingestion guidance.
The command below is a starting template, not a tested Contabo-specific command. Replace every capitalized placeholder with values that fit your input and active YouTube stream. Confirm that your FFmpeg build supports the selected encoder and protocol. The output uses the FLV muxer for the RTMP-style destination:
ffmpeg -re -i INPUT_FILE
-c:v libx264 -preset veryfast -b:v VIDEO_BITRATE
-c:a aac -b:a AUDIO_BITRATE
-f flv 'rtmps://YOUTUBE_INGEST_HOST/YOUTUBE_APP/YOUR_STREAM_KEY'
For example, the URL shape is rtmps://YOUTUBE_INGEST_HOST/YOUTUBE_APP/YOUR_STREAM_KEY; the host, application path, and key must match the ingest information YouTube gives you. FFmpeg’s Ubuntu manual documents RTMP publishing syntax: Ubuntu FFmpeg manual.
Rank #3
- Broadcom BCM2711, Quad core Cortex-A72 (ARM v8) 64-bit SoC @ 1.5GHz
- 1GB, 2GB, 4GB or 8GB LPDDR4-3200 SDRAM (depending on model)
- 2.4 GHz and 5.0 GHz IEEE 802.11ac wireless, Bluetooth 5.0, BLE Gigabit Ethernet
- 2 USB 3.0 ports; 2 USB 2.0 ports.
- Raspberry Pi standard 40 pin GPIO header (fully backwards compatible with previous boards)
Choose encoding values for your source and VPS
INPUT_FILE is the local path to the video file on the VPS. -re reads a file at its native rate rather than sending it as fast as possible. VIDEO_BITRATE and AUDIO_BITRATE are values you must choose for your stream and available resources; this template does not prescribe a resolution, bitrate, or performance limit for any Contabo plan. Check current VPS specifications and test the actual encoding workload before relying on a particular configuration.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11The command uses H.264 video via libx264 and AAC audio. If FFmpeg says an encoder is unavailable, inspect the build information from ffmpeg -version and verify that the selected build includes the required encoder. Do not assume a plan can encode a given resolution or run continuously without checking its current specifications and the workload.
RTMPS, HLS, and DASH: what changes
YouTube lists RTMP and RTMPS for H.264 and typical low, normal, or ultra-low latency. RTMPS encrypts the contribution stream. HLS and DASH are encrypted options with support for additional codecs, including HEVC or VP9 as specified in YouTube’s comparison, but segment-based delivery generally adds latency and requires a different setup. A basic FLV/RTMP command should not be reused unchanged for HLS or DASH. See YouTube’s encoder and streaming protocol comparison.
Rank #4
- Vilros Complete Starter Kit for Pi 4 Includes Raspberry Pi 4 Model B Board and all the accessories you need to get started.
- 9-PART KIT WILL HAVE YOU READY TO GET UP AND RUNNING: Kit Includes 1. Raspberry Pi 4 Model B Board 2. Case With Easy to connect Built-in fan 3. 64GB Micro SD card Preloaded with RP OS 4. Vilros Pi 4 Compatible Power Supply with Inline on/off switch (power supply color may vary white/black) 5. Micro HDMI to Standard HDMI cable (5ft) 6. Micro SD to USB adapter to reflash card if desired 7. Neoprene Storage Bag to store all parts when not in use 8. Set of 4 Heatsinks 9. Vilros QuickStart Guide instruction booklet for Pi 4
- PASSIVE & ACTIVE COOLING: The included case is well-vented and the kit also includes a set of heatsinks with thermal stickers for easy application and a pre-installed fan to keep the board cool in any use.
- CONVENIENT ACCESSORIES: The power supply features an inline on/off switch neoprene bag that holds and protects all the parts when not in use and the QuickStart guide is updated and written for Raspberry Pi 4.
- IMPORTANT: Kit does NOT include Keyboard, Mouse or Monitor
| Protocol | Encryption | Codec support noted by YouTube | Latency and setup implications |
|---|---|---|---|
| RTMP | Not encrypted | H.264 | Supports typical low, normal, or ultra-low latency; conventional RTMP-style publishing. |
| RTMPS | Encrypted | H.264 | Supports typical low, normal, or ultra-low latency; use TLS, port 443, and the correct SNI hostname. |
| HLS | Encrypted | Includes additional codecs such as HEVC or VP9, as specified by YouTube | Segment-based delivery generally has higher latency and different encoding and delivery requirements. |
| DASH | Encrypted | Includes additional codecs such as HEVC or VP9, as specified by YouTube | Segment-based delivery generally has higher latency and different encoding and delivery requirements. |
Troubleshoot installation and ingest failures
“Unable to locate package ffmpeg”
- Confirm the Ubuntu release with
lsb_release -aorcat /etc/os-release. - Run
sudo apt updateand verify that the usual Ubuntu repositories, including Universe, are enabled. - Check the release’s package listing rather than adding an unrelated PPA immediately.
FFmpeg is installed, but an encoder or protocol is missing
Use ffmpeg -version to inspect build information. Check that the build includes the requested video encoder and protocol support; the presence of the FFmpeg command alone does not prove every optional component is present.
YouTube connection times out
- Confirm the destination uses the
rtmpsscheme, not cleartextrtmp. - Check that the connection uses port 443 and TLS.
- Ensure the TLS client sends the ingestion hostname through SNI.
- Re-copy the current ingest URL and stream name/key from YouTube; do not substitute a generic endpoint or stale key.
YouTube does not receive the stream
Check that the stream name/key belongs to the active YouTube stream and that the destination follows the format expected by your encoder. Do not expose the key while sharing command output or troubleshooting logs.
Or let it run in the cloud
If your goal is a YouTube channel that keeps pre-recorded video live around the clock, StreamNeo avoids maintaining your own VPS encoding process: upload a recording or make a playlist, add your YouTube stream key once, and go live. It loops uploaded video from the cloud, so nothing has to stay on at home. Any quality up to 4K 60fps streams as uploaded at one flat price per slot, with no re-encode or quality tiers; automatic recovery is included if YouTube drops the stream. The first day is free with no card. Monthly: $9.99 per month.
Best Value
- Includes Raspberry Pi 4 4GB Model B with 1.5GHz 64-bit quad-core CPU (4GB RAM)
- CanaKit 3.5A USB-C Power Supply with Noise Filter (UL Listed) specially designed for the Raspberry Pi 4 (5-foot cable)
- CanaKit USB-C PiSwitch (On/Off Power Switch)
- Set of 3 Aluminum Heat Sinks for the Raspberry Pi 4
StreamNeo is for uploaded videos sent to YouTube, not camera-based live broadcasting. Learn more at StreamNeo, or start your free first day.
Frequently Asked Questions
How do I install FFmpeg on my Ubuntu VPS and stream to YouTube Live?
Run sudo apt update, install with sudo apt install ffmpeg, verify with ffmpeg -version, then use the stream-specific YouTube ingest details in an RTMPS publishing command.
Does this guide confirm that a Contabo VPS can stream at 1080p or 4K?
No. VPS plan specifications and tested stream limits are not established here; size the VPS for the actual encoding workload and check current provider specifications.
Quick Recap
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.




