Radarr/Radarr · error · FileNotFoundException

Media file does not exist: {filename}

Error message

Media file does not exist: {filename}

What it means

VideoFileInfoReader.GetMediaInfo checks that the file exists on disk before invoking ffprobe and throws FileNotFoundException if it does not. It is a preflight guard so ffprobe is never launched against a missing path.

Source

Thrown at src/NzbDrone.Core/MediaFiles/MediaInfo/VideoFileInfoReader.cs:55

            // We bundle ffprobe for all platforms
            GlobalFFOptions.Configure(options => options.BinaryFolder = AppDomain.CurrentDomain.BaseDirectory);

            try
            {
                _pixelFormats = FFProbe.GetPixelFormats();
            }
            catch (Exception e)
            {
                _logger.Error(e, "Failed to get supported pixel formats from ffprobe");
                _pixelFormats = new List<FFProbePixelFormat>();
            }
        }

        public MediaInfoModel GetMediaInfo(string filename)
        {
            if (!_diskProvider.FileExists(filename))
            {
                throw new FileNotFoundException("Media file does not exist: " + filename);
            }

            if (MediaFileExtensions.DiskExtensions
                .Concat(MediaFileExtensions.StreamingExtensions)
                .Contains(Path.GetExtension(filename)))
            {
                return null;
            }

            // TODO: Cache media info by path, mtime and length so we don't need to read files multiple times
            try
            {
                _logger.Debug("Getting media info from {0}", filename);
                var ffprobeOutput = FFProbe.GetStreamJson(filename, ffOptions: new FFOptions { ExtraArguments = "-probesize 50000000" });

                var analysis = FFProbe.AnalyseStreamJson(ffprobeOutput);
                var primaryVideoStream = GetPrimaryVideoStream(analysis);

View on GitHub (pinned to ca451608dc)

Solutions

  1. Verify the path exists with FileExists before calling GetMediaInfo.
  2. Ensure the source share is mounted/available for the whole job lifetime.
  3. Rescan/refresh the movie so paths are reconciled with disk before re-running.

Example fix

// before
var info = reader.GetMediaInfo(path);

// after: guard and skip missing files
if (!_diskProvider.FileExists(path)) { logger.Warn("missing: {0}", path); return null; }
var info = reader.GetMediaInfo(path);
Defensive patterns

Strategy: validation

Validate before calling

if (!_diskProvider.FileExists(filename)) { logger.Warn("missing media file: {0}", filename); return null; }

Type guard

static bool IsReadableMediaFile(IDiskProvider d, string p) => d.FileExists(p);

Prevention

When it happens

Trigger: GetMediaInfo is called with a path that no longer exists — the file was deleted/moved between the time the job was enqueued and the call, or the path points to an unavailable share.

Common situations: Race conditions where an import/aggregation job runs after the file was removed, network share flapping, externally moved/renamed files, or stale DB paths.

Related errors


AI-assisted analysis of Radarr/Radarr@ca451608dc (2026-08-13). Data as JSON: /api/errors/1fab3a2dd690f8ec. Report an issue: GitHub.