October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
DocumentaryTube
FFmpeg

Best Way to Stream an Online Radio Station to YouTube from Linux

Use FFmpeg on Linux to combine a station’s audio feed with a visual and send it to YouTube Live. Learn the key settings, test procedure, and unattended options.

By DocumentaryTube Team 7 min read
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a straightforward Linux relay, use FFmpeg: read the station’s published audio stream, combine it with a still image or looping visual, encode the result, and send it to YouTube Live. Use Liquidsoap when you need radio-oriented scheduling or processing; choose OBS if you have a desktop session and prefer a graphical setup. The right option depends on the station’s actual feed and how you plan to keep the stream running.

What you need before starting

  • A direct station stream URL. A station’s web-player page may not be the media feed itself. Start with the stream URL or connection details the station publishes, and confirm that your Linux system can access it.
  • A visual source. For the YouTube Live encoder workflow described here, combine the radio audio with a still image or moving visual. This article does not assume that every YouTube product or API accepts audio-only ingest.
  • A YouTube Live stream key and ingest endpoint. Create or select a stream in YouTube Live Control Room and use the endpoint and key displayed there. Keep the key private.
  • Permission to rebroadcast. A feed being publicly accessible does not establish permission to retransmit it. Check the station’s terms and get any rights-holder permission required for its audio and associated artwork.

Choose a Linux workflow

Option Best fit Trade-off to consider
FFmpeg A simple audio relay with a still image or looped visual, controlled from the command line. You need to identify the feed format, choose compatible input and output settings, and manage a long-running process.
Liquidsoap with FFmpeg output Radio-oriented scheduling or more involved audio processing before delivery to YouTube. There is more pipeline configuration to maintain. The Liquidsoap book documents an FFmpeg-output example, but use current YouTube settings for a real stream.
OBS A graphical workflow on a Linux system with an active desktop session. It is less natural for a headless server; configure the audio and visual sources and YouTube destination in the interface.

For a one-feed relay on a headless Linux machine, FFmpeg is usually the simplest starting point. None of these tools is a universal winner: account for reconnect behavior, the need for radio scheduling, whether a desktop is available, and who will monitor and maintain the process.

Set up an FFmpeg relay

1. Confirm the station feed

Use the station’s published media URL and documentation rather than assuming its web-player address is a direct audio stream. Test that URL locally before building the YouTube output. The appropriate FFmpeg input options depend on the feed’s transport and format; the broad FFmpeg protocol documentation describes available network protocols but cannot identify the right options for every station.

2. Prepare a visual

Choose a still image or a video file to accompany the audio. A still is the lightest option; a looped visual provides movement. Use artwork you have permission to broadcast, and check that the image’s dimensions suit your intended output.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • 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.

3. Create the YouTube destination

  1. Open YouTube Live Control Room and create or select the broadcast.
  2. Copy the ingest endpoint and stream key shown for that broadcast. Prefer RTMPS when YouTube offers it.
  3. Keep credentials out of public scripts, repositories, screen recordings, and logs. If a key is exposed, replace it in YouTube rather than continuing to use it.

4. Configure and run FFmpeg

The following is a starting template, not a tested command for every station. Replace the input values and confirm the supported options for your installed FFmpeg build and station feed. Set YOUTUBE_RTMPS_URL to the full RTMPS destination accepted by FFmpeg, including the stream key if that is how the endpoint displayed in Live Control Room is formatted. Treat that value as a secret.

export RADIO_URL='https://station.example/path-to-published-audio-feed'
export VISUAL='station-image.jpg'
export YOUTUBE_RTMPS_URL='PASTE_THE_COMPLETE_RTMPS_DESTINATION_FROM_YOUTUBE_LIVE_CONTROL_ROOM'

ffmpeg 
  -re -i "$RADIO_URL" 
  -loop 1 -framerate 30 -i "$VISUAL" 
  -map 1:v:0 -map 0:a:0 
  -c:v libx264 -pix_fmt yuv420p -r 30 
  -b:v YOUR_VIDEO_BITRATE -minrate YOUR_VIDEO_BITRATE 
  -maxrate YOUR_VIDEO_BITRATE -bufsize YOUR_VIDEO_BUFFER_SIZE 
  -g 60 -keyint_min 60 -sc_threshold 0 
  -c:a aac -b:a 128k -ar 44100 -ac 2 
  -f flv "$YOUTUBE_RTMPS_URL"

Replace the bitrate and buffer placeholders with values appropriate to the selected resolution, frame rate, YouTube’s current recommendations, and your available upstream bandwidth. The example uses 30 fps and a 60-frame GOP to target a two-second keyframe interval; if you change the frame rate, recalculate the GOP so the interval remains two seconds. YouTube recommends CBR, a two-second keyframe interval (not exceeding four seconds), AAC or MP3 audio, and 44.1 kHz / 128 kbps for stereo audio. Its encoder guidance lists H.264, H.265 (HEVC), and AV1 video options and up to 60 fps, but compatibility depends on the encoder and selected protocol. Check YouTube’s current encoder guidance before publishing.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 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.

The command maps the first audio stream from the station input and the video stream from the image input. If the station feed does not expose audio as 0:a:0, or does not play with the shown input form, identify its actual format and adjust the input options and mapping. Do not assume a generic command works for every station.

5. Test before making the broadcast public

  1. Start with a private or otherwise controlled test broadcast.
  2. Confirm that YouTube receives both a visible picture and audible station audio.
  3. Listen for silence, clipping, unexpected gaps, or channel issues; inspect the visual for freezes or unintended content.
  4. Review stream-health messages in Live Control Room and fix any reported encoder or connection problems before sharing the broadcast publicly.

YouTube’s Live Streaming API documentation describes live-stream resources; for this workflow, Live Control Room is where you obtain and monitor the broadcast’s ingest details.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • 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.

RTMPS or HLS?

For the FFmpeg relay above, prefer RTMPS when available: YouTube describes it as the secure extension to RTMP and recommends it for secure ingestion. HLS is a separate ingest workflow with protocol-specific configuration, not a drop-in replacement for the RTMPS destination in the example.

Ingest method What to account for
RTMPS YouTube recommends secure RTMPS ingestion. Use the endpoint and stream key shown for the selected broadcast.
HLS YouTube documents an HTTPS stream URL, MPEG-TS segments of one to four seconds, a rolling playlist with no more than five outstanding segments, and HTTPS POST/PUT. HLS has higher latency because it sends segments; its documented audio codecs include AAC, AC3, and EAC3.

See YouTube’s HLS setup requirements if you specifically need HLS. Check current protocol and encoder compatibility before choosing a codec or copying settings between workflows.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • 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
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Keeping a Linux relay running

A process running in a terminal depends on that session and machine remaining available. For unattended operation, a Linux VPS is one possible deployment, not a requirement. You still need to arrange monitoring and restart behavior, and a remote host is not failure-proof. No particular provider, bandwidth plan, or service level is established here.

With Liquidsoap, the radio pipeline can handle scheduling or processing and pass output through an FFmpeg encoder; the Liquidsoap book illustrates a YouTube RTMP output shape. Treat it as a pipeline example, not a substitute for YouTube’s current transport and codec requirements.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 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.

Troubleshooting common failures

  • YouTube receives no audio: Check that the station URL is the direct media feed, that FFmpeg can read its format, and that the audio stream mapping matches what the input exposes.
  • YouTube receives audio but no picture: Confirm the visual file opens and that the output maps the image input as video. For a still image, ensure the image input is looped so it continues throughout the broadcast.
  • Connection or authentication fails: Recopy the current endpoint and key from Live Control Room, verify that the destination is the RTMPS URL for the selected broadcast, and keep the complete destination private.
  • Stream health reports encoder issues: Compare the chosen codec, frame rate, keyframe interval, audio settings, and output bitrate with YouTube’s current guidance for that protocol. A setting recommended for one ingest method is not automatically valid for every other method.
  • Playback breaks when the station feed changes or drops: Check the station’s feed status and format first. The appropriate reconnect or restart behavior depends on the pipeline and deployment; monitor a long-running process rather than assuming it will recover from every failure.
  • The stream is technically working but cannot be rebroadcast: Stop the broadcast until you have confirmed the necessary permissions for the station audio and visual material.

Or let it run in the cloud

If your goal is an always-on YouTube radio stream but you do not want a Linux machine at home to run the relay, 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 broadcast a live microphone or camera.

  • Nothing has to stay on at home; the stream runs from the cloud.
  • Any quality up to 4K 60fps streams as uploaded at one flat price per slot, with no re-encode or quality tiers.
  • It automatically recovers if YouTube drops the stream.
  • The first day is free with no card, one free day per account.
  • Monthly: $9.99 per month.

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

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 Screening Room

Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

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.