Install FFmpeg from Ubuntu’s APT repositories with sudo apt update and sudo apt install ffmpeg, then check it with ffmpeg -version. To stream to YouTube, you also need a live stream’s server URL and stream key from YouTube Studio, plus settings that match your video, upload connection, and YouTube’s current live encoder guidance.
Install FFmpeg from Ubuntu’s repositories
Ubuntu packages FFmpeg through APT. The available version depends on your Ubuntu release: Ubuntu’s package index listed FFmpeg 4.4.2 for Ubuntu 22.04 LTS (Jammy) and 6.1.1 for Ubuntu 24.04 LTS (Noble), as reviewed in 2026. These examples do not establish the version for every Ubuntu release or derivative.
- Check which Ubuntu release you are using: run
lsb_release -aor inspect/etc/os-release. If you need an exact package version, look up the package record for that release in Ubuntu’s package index. - Refresh APT’s package index: run
sudo apt update. - Install FFmpeg: run
sudo apt install ffmpegand approve the package changes when prompted. - Check the installed binary: run
ffmpeg -version. The output includes the FFmpeg version and build configuration.
This is the standard repository-based installation sequence, not a command sequence tested on your machine. Ubuntu lists FFmpeg in the Universe repository. If APT says it cannot locate the package, confirm your release and configured repositories, including whether Universe is enabled. Check that release’s repository metadata before turning to a third-party PPA or a standalone binary.
Prepare a YouTube Live stream
Installing FFmpeg does not create a YouTube broadcast by itself. You need a live stream in YouTube Studio and its current server URL and stream key. YouTube’s interface can differ depending on whether the channel has streamed before.
Recommended Free Tools
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
- In YouTube Studio, create or select the live stream in Live Control Room.
- Copy the server URL and stream key shown for that stream. YouTube may show an ordinary RTMP URL by default; select or copy the RTMPS URL if available and supported by your FFmpeg build.
- Keep the key private. Treat it like a password: do not put a real key in a public command example, publish it in a chat or repository, or include it in logs you share.
- Configure FFmpeg with the source, video and audio settings, and the URL and key. Start sending the stream, then check YouTube’s preview and stream health. Go live in YouTube when the stream is ready or when the scheduled workflow calls for it.
YouTube recommends RTMPS, which carries RTMP over TLS/SSL. Use the endpoint shown in Live Control Room rather than assuming a fixed URL; see YouTube’s RTMPS guidance and its live encoder settings.
Send a file to a generic RTMP server
Ubuntu’s FFmpeg manual gives this general form for reading a file in real time and sending it as FLV to an RTMP server:
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
ffmpeg -re -i myfile -f flv rtmp://myserver/live/mystream
This is a generic RTMP example, not a verified YouTube command and not an RTMPS example. Its placeholders are not a usable endpoint. For YouTube, use the server URL and key displayed for your stream in Live Control Room, and consult the Ubuntu FFmpeg manual for the generic RTMP form. The command structure and flags needed for a complete YouTube command depend on your input and installed FFmpeg build; do not assume this generic example has been tested end to end against YouTube.
Choose live encoder settings
YouTube’s live guidance is distinct from its recommendations for uploading a finished video. Its live encoder guidance, accessed in 2026, lists RTMP/RTMPS, H.264, H.265 (HEVC) and AV1 video codecs, AAC or MP3 audio for RTMP/RTMPS, frame rates up to 60 fps, and constant bitrate (CBR) encoding. Confirm that the protocol and codec you choose are supported by both your installed FFmpeg build and the selected YouTube ingest workflow.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
| Setting | YouTube guidance | How to apply it |
|---|---|---|
| H.264 video bitrate | 10 Mbps for 1080p at 30 fps; 12 Mbps for 1080p at 60 fps. YouTube live encoder recommendations, accessed 2026. | Choose the row that matches your target format, and make sure your sustained upload connection can carry the stream reliably. |
| Keyframe interval | 2 seconds recommended; do not exceed 4 seconds. YouTube live encoder guidance, accessed 2026. | Set the encoder’s keyframe frequency to match the live guidance for your stream. |
| Stereo audio bitrate | 128 Kbps recommended. YouTube live encoder guidance, accessed 2026. | Use as a starting point for stereo audio, provided the selected audio codec and input support it. |
| Stereo audio sample rate | 44.1 kHz recommended. YouTube live encoder guidance, accessed 2026. | Check the audio properties of your source and the settings accepted by your encoder. |
These are YouTube’s published recommendations, not a guarantee that your computer, FFmpeg build, source or internet connection can sustain the chosen stream. The bitrate figures above are for H.264 at the specified formats; consult YouTube’s current live encoder settings for guidance by codec, resolution and frame rate. Test the actual source and upload path before an event. YouTube’s guidance says: “Make sure to test before you start your live stream.”
Match the format to your source and connection
- Choose a resolution and frame rate your source can provide consistently; a higher target is not useful if the source or encoder cannot sustain it.
- Choose a codec supported by the ingest protocol and by your installed FFmpeg build. A list of codecs supported by YouTube does not establish that your particular FFmpeg binary has each encoder enabled.
- Use constant bitrate as YouTube recommends, and select a bitrate appropriate to the chosen codec and video format.
- Test sustained upload capacity with representative motion and audio. Leave headroom rather than setting a bitrate that saturates an unstable connection.
- Prefer RTMPS where your workflow supports it, and protect the stream key.
Test and monitor before and during the broadcast
Run a private or otherwise appropriate test using the same input, encoder settings, network and destination workflow planned for the broadcast. Check YouTube’s preview before going live, and watch stream health during the event. A file with little motion may not reveal the same problems as representative gameplay or other fast-moving content; test the material you actually intend to send.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Troubleshoot common setup problems
| Symptom | What to check | Next step |
|---|---|---|
apt cannot locate the ffmpeg package |
Ubuntu release and configured repositories, particularly Universe. | Refresh the package index with sudo apt update and verify the repositories and package record for that release before using another distribution channel. |
ffmpeg -version reports an unexpected version |
The Ubuntu release and repository version available for it. | Compare against the package record for your release; Jammy and Noble have different FFmpeg versions in Ubuntu’s package index. |
| YouTube does not show an incoming preview | That you copied the server URL and key for the intended stream, selected a supported endpoint, and started the encoder. | Copy the current values again from Live Control Room, keep the key private, and inspect FFmpeg’s output for connection or input errors. |
| Stream health reports instability or dropped frames | Sustained upload capacity, selected bitrate, encoder load, and whether the source can be processed at the chosen resolution and frame rate. | Test again with a lower sustainable target or less demanding format, then monitor the preview and stream health before going live. |
| Video arrives but audio is absent or unsuitable | Whether the input contains an audio stream, the selected audio codec, and the audio bitrate and sample rate. | Inspect the input and FFmpeg build, then test with audio settings supported by the chosen ingest workflow. |
Account for the source and the streaming machine
Streaming a file does not inherently require buying hardware. If your source is an external HDMI device rather than a file or software-captured feed, capture hardware may be needed to bring that signal into the computer; it is conditional, not a prerequisite for installing FFmpeg. A Linux VPS or other cloud computer is another possible way to run an encoder remotely, but it is not required for this setup.
Or let it run in the cloud
If your goal is to keep a prerecorded YouTube stream running without leaving an Ubuntu computer on, StreamNeo is a cloud option: upload a recording or build a playlist, add your YouTube stream key once, and go live. It loops uploaded videos to YouTube; it does not stream from a camera.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallBest Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
- Nothing has to stay on at home: StreamNeo runs the loop in the cloud, so your computer and home connection do not have to remain on.
- Every slot streams the video as uploaded, up to 4K 60fps, at one flat price per slot, without re-encoding or quality tiers.
- It automatically recovers if YouTube drops the stream.
- The first day is free, with no card required; this is one free day per account.
The monthly option is $9.99 per month. The service is for YouTube streams of uploaded videos, not camera broadcasts. Start your free day with StreamNeo.
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.




