Yalantis/uCrop · warning

load_video() : File '%s', no opened video stream associated

Error message

load_video() : File '%s', no opened video stream associated with filename found.

What it means

CImgList<T>::load_video() warns that no video capture stream could be opened for the given filename. The filename slot in the internal stream table is released and capture proceeds with fewer (or no) streams, so frames from that file will never be produced.

Source

Thrown at ucrop/src/main/jni/CImg.h:67351

          }
      } else index = last_used_index;
      cimg::mutex(9,0);

      // Release stream if needed.
      if (!step_frame || (index>=0 && positions[index]>first_frame)) {
        if (index>=0) {
          cimg::mutex(9);
          captures[index]->release();
          delete captures[index];
          captures[index] = 0;
          positions[index] = 0;
          filenames[index].assign();
          if (last_used_index==index) last_used_index = -1;
          index = -1;
          cimg::mutex(9,0);
        } else
          if (filename)
            cimg::warn(_cimglist_instance
                       "load_video() : File '%s', no opened video stream associated with filename found.",
                       cimglist_instance,filename);
          else
            cimg::warn(_cimglist_instance
                       "load_video() : No opened video stream found.",
                       cimglist_instance,filename);
        if (!step_frame) return *this;
      }

      // Find empty slot for capturing video stream.
      if (index<0) {
        if (!filename)
          throw CImgArgumentException(_cimglist_instance
                                      "load_video(): No already open video reader found. You must specify a "
                                      "non-(null) filename argument for the first call.",
                                      cimglist_instance);
        else { cimg::mutex(9); cimglist_for(filenames,l) if (!filenames[l]) { index = l; break; } cimg::mutex(9,0); }
        if (index<0)

View on GitHub (pinned to f788b534b4)

Solutions

  1. Verify the file exists and is readable at the given path
  2. Confirm the file decodes with ffprobe/ffmpeg or cv::VideoCapture before calling load_video
  3. Ensure a video backend is compiled in (cimg_use_opencv) and FFmpeg/OpenCV libs are installed
  4. Install the missing codec/system libraries (e.g. libavcodec, opencv-videoio) for that container format

Example fix

// before
frames.load_video("movie.mp4", 30);
// after
if (cimg::fsize("movie.mp4") > 0 && std::system("ffprobe movie.mp4") == 0) {
  frames.load_video("movie.mp4", 30);
} else {
  // handle unreadable/undecodable video
}
Defensive patterns

Strategy: validation

Validate before calling

if (cimg::fsize(filename) <= 0) { /* file missing/unreadable */ return; }
frames.load_video(filename, fps);

Prevention

When it happens

Trigger: Calling load_video(filename,...) where the file cannot be opened/decoded as a video (missing file, unsupported codec, FFmpeg/OpenCV backend not able to read it); passing a filename while no video backend is compiled in; a previously-opened stream for that index was closed.

Common situations: Missing or misspelled video file path; codec not supported by the installed FFmpeg/OpenCV; calling save_video/load_video features without cimg_use_opencv or ffmpeg available; network streams that failed to connect.

Understand the failure class

Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.

Related errors


AI-assisted analysis of Yalantis/uCrop@f788b534b4 (2026-09-08). Data as JSON: /api/errors/94426dd105f9bc3a. Report an issue: GitHub.