iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
To make FFmpeg retry an internet radio stream when its HTTP connection drops or ends unexpectedly, put the HTTP reconnect options before the input’s -i. A useful starting pattern is -reconnect 1 -reconnect_at_eof 1 -reconnect_streamed 1 -reconnect_delay_max 30. These settings apply to reading the radio source; they do not restart FFmpeg if it exits or guarantee recovery of the separate YouTube connection.
Start with the reconnect options on the radio input
Use this as a pattern for an endless HTTP radio feed:
ffmpeg
-reconnect 1
-reconnect_at_eof 1
-reconnect_streamed 1
-reconnect_delay_max 30
-i "$RADIO_URL"
...output options...
"$YOUTUBE_RTMP_URL/$YOUTUBE_STREAM_KEY"
This illustrates option placement and intent; it has not been tested against a particular station, FFmpeg build, audio format, or YouTube event. Replace the input placeholder with the station’s HTTP stream URL and the output placeholders with the ingest address and stream key shown for your YouTube Live event. Keep the key private: YouTube describes it as the information that tells an encoder where to send a feed and lets YouTube accept it (Manage live stream settings).
FFmpeg options are associated with inputs or outputs according to their position. Put HTTP protocol options before the -i they configure; placing them after the input may not configure the radio connection as intended. Check your installed build’s available options with ffmpeg -h protocol=http. FFmpeg’s official protocol documentation defines the HTTP options, but support and defaults can vary with version and build configuration.
#1 Best Overall
- All-in-One Internet Radio Component: Seamlessly access thousands of global stations via Wi-Fi or LAN, using Skytune, enjoy Podcasts, local FM radio, and stream music from your phone via Bluetooth (Requires external speakers or amplifier—no built-in speaker driver).
- HiFi Integration Ready: Easily connect to your home audio system with stereo line-out or optical output. No built-in speaker—designed as a pure tuner for audiophiles who want flexibility, or if you already have an amplifier or stereo systems to connect with.
- Smart Streaming & Playlist Control: Supports UPnP and DLNA for streaming music from networked PCs or NAS drives. Create and manage playlists or stream directly from your home server.
- Enhanced User Control: Comes with a full-function remote control and 3.2" color screen. Browse stations, set sleep timers, alarms, EQ sound modes, and manage your favorites. Option to display a clock while playing with adjustable dimmer settings.
- Multiple Playback Modes & Alarms: Supports alarm via favorite station, FM, or tone. Sleep timer, kitchen timer, podcast playback with resume function, and remote web control via Skytune website.
What each HTTP retry option does
| Option | Purpose | When it may help |
|---|---|---|
-reconnect 1 |
Reconnect after a disconnect that occurs before EOF. | When the source connection drops unexpectedly. |
-reconnect_at_eof 1 |
Treat EOF as an error and reconnect. FFmpeg describes this as useful for live or endless streams. | When a radio feed expected to continue indefinitely closes or reports EOF during an interruption. |
-reconnect_streamed 1 |
Allow reconnect attempts for streamed, non-seekable inputs. | When the station supplies a continuous stream rather than a seekable file. |
-reconnect_on_network_error 1 |
Reconnect on TCP/TLS errors during connection establishment. | Add it if connection-establishment errors are part of the observed problem and the installed FFmpeg build exposes the option. |
-reconnect_on_http_error 503,5xx |
Retry selected HTTP status codes; FFmpeg accepts explicit codes and classes such as 4xx or 5xx. |
Use a narrow selection appropriate to the station. A 4xx response can indicate an access, authentication, or malformed-request problem that retries will not correct. |
-reconnect_delay_max 30 |
Sets the maximum reconnect delay in seconds in this example. | Choose a bound suited to how long you want FFmpeg to keep retrying before another recovery layer intervenes. The example’s 30 seconds is not a universal recommendation. |
-respect_retry_after 1 |
Honor a server’s Retry-After header when present rather than relying only on exponential backoff. |
Potentially useful for responses such as 429 or 503 when the server supplies that header. |
Current FFmpeg documentation also lists maximum retry-count and total-delay options. Check ffmpeg -h protocol=http for the exact options your build supports, and set retry bounds deliberately. The flags request particular retry behavior; they cannot make an unavailable station or a rejected request recover.
Build the YouTube output separately
The HTTP reconnect flags configure the radio input, not the YouTube encoder output. Your complete command must also provide an output YouTube can ingest. The exact command depends on the station’s audio format, whether you add a still image or other video, any filters, and the current event settings. For an audio-led broadcast with a static image, the image and its video stream need their own input and output configuration; reconnecting radio audio does not create or repair that visual stream.
Rank #2
- Listen to Thousands of Radio Stations from Around the World With Clear Reception - More than 25,000+ internet radio stations categorized by Location, Genre and Most Popular. Discover radio shows you love. Thousands of free rock, jazz, news and talk shows to choose from! All you need is a WiFi internet connection. Add your own favorite stations by submitting a valid URL to Skytune.
- Bluetooth receiving included so that you can send audio from a smartphone or tablet to the CC WiFi 3 Internet Radio. A 5dBi external antenna is included for best 2.4 Ghz Wi-Fi reception and distance within your home.
- Great Audio With Full Voice Clarity – Includes a line-out which can be used for remarkable results with an amplified speaker system or any AM, FM stereo receiver for superior audio. An adjustable equalizer (Line Out and Headphone) for advanced users centered at 105, 300, 850, 2400 and 6800 Hz plus an adjustable 3D setting for depth. Settings can be adjusted to your ear.
- Great Bedside Radio – It’s small and easy to use. Comes with a clock, dual alarm, sleep timer (15, 30, 45, 60, 120, 150, and 180 minutes) and stereo headphone jack. The included large sized remote control gives you quick access to preset stations. Presets: first 10 presets using the remote buttons, 100+ in sequence list.
- Additional Features – Adjustable Backlight, 5-volt AC adapter and USB to radio power cord included. Weight: 1 lbs. 2.6 oz. Size: 6.5” W x 3.9” H x 3.9” D. 2 Year limited warranty. U.S. based tech support.
YouTube’s current encoder help lists RTMP and RTMPS ingestion; video codecs including H.264, H.265/HEVC, and AV1; frame rates up to 60 fps; CBR; and AAC or MP3 audio. It recommends a two-second keyframe interval and says not to exceed four seconds. Use the settings appropriate to your visual treatment and event, and prefer RTMPS where your workflow supports it. These destination settings do not change how FFmpeg reconnects to the radio source. See Choose live encoder settings, bitrates, and resolutions for the current guidance.
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 reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteBefore relying on a live broadcast, test the full path using the event’s preview and monitor YouTube’s stream-health messages. YouTube recommends testing before starting and monitoring stream health during the event (Streaming tips).
Rank #3
- Internet wireless Wi-Fi radio: simply connect the radio to your internet network to access an extensive number of world’s radio channels, powerful and stereo output with rich sound.
- FM radio: Ordinary FM band without internet access. Can display radio texts if available.
- Bluetooth & UPnP/ DLNA Compatible: Play your preferred music or podcast using Bluetooth (such as Spotify or other audio streaming services) or UPnP/DLNA compatible device, also support Micro SD card.
- Personalize your favourite list up to 99 presets: Easy to manage favourites from FM and Internet radio in ONE list via 3 quick preset or remote control. Free to add new audio stream URL.
- Option to display the time when radio is playing, the backlight is adjustable, can be totally off / Multi-languages menu display / Remote control.
Diagnose which part of the path failed
- Check the FFmpeg process and logs. Determine whether FFmpeg is still running and whether messages point to the radio input, an HTTP response, or the YouTube output. Input reconnect flags address documented HTTP input behavior only.
- Inspect the source response. When possible, note the HTTP status code. A repeated 4xx response may mean the URL, credentials, access permissions, or station request needs fixing rather than more retries.
- Verify the station URL and format independently. Confirm that the URL is current and that the stream’s format, redirects, and any authentication requirements work with your setup. A station-specific command cannot be determined without those details.
- If FFmpeg exited, add a separate process-recovery layer. Reconnect flags cannot revive a stopped process. A process supervisor or service manager can relaunch it, but that is distinct from the HTTP input retry behavior.
- Check the YouTube event. Confirm the stream key and ingest destination, then review the event preview and stream-health messages. A working radio input does not prove that the publishing connection is healthy.
- Check outbound capacity and stability. YouTube recommends leaving 20% bandwidth headroom above the total sent bitrate and notes that connectivity disruption can break a stream. Its streaming tips cover testing and network considerations.
Keep the content and channel eligible
Technical retries do not grant rights to rebroadcast a station. Make sure you have permission to transmit the radio programming and any accompanying visuals, and check YouTube’s live-stream policies and channel requirements before scheduling. Reconnect options solve a transport problem; they do not resolve copyright claims, access restrictions, or other content-policy issues.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Or let it run in the cloud
If your goal is a YouTube channel that stays live from uploaded recordings, StreamNeo is an alternative to managing an FFmpeg process and its source connection yourself. Upload a recording or build a playlist, add your YouTube stream key once, and go live. StreamNeo loops uploaded videos from the cloud, so nothing has to stay on at home. Each slot streams the 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; it is one free day per account. The monthly option is $9.99 per month. StreamNeo is for uploaded video on YouTube, not live camera input. See StreamNeo, or start the free day.
Quick Recap
Rank #4
- Connect the Grace Link to your traditional stereo or receiver to stream music and more; Total control with the Grace smartphone app, infra-red remote control, or the front panel controls via the 2.8-inch color display (no built in speaker)
- Supports 100,000 Internet radio stations and 100 presets; Built-in apps: Spotify Connect, Pandora, Amazon Music HD, Prime, and Unlimited, iHeartRadio, Radio.com, BBC, NPR, Sleep Sounds, Calm Radio, Shoutcast, Live365, Podcast, SiriusXM (subscription sold separately by SiriusXM), add your favorite station to your my stuff folder
- With Chromecast built-in, you can stream your favorite music from your phone, tablet, or laptop right to your favorite speakers or stereo system. Easily control your Grace Link with hundreds of apps you already know and love from your iPhone, iPad, Android phone or tablet
- Analog and pure digital outputs to connect to your favorite stereo or receiver; Analog inputs to stream your favorite CD or Turntable to any room of your home, to other Grace devices, or any brand Chromecast built-in speaker
- Supports Hi-Res files up to 24-bit/192kHz; Built in 5 band equalizer; Play audio from UPnP / DNLA media servers, Bluetooth 5.0 receiver to play from your phone or transmit to listen on headphones, RJ45 jack and built in dual band Wi-Fi; What's in the box: Grace Link, manual, Infra-red remote control and batteries, 12V 1A power adapter
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.

