October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
VGSources
FFmpeg

How to Stream an Online Radio Station to YouTube from Linux

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

For a Linux command-line setup, use FFmpeg to read the station’s direct audio stream, add a still image or looped visual, encode the result, and send it to YouTube Live. YouTube’s encoder workflow for this broadcast needs audio and video, so a radio feed alone is not enough. Use the station’s published stream URL, confirm you have permission to rebroadcast it, and take the ingest URL and stream key from YouTube Live Control Room.

What you need before starting

  • A direct audio-stream URL from the station. A webpage containing a player may not be the media stream itself.
  • A still image or video loop to provide the visual component for the YouTube broadcast.
  • A Linux system with FFmpeg installed, network access to the station and YouTube, and enough upstream bandwidth for the selected output.
  • A YouTube channel with access to create a live broadcast, plus its current ingest endpoint and stream key.
  • Permission to retransmit the station’s audio and use the visual asset. Technical access to a feed does not grant rebroadcast rights.

Use the station’s own published stream address or documentation and test that address locally. There is no universal method for extracting a direct feed from every web player; formats, access controls, and URLs vary by station.

Choose the Linux workflow

Option Best fit What to consider
FFmpeg A straightforward relay with a still image or video loop. Command-line control; you must choose suitable input handling, encoding, and a way to supervise a long-running process.
Liquidsoap with FFmpeg Radio-oriented scheduling or more involved audio processing. Liquidsoap can coordinate a radio pipeline and use an FFmpeg encoder. Follow current YouTube transport and codec guidance rather than copying an older example’s settings.
OBS A graphical, interactive setup on a Linux desktop. Configure the audio and visual sources and YouTube destination in the GUI. It is most natural when a desktop session is available and maintained.

There is no universal winner: the right choice depends on whether you need radio scheduling, whether a desktop is available, and how comfortable you are maintaining a long-running service. FFmpeg’s protocol documentation covers network protocols and muxers, while the Liquidsoap book illustrates a radio pipeline using FFmpeg and a YouTube RTMP destination: FFmpeg protocol documentation and Liquidsoap book.

Set up the YouTube broadcast

  1. Open YouTube Studio and go to Create > Go live to open Live Control Room. Create or select a broadcast using the visibility and schedule appropriate for your test.
  2. In the stream setup, copy the currently displayed ingest URL and stream key. Use RTMPS when YouTube offers it; it is YouTube’s recommended secure extension to RTMP. Keep the key private, do not put it in a public script or paste it into a public support request, and regenerate it in YouTube if it is exposed.
  3. Check the current encoder guidance for the protocol and output mode you selected. YouTube lists H.264, H.265 (HEVC), and AV1 video options, up to 60 fps, and recommends CBR with a two-second keyframe interval (not over four seconds). It recommends AAC or MP3 audio, 44.1 kHz for stereo, and 128 kbps for stereo audio. These are YouTube’s general recommendations and supported options, not a guarantee that every codec works with every protocol or encoder.
  4. Choose a resolution and video bitrate using YouTube’s current recommendation for that output mode and the upstream capacity of the Linux host. Do not assume one bitrate suits every resolution, frame rate, or connection.

See YouTube’s encoder guidance for current recommendations and protocol details.

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

Build the FFmpeg relay

The command depends on the station’s actual input format, the visual file, the installed FFmpeg build, and the YouTube ingest details. The FFmpeg protocol reference documents available network protocols, but it cannot establish a ready-made command for an unknown station feed. Treat the following as a command shape, not a copy-and-run recipe: replace each placeholder with a value verified for your setup.

ffmpeg -re -i "STATION_AUDIO_URL" -loop 1 -i "VISUAL_IMAGE_OR_VIDEO" 
  -c:v libx264 -preset veryfast -tune stillimage 
  -r OUTPUT_FRAME_RATE -g KEYFRAME_INTERVAL_IN_FRAMES 
  -b:v VIDEO_BITRATE -minrate VIDEO_BITRATE -maxrate VIDEO_BITRATE -bufsize VIDEO_BUFFER_SIZE 
  -pix_fmt yuv420p -c:a aac -ar 44100 -b:a 128k -ac 2 
  -f flv "RTMPS_INGEST_URL/STREAM_KEY"

This illustrates combining audio and a visual input, encoding video and audio, and sending an FLV-muxed output to an RTMP-family ingest. Verify the station input and output options against your FFmpeg build and the current YouTube protocol guidance before using it. The keyframe interval must correspond to the output frame rate: for example, two seconds means twice the frame rate in frames. The example’s audio settings reflect YouTube’s general stereo recommendation; if the source is mono or has a different channel layout, make an intentional choice rather than assuming stereo content exists.

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.
  • Input: use the actual network URL and any input options required by its format. If the station uses a playlist, Icecast, or another transport, the correct demuxer and options may differ.
  • Visual: a still image can be looped; a video can serve as the visual input. Confirm that the finished broadcast has a valid video signal as well as sound.
  • Video encoding: the command uses H.264 as a common example. YouTube also lists other codecs, but compatibility depends on the ingest protocol and encoder.
  • Rate control: CBR is the recommended mode. Set video bitrate, maximum, minimum, and buffer values consistently for the output you chose; the placeholders must be replaced with appropriate values, not left as text.
  • Destination: use the precise ingest URL and key shown for your broadcast. Do not assume the endpoint format or key is interchangeable between streams.

For a radio schedule or processing chain, Liquidsoap can sit between the source and FFmpeg output. The Liquidsoap book includes an example using an FFmpeg encoder and YouTube RTMP destination; treat it as an illustration of pipeline shape and apply current YouTube codec and transport requirements.

Test before making the stream public

  1. Start with a private or otherwise controlled broadcast and run the relay.
  2. In YouTube Live Control Room, wait for the preview and inspect stream-health messages. Confirm that video appears, not just audio.
  3. Listen to the broadcast. Check for silence, clipping, distortion, unexpected pauses, and an unsuitable source volume.
  4. Watch long enough to catch interrupted input or visual playback. Confirm that the stream remains healthy before changing its visibility.
  5. After the test, stop the relay cleanly if you are not ready to broadcast continuously, and secure the stream key wherever you store it.

The YouTube Live Streaming API documentation describes live-stream resources, but your practical check for this workflow is the health and preview information shown in Live Control Room: YouTube Live Streaming API.

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 a typical FFmpeg relay, RTMPS is the direct starting point when the current YouTube setup provides it and your encoder supports it. HLS is a different ingest workflow, not simply an interchangeable URL: YouTube specifies HTTPS ingestion, MPEG-TS segments lasting one to four seconds, a rolling playlist with no more than five outstanding segments, and HTTPS POST/PUT. HLS also has higher latency because it sends segments. Check YouTube’s current setup requirements before choosing it: YouTube HLS setup.

Consideration RTMPS HLS
Ingest approach Secure RTMP extension recommended by YouTube. HTTPS ingest with segmented MPEG-TS and playlist requirements.
Latency Use the latency setting and behavior available in YouTube Live Control Room; the encoder guidance does not establish a single latency for every setup. Higher latency because the stream is sent in segments.
Configuration burden Requires a compatible encoder and the current RTMPS endpoint and key. Requires HTTPS POST/PUT, one-to-four-second segments, and a rolling playlist of no more than five outstanding segments.

Keep a Linux relay running unattended

A Linux VPS is one possible place to run a continuous relay if you do not want to keep a desktop computer on. It is optional, not a requirement, and the host must have adequate network capacity and a reliable way to monitor and restart the process. A VPS does not make a stream failure-proof: the station feed, network route, host, encoder process, or YouTube ingest can still fail. No particular provider, service level, or bandwidth plan is established here, so compare those against your expected stream bitrate and operating needs.

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

For a process you manage yourself, arrange monitoring and restart behavior appropriate to your Linux distribution and deployment. Check logs and YouTube stream health after a restart; a process running again does not by itself confirm valid audio, video, or a healthy broadcast.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common problems and fixes

  • FFmpeg cannot open the station URL: verify you are using the published media-stream URL, not just the station’s player page. Check the station documentation and whether the feed needs particular input options or credentials.
  • YouTube shows no video: check that the visual input is being read and mapped into the output, and that the selected encoder and protocol are compatible. A radio feed supplies audio only.
  • The stream key or destination is rejected: copy the endpoint and key again from the selected Live Control Room stream. Do not reuse an old key or alter the endpoint by guesswork.
  • Audio is silent, clipped, or in the wrong channel layout: inspect the source feed and FFmpeg input/output audio settings. Test levels and listen to the private broadcast before going public.
  • The stream health is poor or it disconnects: compare the selected output bitrate with the available upstream bandwidth, inspect FFmpeg output and host/network logs, and check Live Control Room’s health message. Lowering resolution or bitrate may help if the connection cannot sustain the chosen output.
  • It stops after a host or process failure: investigate the reason in system and FFmpeg logs, then configure supervision and alerting. Restart behavior can restore a process but does not guarantee the feed or YouTube ingest has recovered.
  • The station asks you to stop rebroadcasting: stop the relay and resolve permission directly with the station or rights holder. A technically accessible stream is not necessarily licensed for retransmission.

Copyright and YouTube policy

Before relaying a station, confirm that its terms permit rebroadcast on YouTube and that you have rights to any music, spoken content, and visual material. Permission to listen to a station does not establish permission to retransmit it. YouTube may also apply its own copyright and live-stream rules; review the current terms for your channel and content before broadcasting. The rights status of any particular station is not established by the fact that its feed is reachable.

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.

Or let it run in the cloud

If the goal is an always-on YouTube channel rather than maintaining a Linux relay, StreamNeo is a cloud service that plays uploaded videos or playlists as a continuous YouTube stream; it does not take a live camera feed or stream to other platforms. Upload your recording or build a playlist, add your YouTube stream key once, and go live. The cloud keeps the stream running without your computer or home connection staying on. It supports uploaded quality up to 4K 60fps at one flat price per slot, with automatic recovery if YouTube drops the stream. The first day is free with no card required. The monthly option is $9.99 per month. Start the free day at StreamNeo registration.

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.

Read next

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
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.