October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
Mountain View desk6 min

How to Install FFmpeg on Debian for a 24/7 YouTube Stream

A practical Debian guide to installing FFmpeg, matching YouTube Live encoder settings, and keeping a stream supervised for unattended operation.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Install Debian’s packaged FFmpeg with APT, verify the tools, then configure and supervise an FFmpeg process that sends a compatible feed to YouTube Live. Installation alone does not make a stream 24/7: the input, encoder, upload connection, stream key, and YouTube ingest all need to work, and the process needs supervision if it is to recover after a failure or reboot.

Install FFmpeg from Debian’s repositories

On a standard Debian system, use the package from your configured Debian repositories:

As an Amazon Associate I earn from qualifying purchases.

  1. sudo apt update
  2. sudo apt install ffmpeg
  3. ffmpeg -version
  4. ffprobe -version

The version commands confirm that the programs are available and show build information. Debian’s package includes FFmpeg tools such as ffmpeg, ffplay, ffprobe, and qt-faststart. Debian’s FFmpeg wiki documents the repository installation route, and the Debian package listing describes the package.

Free tools Windows power users keep installed

One-click scans. No signup required.

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

Package versions vary by Debian release. When checked on October 3, 2026, the listing showed 7:7.1.5-0+deb13u1 for trixie and 7:5.1.9-0+deb12u1 for bookworm. These are point-in-time listings, not versions to expect on every machine; check your release and installed package instead of copying them blindly.

#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)

Check whether your build has the encoder you need

FFmpeg’s available encoders depend on the package build and system. If a command reports that an encoder is unavailable, inspect the build and its encoder list before changing repositories or compiling:

  • ffmpeg -version shows build details.
  • ffmpeg -encoders lists encoders available in that build.

Do not assume that every Debian build includes every codec or enables a particular hardware-acceleration path.

Choose YouTube’s ingest protocol and output settings

Use YouTube Live’s current encoder guidance for the stream mode you intend to use, then match the FFmpeg output to that mode and the encoders available on your Debian system. YouTube recommends RTMPS, the secure extension of RTMP, for encoder contribution. It lists H.264, H.265/HEVC, and AV1 video options for RTMP/RTMPS, AAC or MP3 audio, constant bitrate (CBR), frame rates up to 60 fps, and a two-second keyframe interval that should not exceed four seconds. See YouTube’s encoder settings for its current guidance.

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

For ordinary SDR, YouTube recommends Rec. 709 color and 8-bit depth; HDR has separate requirements. Don’t apply an SDR setting blindly to an HDR workflow. Select the resolution, frame rate, codec, bitrate, and color settings as a compatible set, rather than treating one example command as universal.

Set bitrate for the chosen codec and mode

YouTube’s published bitrate recommendations vary by codec and resolution/frame-rate mode. For H.264, the current guidance gives these examples:

H.264 output mode YouTube minimum YouTube recommended bitrate
720p at 30 fps 3 Mbps 8 Mbps
1080p at 30 fps 5 Mbps 14 Mbps
1080p at 60 fps 6 Mbps 17 Mbps
4K at 30 fps 11 Mbps 42 Mbps

These are YouTube-published settings, not a guarantee of quality on your particular connection. AV1 and H.265 recommendations differ, so don’t carry an H.264 figure over to those codecs. Allow upload headroom above the chosen stream bitrate so ordinary network variation does not consume the whole connection. YouTube advises testing with audio and video movement similar to the actual stream and watching stream health and status messages.

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)

RTMPS or HLS

RTMPS is the direct fit for a low-latency continuous contribution when supported by the chosen YouTube Live workflow. YouTube notes that HLS has higher latency than RTMP because HLS sends segments rather than one continuous stream. HLS can still be appropriate when its workflow and latency suit the use case; choose based on YouTube’s current mode-specific instructions, not protocol name alone.

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

Prepare the YouTube stream and FFmpeg command

Create or open the live event in YouTube Studio, select the encoder workflow and ingest settings it provides, and use the stream key associated with that event. Keep the key secret: do not put it in a public script or repository, screenshot, or shared command history. If it is exposed, rotate it in YouTube Studio.

Build the FFmpeg command around your actual input and selected output settings. For a file input, the general shape is:

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

ffmpeg -re -stream_loop -1 -i /path/to/video.mp4 -c:v libx264 -preset veryfast -b:v 8M -maxrate 8M -bufsize 16M -r 30 -g 60 -keyint_min 60 -sc_threshold 0 -c:a aac -b:a 128k -f flv "rtmps://INGEST-URL/STREAM-KEY"

This is an illustrative H.264/AAC file-loop example for 720p30-style bitrate and keyframe assumptions, not a command guaranteed to fit every YouTube event or Debian build. Replace the input path and ingest URL/key with the values for your setup. The example’s two-second GOP is calculated from 30 frames per second; if you change frame rate, adjust keyframe settings so the interval remains about two seconds. Confirm that libx264 is listed by ffmpeg -encoders. If the source file has different dimensions or frame rate, decide whether to preserve or scale it and set output options deliberately. For live capture or another input type, use the input options appropriate to that source. YouTube’s current ingest settings and the capabilities of your installed build take precedence over this example.

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

The -re option reads a file at its native rate rather than sending it as fast as possible; -stream_loop -1 repeats the file indefinitely. A looping file can produce a continuous feed, but it does not by itself establish that the content is eligible for monetization or complies with YouTube policies. Use media you have rights to stream, and review YouTube’s monetization policies and applicable copyright rules. Repetition or permission to broadcast does not guarantee monetization approval; YouTube evaluates channel content under its policies.

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
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Make the stream unattended and recoverable

A command running in an interactive terminal ends if that shell or host stops. For unattended operation, run FFmpeg under a service manager such as systemd, configure a restart policy, send logs somewhere an operator checks, and enable the service to start with the host. Protect the stream key if it is stored in a service configuration: restrict access and avoid putting it in a public or broadly readable file.

A restart policy only restarts the process. It cannot fix a missing input file, expired or invalid key, inadequate sustained upload, unsupported encoder settings, or a YouTube-side stream-health problem. Before relying on a 24/7 setup, test the complete path and a controlled restart:

  • Confirm the input plays and contains the expected audio and video.
  • Check that encoding can run continuously without exhausting CPU or other system resources.
  • Verify sustained upload capacity with headroom at the selected bitrate.
  • Confirm YouTube receives the stream and reports healthy status.
  • Stop and restart the FFmpeg process deliberately, then verify that supervision brings it back and YouTube receives it again.
  • Check logs and YouTube status messages during both normal operation and recovery.

Troubleshoot common failures

Symptom Likely cause What to check
ffmpeg: command not found Package is not installed or the executable is not on the expected path. Run sudo apt update and sudo apt install ffmpeg, then check ffmpeg -version.
Unknown or unavailable encoder The installed Debian build does not provide the selected encoder. Inspect ffmpeg -version and ffmpeg -encoders; choose an encoder the build lists.
YouTube does not accept the feed Wrong event key or ingest URL, an incompatible output configuration, or a YouTube-side issue. Recheck the event’s current ingest details, key, codec and mode requirements, then read YouTube’s stream-health messages.
Stream disconnects or health warnings appear Upload instability, insufficient headroom, host load, or a YouTube-side problem. Compare sustained upload with the selected bitrate, observe host load, and inspect YouTube’s status messages during a representative test.
Process stops and stays stopped No supervision or restart policy, or a persistent failure such as a missing input or invalid key. Check service status and logs; fix the underlying error before relying on automatic restarts.
Video or audio is missing or wrong Unexpected input streams, mapping, or output configuration. Inspect the file with ffprobe, verify audio/video presence, and test playback and ingest before unattended use.

Or let it run in the cloud

If you want a YouTube channel to keep playing uploaded videos without leaving a Debian computer, spare PC, or home connection running, StreamNeo runs the stream in the cloud. Upload a recording or build a playlist, add your YouTube stream key once, and go live. It loops uploaded video; it does not stream a camera feed.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Nothing at home has to stay on.
  • Uploaded video streams as made, up to 4K 60fps, at one flat price per slot with no re-encoding or quality tiers.
  • It automatically recovers if YouTube drops the stream.
  • The first day is free with no card, once per account.

Monthly pricing is $9.99 per month. Start the free day by creating a StreamNeo account.

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)
$139.99

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.