To send an Icecast radio stream to YouTube with FFmpeg, use the station’s listener/playback URL as the audio input, pair it with a video source such as a looping still image, and send the combined feed to the YouTube Live ingest URL using the stream key. YouTube’s current encoder guidance recommends RTMPS, constant bitrate (CBR), and a two-second keyframe interval. The command below is an illustrative template, not a tested command; replace its placeholders with your station and YouTube values.
What you need before you start
- An Icecast listener URL for the station’s mount point. This is the URL listeners play, not the source-client address used to publish audio to Icecast. The exact URL, access requirements, and audio format depend on your station.
- A YouTube Live stream with its ingest URL and stream key, available in YouTube Studio’s Live Control Room.
- A still image to use as the video layer. This example keeps the radio audio live while showing the same artwork repeatedly.
- An FFmpeg build with the protocols and codecs required by your inputs and output. FFmpeg protocol availability can vary by build.
FFmpeg’s protocol documentation describes its icecast:// protocol as a way to stream to an Icecast server. For this relay direction, use the station’s listener URL as an input instead.
Get the YouTube ingest URL and protect the key
- In YouTube Studio, open the Live Control Room and create or open the stream you intend to broadcast.
- Copy the stream URL and stream key shown for that stream. Use the server URL and key together exactly as displayed; available server details may depend on the selected key.
- Keep the key private. YouTube treats it like a password for accepting an encoder feed. Do not place a real key in an article, screenshot, public repository, shell history, or exposed log. If it is compromised, reset it in Live Control Room and update FFmpeg’s destination.
See YouTube’s live encoder settings guidance for current connection and encoding recommendations.
Prepare the still image and connection values
Choose a suitable station image, for example station-artwork.jpg, and keep it accessible to the machine running FFmpeg. Set the two environment variables below in your shell, replacing the example listener URL and placeholder YouTube destination. Do not publish your real stream key.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problems#1 Best Overall
- 4K & HD STREAMING IN H.264 AND H.265 – Self-contained processor supporting H.264 and H.265 encoding in HD or Ultra HD (up to 2160p60) via SRT or RTMP, streaming directly to YouTube, Facebook, X, Twitch, Zoom, Microsoft Teams, OBS, Wowza, and many more — no encoding PC needed.
- 12G-SDI INPUT WITH STANDARDS CONVERSION – Supports input resolutions up to DCI 4K60 with an SDI input and SDI loop output, plus Teranex-powered automatic standards conversion so any HD or Ultra HD source streams cleanly at any target resolution.
- DUAL MONITOR OUTPUTS – Features both SDI and HDMI monitor outputs with a user-configurable standards converter on both the 12G-SDI Out and 4K HDMI Out, so you can feed a confidence monitor or downstream device at any required format independent of your streaming standard.
- ETHERNET + 5G/4G MOBILE WITH AUTO-FAILOVER – Connect via Gigabit Ethernet (10/100/1000BASE-T) or tether a smartphone via USB-C for mobile data, with automatic switchover between connections — ensuring your stream stays on air even if the primary internet connection drops.
- CLOSED CAPTIONS, TIMECODE & REST API – Supports embedding CEA-608 and CEA-708 closed captions in live RTMP streams, source timecode over RTMP and SRT, and offers a REST API over Ethernet for external HTTP control — ideal for broadcast automation and accessibility-compliant workflows.
export ICECAST_URL='https://radio.example.org/live.mp3'
export YT_INGEST='rtmps://a.rtmps.youtube.com:443/live2/YOUR_STREAM_KEY'
The example uses a secure RTMPS destination. The Icecast input could use HTTP or HTTPS, and it may require station-specific headers, authentication, or a different user-agent. If your station supplies a different listener URL or access method, use its actual playback details.
Send the Icecast audio and image to YouTube
Run this illustrative command after setting the values above:
Rank #2
- 【Hardware H.265/H.264 Encoding at 1080P60】Dedicated hardware encoder delivers broadcast-quality 1080P60 streams with H.265/H.264 compression. Reduces bandwidth usage by up to 50% compared to legacy H.264-only solutions, while maintaining crisp, crystal-clear video output.
- 【Broad Protocol Support for IP Distribution】 Supports SRT, RTMP(S), RTSP, UDP, HTTP, HLS, WebRTC, TRTC, Icecast and SHOUTcast — integrate seamlessly with CDNs, surveillance NVRs, IPTV systems and browser-based monitoring dashboards. One device replaces multiple single-purpose streaming boxes.
- 【Browser-Based Setup in Minutes】 Set up in minutes through any browser — no software, drivers or OS compatibility issues. DHCP is enabled by default to prevent IP address conflicts on your network. Note: basic networking knowledge (IP address, RTSP/RTMP configuration) is recommended for advanced streaming setups.
- 【Compact Design with Flexible Deployment】Palm-sized form factor (approx. 90×54×29mm) fits easily behind monitors, on shelves, or in equipment racks. Low power consumption ensures reliable 24/7 operation for live events, remote monitoring, and digital signage.
- 【Professional Audio & OSD Overlay + 1-Year Warranty】 Supports HDMI embedded audio plus external 3.5mm input. Built-in OSD generator adds scrolling text, logos, or timestamps directly to the video stream — ideal for branding, event info, or security labeling. Backed by a 1-year warranty and 24/7 online technical support.
ffmpeg -re
-stream_loop -1 -framerate 1 -i station-artwork.jpg
-i "$ICECAST_URL"
-map 0:v:0 -map 1:a:0
-c:v libx264 -preset veryfast -tune stillimage
-r 30 -g 60 -b:v 2500k -maxrate 2500k -bufsize 5000k
-c:a aac -b:a 128k -ar 44100
-f flv "$YT_INGEST"
The first input loops the artwork; the second reads the station audio. The -map options select the image as video and the Icecast input’s first audio stream. The command encodes H.264 video at 30 frames per second with a 60-frame GOP, equivalent to a two-second keyframe interval, and encodes stereo audio as AAC at 44.1 kHz and 128 kbps. Its video bitrate of 2.5 Mbps is an editorial starting point for this static-image example, not YouTube’s recommended 720p30 bitrate. Check that the image dimensions and the resulting output resolution are appropriate for the stream you configure.
YouTube’s current encoder guidance recommends RTMPS, CBR, and a two-second keyframe interval (not over four seconds); it lists H.264, HEVC, and AV1 video and AAC or MP3 audio for RTMP/RTMPS. For 720p30 H.264, YouTube recommends 8 Mbps video. For stereo audio, it recommends 44.1 kHz and 128 kbps. These are platform recommendations, not a guarantee that a particular connection can sustain them. Choose resolution and bitrate for stable upstream capacity and leave bandwidth headroom. The example’s 2.5 Mbps is not a YouTube recommendation.
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 reinstallRank #3
- ⭐【Innovative Product with Leading Technology】- Equipped with an advanced H.265 /H.264 dual encoding chip, supports 4K UHD (3840x2160) video input and output, with a maximum frame rate of 30fps at 4K resolution and up to 120fps at 2K and lower resolutions, delivering a smooth and detailed visual experience. It also supports HDCP 1.4 decryption, easily decoding various HDMI ultra HD video sources, delivering a cinematic visual experience for both professional live streaming and 4K ultra HD content transmission.
- ⭐【Multi-protocol and Multi-platform Compatibility】- Fully compatible with streaming protocols such as HTTP, RTSP, RTMP(S), SRT, HLS(M3U8), MP4, Multicast(UDP, RTP, PTL), ONVIF, FLV, WebRTC, TRTC, ICECAST, it can simultaneously output 4 video streams with different protocols and push them to live streaming platforms such as YouTube, Facebook, Twitch, and Vimeo with one click. Simultaneous live streaming across multiple platforms can be achieved without additional equipment.
- ⭐【Highly Customizable Settings to Meet Individual Needs】- It supports adding static text, scrolling captions, brand logos, and timestamps. Users can freely adjust core parameters such as video resolution, frame rate, and bitrate, and also perform personalized editing functions such as video cropping, rotation, flipping, and mirroring. It supports dual input of HDMI embedded audio and line-in audio, with adjustable sound quality, making your live stream content more distinctive and allowing you to create a unique brand live stream style.
- ⭐【Stable and Efficient Transmission, Easy Operation】- Employing HDMI to Ethernet core connection technology, it ensures stable and reliable network transmission with low latency and no lag, adapting to various network environments. Equipped with an intuitive user interface and detailed instruction manual, no professional technical background is required; setup can be completed quickly after connecting the device. It is also compatible with multiple terminals such as computers and mobile phones for management, and the video stream status can be viewed in real time via a URL.
- ⭐【Lifetime Free Warranty and Technical Supports】- All URayCoder video codecs come with a lifetime free warranty and technical supports, supporting secondary development and feature customization to meet enterprise-level personalized needs. Meanwhile, we providing many kinds of customization services such as shell pattern printing, logo addition, hardware and function development, ensuring reliable quality and worry-free after-sales service.
The source may provide MP3, AAC, Opus, or another format. Because its format is station-specific, this template re-encodes audio to AAC rather than assuming the source can be copied unchanged. If you know the source is compatible, copying may be possible, but re-encoding is the safer general starting point.
Test the preview, go live, and end the broadcast
- Start FFmpeg and open the stream in YouTube’s Live Control Room. Wait for the encoder preview and check that both picture and sound arrive.
- Review the Live Control Room’s stream-health status and messages before going live. YouTube’s guidance says: “Make sure to test before you start your live stream.”
- When the preview and health checks are satisfactory, select Go live in the control room for a scheduled stream.
- At the end, stop sending content and end the broadcast in Live Control Room. YouTube says streams under 12 hours are automatically archived; do not assume the same archive behavior for longer sessions.
See YouTube’s encoder settings and stream-health guidance and its Live Control Room workflow for current interface details.
Rank #4
- H.264
- H.265 Stream
- 1080p 60fps
- 12G-SDI In/Loop Out
Troubleshoot common problems
YouTube shows no preview or incoming feed
- Check that FFmpeg is using the current YouTube ingest URL and stream key, and that the output is RTMPS/RTMP with FLV formatting as expected by the destination.
- Confirm that the machine or server can make outbound connections to the ingest endpoint and that a firewall is not blocking them.
- If the key may have been exposed, reset it in Live Control Room and replace the destination value before reconnecting.
The video appears but audio is missing
- Confirm that
ICECAST_URLis the listener mount point and that it currently plays in a browser or audio player. - Check that FFmpeg detects an audio stream and that
-map 1:a:0matches the input’s actual audio stream. Use FFmpeg orffprobeto inspect the feed if necessary. - Verify whether the mount requires authentication, headers, or a station-specific user-agent, and adjust input handling accordingly.
FFmpeg reports a protocol, decoder, or audio-stream error
Inspect the listener URL and source codec with FFmpeg or ffprobe. Confirm that your FFmpeg build includes the protocols and decoders the feed requires. Correct the URL or input options for the station’s actual format and access requirements; the example cannot account for every Icecast configuration.
The stream buffers or disconnects
Lower the video bitrate or resolution until the connection can sustain the output reliably, check the local network or server, and monitor YouTube’s stream health. A bitrate recommendation is useful only when the available upstream connection can maintain it with headroom.
Best Value
- 【Innovative Product with Leading Technology】- Equipped with an advanced H.265 /H.264 dual encoding chip, supports 4K UHD (3840x2160) video input and output, with a maximum frame rate of 30fps at 4K resolution and up to 120fps at 2K and lower resolutions, delivering a smooth and detailed visual experience. It also supports HDCP 1.4 decryption, easily decoding various HDMI ultra HD video sources, delivering a cinematic visual experience for both professional live streaming and 4K ultra HD content transmission.
- 【Multi-protocol and Multi-platform Compatibility】- Fully compatible with streaming protocols such as HTTP, RTSP, RTMP(S), SRT, HLS(M3U8), MP4, Multicast(UDP, RTP, PTL), FLV, WebRTC, TRTC, ICECAST, it can simultaneously output 4 video streams with different protocols and push them to live streaming platforms such as YouTube, Facebook, Twitch, and Vimeo with one click. Simultaneous live streaming across multiple platforms can be achieved without additional equipment.
- 【Highly Customizable Settings to Meet Individual Needs】- It supports adding static text, scrolling captions, brand logos, and timestamps. Users can freely adjust core parameters such as video resolution, frame rate, and bitrate, and also perform personalized editing functions such as video cropping, rotation, flipping, and mirroring. It supports dual input of HDMI embedded audio and line-in audio, with adjustable sound quality, making your live stream content more distinctive and allowing you to create a unique brand live stream style.
- 【Stable and Efficient Transmission, Easy Operation】- Employing HDMI to Ethernet core connection technology, it ensures stable and reliable network transmission with low latency and no lag, adapting to various network environments. Equipped with an intuitive user interface and detailed instruction manual, no professional technical background is required; setup can be completed quickly after connecting the device. It is also compatible with multiple terminals such as computers and mobile phones for management, and the video stream status can be viewed in real time via a URL.
- 【Lifetime Free Warranty and Technical Supports】- All URayCoder video codecs come with a lifetime free warranty and technical supports, supporting secondary development and feature customization to meet enterprise-level personalized needs. Meanwhile, we providing many kinds of customization services such as shell pattern printing, logo addition, hardware and function development, ensuring reliable quality and worry-free after-sales service.
The process exits and does not resume
FFmpeg alone does not guarantee automatic recovery after every station or network interruption. For unattended operation, a service manager or supervisor can restart a failed process; this is an operational option, not a YouTube requirement. Plan how the process will recover and how you will detect a continuing failure.
The broadcast runs longer than 12 hours
YouTube’s cited workflow guidance describes automatic archiving for streams under 12 hours. For a longer broadcast, plan an intentional stop and restart, and verify current YouTube behavior instead of relying on an uninterrupted archive.
Choose where FFmpeg runs
Running FFmpeg on a local computer is straightforward, but that computer and its network connection must remain available for the relay. A hosted server is another operational choice for a process that should run away from home; it brings its own compute cost, setup, monitoring, and maintenance. Neither changes the need to test the feed and watch for failures.
Or let it run in the cloud
For an uploaded-video YouTube stream rather than a live Icecast relay, StreamNeo is a cloud option: upload a recording or build a playlist, add your YouTube stream key, and go live. It loops uploaded videos from the cloud, so no computer or home connection has to stay on. Each slot supports any uploaded quality up to 4K 60fps at one flat price per slot, includes automatic recovery if YouTube drops the stream, and the first day is free with no card. StreamNeo plays uploaded videos; it does not relay an Icecast feed or stream from a camera. Its monthly option is $9.99 per month. Start your free StreamNeo day.
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.

