Skip to content

[macOS] RuntimeError: Could not get number of frames #54

@cuteguy

Description

@cuteguy

Deface is quite handy for processing individual images, but it consistently encounters errors when I attempt to process MP4 files, and I'm uncertain of the underlying cause.

OS: macOS sonoma 14.3
Chip: Apple M1 Pro
Python Version: Python 3.11.7

Traceback (most recent call last):
  File "/opt/homebrew/bin/deface", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/deface/deface.py", line 398, in main
    video_detect(
  File "/opt/homebrew/lib/python3.11/site-packages/deface/deface.py", line 142, in video_detect
    nframes = reader.count_frames()
              ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/imageio/plugins/ffmpeg.py", line 385, in count_frames
    return cf(self._filename)[0]
           ^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/imageio_ffmpeg/_io.py", line 187, in count_frames_and_secs
    raise RuntimeError("Could not get number of frames")  # pragma: no cover
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Could not get number of frames

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions