Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

On an Ubuntu VPS, install FFmpeg from Ubuntu’s repositories with sudo apt update and sudo apt install ffmpeg, then verify it with ffmpeg -version. To stream to YouTube Live, use the current ingestion address and stream key for your specific broadcast; for a conventional H.264 stream, RTMPS is a secure, low-latency option.

Before you install FFmpeg

Connect to your Contabo VPS over SSH using an account that can run commands with sudo. The steps below apply to Ubuntu; the exact package version depends on the Ubuntu release and subsequent updates. The Ubuntu package index lists FFmpeg for Ubuntu 22.04 LTS and 24.04 LTS in the Universe component. Ubuntu Packages lists package information by release.

To confirm the operating system if you are unsure which image was installed, run:

lsb_release -a

Alternatively, inspect /etc/os-release. Contabo’s available image and the Ubuntu version selected for your VPS determine which release-specific package you receive.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#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)

Install FFmpeg from Ubuntu’s repositories

  1. Refresh apt’s package metadata:

    sudo apt update
  2. Install FFmpeg:

    sudo apt install ffmpeg
  3. Verify the executable and inspect its build information:

    ffmpeg -version

For reference, Ubuntu Packages lists FFmpeg version 7:4.4.2-0ubuntu0.22.04.1 for Ubuntu 22.04 LTS Jammy and 7:6.1.1-3ubuntu5 for Ubuntu 24.04 LTS Noble in retrieved package data. These are release-specific examples, not a guarantee of the version your VPS will install: updates and system architecture can affect the package resolved by apt. Check your own output from ffmpeg -version.

If apt cannot find the package

Confirm the Ubuntu release and check that its usual repositories, including the Universe component, are enabled. Do not add an arbitrary PPA as the first troubleshooting step. Package availability and version are tied to the configured Ubuntu repositories.

Rank #2
Raspberry SC15184 Pi 4 Model B 2019 Quad Core 64 Bit WiFi Bluetooth (2GB)
  • 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

Get the right YouTube Live connection details

YouTube provides an ingestion address and stream name/key for a particular stream. Copy the active values from YouTube Studio or the relevant YouTube Live API response rather than relying on a hard-coded address or key. Some encoders ask for the server URL and stream name separately; others use a combined address in the form STREAM_URL/STREAM_NAME. YouTube’s LiveStreams API documentation describes the stream’s ingestion information.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Keep the stream key private. Treat it as a credential: do not put a real key in public scripts, screenshots, shared examples, or logs.
  • Use the format expected by your command or encoder. If it has separate server and key fields, use them separately; if it expects a combined URL, use the exact stream-specific values supplied by YouTube.
  • Check that the stream is configured and active in YouTube Studio. A generic command cannot supply the stream-specific settings for your channel.

Use RTMPS for a conventional FFmpeg stream

YouTube documents RTMPS as a secure option for ordinary low-latency contribution. RTMPS requires an rtmps URL, TLS on port 443, and the correct ingestion hostname sent through TLS Server Name Indication (SNI). Sending cleartext RTMP to an RTMPS endpoint can cause connection timeouts. See YouTube’s RTMPS ingestion requirements.

This is a starting template, not a tested Contabo command. Replace every capitalized placeholder with the actual input, encoding settings, and current YouTube stream values. Confirm that your installed FFmpeg build includes the required encoder and protocol support.

Rank #3
Raspberry Pi 4 Model B (2GB)
  • 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)
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'

The -re option reads a file at its native rate rather than sending it as fast as possible. Choose video and audio bitrates appropriate to your source and intended stream; this template does not establish a particular resolution, bitrate, or Contabo VPS capacity. The Ubuntu FFmpeg manual documents FFmpeg command syntax and output formats: Ubuntu’s FFmpeg manual page.

Protocol trade-offs

YouTube’s protocol comparison describes the following broad differences. Do not reuse the FLV/RTMP-style command unchanged for HLS or DASH; those protocols require different delivery and encoding setups. YouTube’s ingestion protocol comparison provides the protocol-specific details.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Protocol Encryption Codec support Latency and setup
RTMP Not encrypted H.264 Supports YouTube’s listed low, normal, or ultra-low latency options; conventional encoder workflow.
RTMPS Encrypted with TLS H.264 Supports the listed latency options; requires the secure endpoint, port 443, and correct SNI hostname.
HLS Encrypted Supports additional codecs, including HEVC as listed by YouTube Segment-based delivery generally has higher latency and different requirements than a basic RTMP-style stream.
DASH Encrypted Supports additional codecs, including VP9 as listed by YouTube Segment-based delivery generally has higher latency and different requirements than a basic RTMP-style stream.

Check VPS capacity against the actual workload

Installing FFmpeg does not establish that a VPS can encode and deliver a particular stream reliably. The sources cited here do not establish current Contabo plan specifications, CPU performance, outbound bandwidth, prices, or tested stream limits. Check the current specifications for the VPS plan you choose and test with your actual input, encoding settings, and expected continuous workload. Do not assume a plan supports a particular resolution, bitrate, or 24/7 stream solely because FFmpeg installed successfully.

Rank #4
Vilros Raspberry Pi 4 Complete Starter Kit- Includes Raspberry Pi 4 Board, Fan Cooled Case, 64GB Preloaded Micro SD Card and More (4GB, Clear Transparent Case)
  • 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
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot common installation and connection problems

Unable to locate package ffmpeg

Confirm the Ubuntu release with lsb_release -a or /etc/os-release, run sudo apt update, and check that the normal Ubuntu repositories and Universe are enabled. Avoid adding an unrelated PPA before checking the standard repository configuration.

The stream times out or does not connect

Check that you copied the current stream-specific YouTube ingestion details, used an rtmps:// address, and are connecting over port 443. For TLS, the client must send the ingestion hostname through SNI. YouTube identifies cleartext RTMP sent to an RTMPS endpoint as a possible cause of timeouts.

FFmpeg reports an unsupported encoder or protocol

Inspect ffmpeg -version for build information and verify that the installed build supports the encoder and protocol your command requests. The template uses libx264; if that encoder is absent from your build, the command will not work as written.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
CanaKit Raspberry Pi 4 4GB Basic Kit with PiSwitch (4GB RAM)
  • 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

The stream starts but playback or audio is wrong

Check the input file, selected video and audio codecs, and the bitrate values you supplied. Confirm that the command is reading the intended file and that YouTube is receiving the active stream associated with the key you used. Do not share the key while requesting help; redact it from command output and logs.

Or let it run in the cloud

If your goal is a YouTube channel that stays live from uploaded videos, StreamNeo is a different option from maintaining an FFmpeg process on a VPS: upload a recording or make a playlist, add your YouTube stream key once, and go live. StreamNeo loops the uploaded video from the cloud; it does not stream from a camera or send to platforms other than YouTube.

  • Your computer and home internet connection do not need to stay on.
  • Each slot streams the uploaded file as made, up to 4K 60fps, at one flat price per slot rather than quality tiers.
  • It automatically recovers if YouTube drops the stream.
  • The first day is free with no card required (one free day per account).

StreamNeo’s pricing page lists the same product across billing lengths: Daily $0.99 per day · Weekly $2.99 per week · Monthly $9.99 per month · 6 months $49.99 for 6 months · Yearly $89.99 a year. UPI and cards are available in India; card checkout is available worldwide. The first day is free with no card, and the monthly option is $9.99 per month.

Quick Recap

Bestseller No. 1
CanaKit Raspberry Pi 4 4GB Starter PRO Kit - 4GB RAM
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
$159.99
Bestseller No. 2
Raspberry SC15184 Pi 4 Model B 2019 Quad Core 64 Bit WiFi Bluetooth (2GB)
Raspberry SC15184 Pi 4 Model B 2019 Quad Core 64 Bit WiFi Bluetooth (2GB)
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
$92.97
Bestseller No. 3
Raspberry Pi 4 Model B (2GB)
Raspberry Pi 4 Model B (2GB)
Broadcom BCM2711, Quad core Cortex-A72 (ARM v8) 64-bit SoC @ 1.5GHz; 1GB, 2GB, 4GB or 8GB LPDDR4-3200 SDRAM (depending on model)
$83.00
Bestseller No. 5
CanaKit Raspberry Pi 4 4GB Basic Kit with PiSwitch (4GB RAM)
CanaKit Raspberry Pi 4 4GB Basic Kit with PiSwitch (4GB RAM)
Includes Raspberry Pi 4 4GB Model B with 1.5GHz 64-bit quad-core CPU (4GB RAM); CanaKit USB-C PiSwitch (On/Off Power Switch)
$124.99

See StreamNeo, or start your free 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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.