You can broadcast a radio-style YouTube Live stream from Ubuntu Server by pairing your audio with a still image or video, encoding both to YouTube’s current live-stream settings, and sending the feed from FFmpeg to the ingest URL and stream key shown in YouTube Studio. The exact command depends on your audio files, visual, Ubuntu release, and FFmpeg build, so verify those before going live.
Before you start
Have these ready:
- An Ubuntu Server host with a reliable upload connection and enough CPU capacity for the selected encoding settings.
- Audio you have the rights to broadcast, plus a still image or looping video to accompany it. The usual YouTube Live encoder workflow expects video as well as audio.
- A YouTube channel eligible for live streaming, with permission to create or manage a stream.
- FFmpeg with the needed input formats, encoders, and RTMP or RTMPS protocol support.
YouTube says live streaming requires a verified channel with no live-streaming restrictions during the previous 90 days. First-time activation can take at least 24 hours after the initial request, so enable it ahead of your planned broadcast. See YouTube’s live-streaming requirements.
Ubuntu releases ship different package versions and FFmpeg builds. The available Ubuntu package documentation cited here covers Bionic and does not establish what a current server release provides. Check the actual host rather than assuming a particular package version or feature set.
Check FFmpeg on the server
Install FFmpeg from a trusted source appropriate to your Ubuntu release, or inspect the existing installation. These commands report the version and list available encoders:
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →#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.
ffmpeg -version
ffmpeg -encoders
Confirm that your build has the codecs and input support needed for your chosen media, as well as RTMP(S) protocol support. FFmpeg’s protocol documentation describes RTMP options and publishing examples. If a required encoder or protocol is missing, use a suitable build before constructing the stream command.
Enable YouTube Live and get the ingest details
- In YouTube Studio, open Go Live to enter Live Control Room.
- Create a stream or select the stream you intend to use.
- Copy the server URL and stream key displayed for that stream. The endpoint and protocol can vary with the selected configuration.
- Use the RTMPS endpoint if the stream configuration and your FFmpeg build support it. RTMPS encrypts transport; RTMP does not.
YouTube treats a stream key like a password. Keep it out of public repositories, shared logs, and published command examples. Avoid exposing it in shell history or process listings; command-line arguments may be visible to other users on the host. If the key is exposed, reset it in Live Control Room and update your server configuration. See YouTube’s guidance on stream keys and encoder setup.
Choose the audio, visual, and encoder settings
Pair audio with a picture
A radio broadcast still needs a video feed for the normal YouTube Live encoder workflow. For a file-based stream, use a suitable still image or a video loop alongside the audio. An audio-only file is not a universal substitute for the video input expected by that workflow.
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.
Decide whether your audio source is one file, a set of tracks, a playlist, or a live input device. The choice affects how inputs are opened, synchronized, and repeated. Likewise, a still image and a moving visual need different handling. Test the actual files and command on your installed FFmpeg version; a single command cannot safely cover arbitrary formats and loop strategies.
Recommended Free Tools
Match YouTube’s recommendations
Use YouTube’s current encoder settings, bitrates, and resolutions page for the output you select. For a conventional SDR starting point, use H.264 video with AAC stereo audio, constant bitrate (CBR), a two-second keyframe interval, and stereo audio at 44.1 kHz and 128 kbps. YouTube supports up to 60 fps. Its recommended video bitrate depends on codec, resolution, and frame rate, so choose the value from its current table for your output rather than applying one number to every stream.
YouTube recommends a two-second keyframe frequency and says it should not exceed four seconds. These are encoder recommendations, not guarantees of picture quality or uninterrupted playback. Check the settings page for any changes before each new configuration.
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.
Allow for network and CPU limits
The configured output bitrate must be sustainable on the server’s upload connection, with room for normal variation. Encoding also consumes CPU or hardware-encoder capacity. YouTube recommends running a speed test to test your upload bitrate. Test using the chosen resolution and representative audio and motion, then watch stream health and messages in Live Control Room.
Build and test the FFmpeg output
Conceptually, a file-based FFmpeg command combines the audio and visual inputs, real-time pacing for file playback, video and audio encoding options, and the YouTube ingest URL plus stream key. FFmpeg documents -re for real-time input pacing and shows RTMP publishing examples using FLV output. The appropriate loop options, synchronization, filters, codecs, and output syntax depend on your source media and FFmpeg build; validate them on the actual server instead of pasting a generic command and assuming it will work.
Do not put a real stream key in a public example. Keep it in a protected configuration or secret-handling mechanism suitable for your server account, and restrict access to that configuration.
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
- Start with a representative short test using the actual audio and visual sources.
- Where appropriate, use a private or unlisted test stream while checking setup.
- Confirm in Live Control Room that YouTube receives the feed, the picture has the intended dimensions and motion, and audio is present and synchronized.
- Check stream-health messages and verify the server’s upload connection remains stable at the selected bitrate.
- Monitor playback and the encoder during the test; correct warnings before using the setup for a scheduled broadcast.
YouTube recommends making tests resemble the intended stream. Lower latency can increase playback buffering, so a radio broadcast that does not depend on real-time interaction can favor stable delivery over the lowest latency setting.
Keep a long-running stream manageable
For an extended broadcast, run FFmpeg under an appropriate service manager or process supervisor rather than relying on an interactive shell session. The exact service configuration depends on the Linux account, media paths, secret storage, and playlist approach; no single unit file or restart policy is safe to prescribe for every setup.
- Test what happens when FFmpeg exits and whether your chosen supervisor restarts it as intended.
- Confirm that media files and configuration remain accessible under the service account after reboot.
- Inspect logs for encoder, input, and network errors, and arrange log retention appropriate to your host.
- After a restart or reboot test, verify in Live Control Room that the feed has returned and the stream is healthy.
A restart policy can help recover from a process failure, but it is not a promise of uninterrupted 24/7 uptime. Network outages, unavailable media, invalid keys, and YouTube-side interruptions still require monitoring and, at times, intervention.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Best 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.
Protect music rights and follow YouTube policy
Use only audio and visuals whose rights cover the intended public livestream and its distribution on YouTube. YouTube’s live-stream terms put responsibility for necessary rights—including music licensing—on the person providing the live content. Read the YouTube Terms of Service and confirm the permissions relevant to your recordings, compositions, performances, and territory.
YouTube scans live streams for third-party matches. A detected match can trigger a warning, replacement of the live image, interruption, or termination. YouTube also says licensed music may still be interrupted if the rights holder has not added the channel to its Content ID allowlist. Owning a recording or having a personal-use music subscription does not by itself establish permission to rebroadcast it.
Troubleshoot common setup problems
| Symptom | Likely checks and fixes |
|---|---|
| YouTube does not receive a stream | Confirm Live streaming is enabled, the correct stream is selected, and the server URL and key match the values currently shown in Live Control Room. Check that FFmpeg supports the selected RTMP or RTMPS protocol and that the server can reach the endpoint. |
| FFmpeg reports an unknown encoder or protocol | Inspect ffmpeg -encoders and the version/build details. Install or select a trusted build with the required encoder and RTMP(S) support; package capabilities vary by Ubuntu release and build. |
| Stream connects but has no picture | Check that the command supplies a valid video source in addition to audio, and that the selected video encoder and output settings are accepted. Test the still or loop as a local input before publishing. |
| Picture is present but audio is missing or out of sync | Verify the audio input path and codec, confirm the intended audio stream is mapped, and test synchronization using the real source files. File formats and input durations affect the correct command options. |
| Live Control Room shows health warnings or playback buffers | Compare actual upload capacity with the configured bitrate, leave headroom, and check that CPU or hardware encoding is keeping pace. Revisit YouTube’s bitrate table for the selected codec, resolution, and frame rate; if interaction is not essential, avoid prioritizing the lowest latency over stability. |
| The stream stops after a rights warning | Review the audio and visual rights for livestream use. If music is licensed, ask the rights holder whether the channel needs a Content ID allowlist entry; a general license does not guarantee that automated detection will not interrupt a stream. |
| The stream key may have been exposed | Reset the key in Live Control Room, update the protected server configuration, and restart the encoder with the new key. |
Or let it run in the cloud
If you do not want to maintain an Ubuntu host and FFmpeg process, StreamNeo is a cloud service for keeping a YouTube channel live from uploaded videos. Upload a recording or build a playlist, add your YouTube stream key once, and go live. It loops the uploaded video from the cloud, so your computer and home connection do not have to stay on. It plays uploaded videos rather than broadcasting a camera feed, and streams to YouTube only.
- Each slot runs one always-on stream, with 24/7 looping and playlists.
- Videos stream as uploaded, up to 4K 60fps, with no re-encode and one flat price per slot for any quality.
- Automatic recovery is included if YouTube drops the stream.
- Every slot includes 10 GB of storage, pooled across active slots, and support from the StreamNeo team.
The first day is free with no card required, one free day per account. The same product is included on every plan; only the billing length changes. Monthly billing is $9.99 per month. See StreamNeo for plan details. To start, create a StreamNeo account.
Windows 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 reinstallOutdated 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 matchEstimate upload time and compare operating costs
For a large media library, estimate how long uploads may take with the upload-time calculator. To compare a cloud workflow with maintaining a PC-based stream, use the cloud vs PC cost calculator. Before streaming music, review the copyright safety checklist; it is a planning aid, not a substitute for confirming your rights.
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.




