Invalid data found when processing input is a clue, not a diagnosis. When relaying internet radio to YouTube with FFmpeg, first establish whether FFmpeg is failing on the station’s input URL, decoding the returned audio, or connecting to YouTube. Probe the radio endpoint on its own before changing codecs or bitrate; then troubleshoot YouTube’s server URL, stream key, and output settings as a separate stage.
What the invalid-data error does—and does not—tell you
FFmpeg’s error-code documentation defines AVERROR_INVALIDDATA as “Invalid data found when processing input.” The message identifies an invalid-data error, but it does not identify one root cause. A URL that returns a web page instead of audio, an unrecognized stream format, or a failure elsewhere in input processing are possibilities to investigate—not conclusions you can draw from that line alone. See the FFmpeg error-code documentation.
As an Amazon Associate I earn from qualifying purchases.
Start with the complete command and the surrounding log lines. Find which input FFmpeg was opening when the error appeared. If it happens before FFmpeg identifies the radio stream, investigate the station endpoint and response. If the radio input is recognized but the failure occurs while writing the output, investigate the YouTube connection and stream key instead.
Probe the radio station URL first
Run ffprobe against the exact listening URL
Use the station’s direct stream address—not merely its website or directory page:
#1 Best Overall
- Includes Raspberry Pi 4 4GB Model B with 1.5GHz 64-bit quad-core CPU (4GB RAM)
- Includes Pre-Loaded 32GB EVO+ Micro SD Card (Class 10), USB MicroSD Card Reader
- CanaKit Premium High-Gloss Raspberry Pi 4 Case with Integrated Fan Mount, CanaKit Low Noise Bearing System Fan
- CanaKit 3.5A USB-C Raspberry Pi 4 Power Supply (US Plug) with Noise Filter, Set of Heat Sinks, Display Cable - 6 foot (Supports up to 4K60p)
- CanaKit USB-C PiSwitch (On/Off Power Switch for Raspberry Pi 4)
ffprobe -hide_banner -loglevel debug "RADIO_STREAM_URL"
Replace RADIO_STREAM_URL with the real address. Look in the output for a detected input format and audio stream information. This command is an inspection step, not a guaranteed repair.
Check what the endpoint actually returns
A station page, playlist, login page, or error document is not necessarily a playable audio stream. If the response is HTML, text, or a 404 page, changing the audio codec cannot turn it into radio. A playlist may need to be opened or parsed to locate the actual stream endpoint. Verify what the server returns rather than assuming every station URL has the same format or behavior.
Rank #2
- Broadcom BCM2711, quad-core Cortex-A72 (ARM v8) 64-bit SoC @ 1. 5GHz
- 2. 4 GHz and 5. 0 GHz IEEE 802. 11b/g/n/ac wireless LAN, Bluetooth 5. 0, BLE
- 2 × USB 3. 0 ports, 2 x USB 2. 0 Ports
- 2 × micro HDMI ports supproting up to 4Kp60 video resolution
- Micro SD card slot for loading operating system and data storage
- Confirm that the URL is the station’s current direct listening endpoint.
- Check whether it redirects, requires authentication, or uses a signed query string that has expired.
- Look for evidence that the response contains audio rather than a page or error message.
- Consider whether the endpoint is temporarily unavailable.
- Check that your installed FFmpeg build supports the URL’s transport and the returned format.
FFmpeg documents network protocols and their options, including HTTP, Icecast, and RTMP, in its protocol documentation. The Icecast publishing syntax in that documentation does not mean a station’s listening URL is itself an Icecast publishing address. Treat a radio listening URL as an input to probe.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →Do not force a format without evidence
A suggestion such as adding -f mp3 is not a general fix. First establish what format the endpoint returns. Forcing an incorrect input format can conceal the real issue or produce another parsing error. If ffprobe cannot identify an input, check the URL, response, access requirements, redirects, protocol support, and station availability before changing output options.
Rank #3
- Broadcom BCM2711, Quad core Cortex-A72 (ARM v8) 64-bit SoC @ 1.5GHz
- 1GB, 2GB, 4GB or 8GB LPDDR4-3200 SDRAM (depending on model)
- 2.4 GHz and 5.0 GHz IEEE 802.11ac wireless, Bluetooth 5.0, BLE Gigabit Ethernet
- 2 USB 3.0 ports; 2 USB 2.0 ports.
- Raspberry Pi standard 40 pin GPIO header (fully backwards compatible with previous boards)
Separate radio-input failures from YouTube-output failures
Once ffprobe recognizes the radio input, investigate the YouTube destination independently. YouTube’s encoder workflow requires a server URL and stream key from the Live Control Room. YouTube Help says: “To start streaming, enter your YouTube Live server URL and stream key into your encoder.” See Create a YouTube live stream with an encoder.
- Open YouTube Studio’s Live Control Room and obtain the current server URL and stream key for the stream.
- Check that the destination in your FFmpeg command uses the value copied from YouTube and the matching ingestion protocol.
- Keep the stream key private. Treat signed radio URLs and query-string credentials as secrets too; remove them before sharing logs.
- Compare the log location of the failure with the input-probing result. A YouTube connection or credential problem is an output-side possibility, not proof that the radio input is malformed.
Use YouTube’s published encoder settings appropriately
YouTube’s current live encoder settings list RTMP/RTMPS as protocols and recommend RTMPS, which encrypts data in transit to Google’s servers. The page lists AAC or MP3 audio, a 44.1 kHz sample rate for stereo audio, and 128 Kbps as its stereo audio bitrate setting. These are YouTube’s published encoder settings; they do not establish that the station’s incoming audio must use the same bitrate.
Rank #4
- Vilros Complete Starter Kit for Pi 4 Includes Raspberry Pi 4 Model B Board and all the accessories you need to get started.
- 9-PART KIT WILL HAVE YOU READY TO GET UP AND RUNNING: Kit Includes 1. Raspberry Pi 4 Model B Board 2. Case With Easy to connect Built-in fan 3. 64GB Micro SD card Preloaded with RP OS 4. Vilros Pi 4 Compatible Power Supply with Inline on/off switch (power supply color may vary white/black) 5. Micro HDMI to Standard HDMI cable (5ft) 6. Micro SD to USB adapter to reflash card if desired 7. Neoprene Storage Bag to store all parts when not in use 8. Set of 4 Heatsinks 9. Vilros QuickStart Guide instruction booklet for Pi 4
- PASSIVE & ACTIVE COOLING: The included case is well-vented and the kit also includes a set of heatsinks with thermal stickers for easy application and a pre-installed fan to keep the board cool in any use.
- CONVENIENT ACCESSORIES: The power supply features an inline on/off switch neoprene bag that holds and protects all the parts when not in use and the QuickStart guide is updated and written for Raspberry Pi 4.
- IMPORTANT: Kit does NOT include Keyboard, Mouse or Monitor
For an FFmpeg output, verify that the destination protocol, server URL, key, and chosen audio codec agree with YouTube’s current settings. FFmpeg documents RTMP protocol behavior in its protocol documentation; its formats documentation covers FLV and RTMP-related handling. Do not use a destination-side error as a reason to force a format on the separate radio input.
Recommended Free Tools
Check whether your live presentation needs video
Radio supplies audio. A conventional YouTube live encoder presentation may also need a visual component. YouTube’s encoder settings page lists video codecs and parameters, but those settings alone do not establish that every audio-only FFmpeg invocation will be accepted or rejected. If your planned presentation needs video, use a visual you have the rights to use—such as a legitimate still image or visual loop—and configure it as a video input. That is a presentation choice, not a fix for an invalid radio URL or response.
Best Value
- Includes Raspberry Pi 4 4GB Model B with 1.5GHz 64-bit quad-core CPU (4GB RAM)
- CanaKit 3.5A USB-C Power Supply with Noise Filter (UL Listed) specially designed for the Raspberry Pi 4 (5-foot cable)
- CanaKit USB-C PiSwitch (On/Off Power Switch)
- Set of 3 Aluminum Heat Sinks for the Raspberry Pi 4
Retest one stage at a time
- Probe the radio endpoint until you can see whether FFmpeg identifies a format and audio stream.
- Keep the exact command and the first warning or error lines from the failing run. The line immediately before the generic invalid-data message may help locate the stage that failed.
- After confirming the input, run a short private or unlisted YouTube test with the current server URL, stream key, and chosen protocol.
- Change only one input or output setting at a time, and save a copy of the last working command.
The exact cause cannot be determined without the station URL’s response, the full command, the nearby log output, the installed FFmpeg build, and the YouTube destination details. No particular station, operating system, FFmpeg build, or channel is being diagnosed here.
Common symptoms and what to check
| Symptom | What to investigate |
|---|---|
| ffprobe fails before showing an input format or audio stream | Check whether the URL is a direct stream endpoint, what response it returns, redirects or authentication, protocol support in the installed build, and whether the station is available. |
| The URL opens a station website or returns text | Find the actual listening endpoint. If the URL is a playlist, determine whether it points to a separate stream address. |
| ffprobe identifies audio, but the FFmpeg run fails while writing output | Check the YouTube server URL, stream key, selected RTMP/RTMPS protocol, and output-side settings. |
| The log includes a generic invalid-data message with no clear stage | Read the complete command and surrounding lines, including the first preceding warning. The error code alone does not specify the cause. |
| The relay works briefly, then stops | Inspect new logs for whether the input connection, decoding, or YouTube output failed; test the input and destination separately before changing settings. |
Or let it run in the cloud
If your goal is a continuous YouTube radio relay, StreamNeo is a cloud option rather than an FFmpeg error repair. Upload your recording or build a playlist, add your YouTube stream key once, and go live. It loops uploaded videos from the cloud, so nothing has to stay on at home; it does not stream from a live camera.
- Any quality up to 4K 60fps as uploaded, at one flat price per slot.
- Automatic recovery if YouTube drops the stream.
- The first day is free with no card.
The monthly option is $9.99 per month. See StreamNeo or its pricing page for details. Start your free day with StreamNeo.
Free tools Windows power users keep installed
One-click scans. No signup required.
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.




