deezer/spleeter · error · SpleeterError
No stream was found with ffprobe
Error message
No stream was found with ffprobe
What it means
After a successful ffprobe, `load()` requires the probe result to contain at least one stream. If the `streams` key is absent or empty, spleeter raises this `SpleeterError`. This typically means the file is not a media container ffprobe can find streams in.
Source
Thrown at spleeter/audio/ffmpeg.py:109
Raises:
SpleeterError:
If any error occurs while loading audio.
"""
if isinstance(path, Path):
path = str(path)
if not isinstance(path, str):
path = path.decode()
try:
probe = ffmpeg.probe(path)
except ffmpeg._run.Error as e:
raise SpleeterError(
"An error occurs with ffprobe (see ffprobe output below)\n\n{}".format(
e.stderr.decode()
)
)
if "streams" not in probe or len(probe["streams"]) == 0:
raise SpleeterError("No stream was found with ffprobe")
metadata = next(
stream for stream in probe["streams"] if stream["codec_type"] == "audio"
)
n_channels = metadata["channels"]
if sample_rate is None:
sample_rate = metadata["sample_rate"]
output_kwargs = {"format": "f32le", "ar": sample_rate}
if duration is not None:
output_kwargs["t"] = str(dt.timedelta(seconds=duration))
if offset is not None:
output_kwargs["ss"] = str(dt.timedelta(seconds=offset))
process = (
ffmpeg.input(path)
.output("pipe:", **output_kwargs)
.run_async(pipe_stdout=True, pipe_stderr=True)
)
buffer, _ = process.communicate()
waveform = np.frombuffer(buffer, dtype="<f4").reshape(-1, n_channels)View on GitHub (pinned to c8854001ac)
Solutions
- Verify the file is a real media file: `ffprobe <path>` and confirm it reports streams
- Re-obtain or re-download the file; delete and regenerate zero-byte/corrupt files
- If the file should have audio, re-encode it with ffmpeg: `ffmpeg -i in.wav out.wav`
Example fix
# before
audio, sr = adapter.load('empty.mp3') # 0-byte file
// after
import os
if os.path.getsize('empty.mp3') == 0:
raise ValueError('empty.mp3 is not a valid audio file')
audio, sr = adapter.load('empty.mp3') Defensive patterns
Strategy: validation
Validate before calling
import os, json, subprocess
def has_streams(path) -> bool:
if not os.path.isfile(path) or os.path.getsize(path) == 0:
return False
r = subprocess.run(['ffprobe', '-print_format', 'json', '-show_streams', str(path)], capture_output=True)
try:
return len(json.loads(r.stdout).get('streams', [])) > 0
except json.JSONDecodeError:
return False Try / catch
try:
audio, rate = adapter.load(path)
except Exception as e:
if 'No stream was found with ffprobe' in str(e):
logger.warning('Skipping %s: no media streams', path)
audio = None
else:
raise Prevention
- Reject empty or zero-byte files early in ingestion pipelines
- Confirm files contain audio with ffprobe -show_streams before loading
- Re-download or re-encode media that yields zero streams
When it happens
Trigger: Calling `adapter.load(path)` on a file that ffprobe can parse but which contains zero streams — e.g. an empty/corrupt container, a text file renamed to .mp3, or a video file with no streams.
Common situations: Empty placeholder files, interrupted downloads producing 0-byte or header-only files, feeding non-audio data files to the separator.
Related errors
- An error occurs with ffprobe (see ffprobe output below) {}
- {} binary not found
- FFMPEG error: {process.stderr.read()}
AI-assisted analysis of deezer/spleeter@c8854001ac (2026-08-28).
Data as JSON: /api/errors/baff62052afd7e65.
Report an issue: GitHub.