deface icon indicating copy to clipboard operation
deface copied to clipboard

[macOS] RuntimeError: Could not get number of frames

Open cuteguy opened this issue 1 year ago • 2 comments
trafficstars

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

cuteguy avatar Feb 04 '24 06:02 cuteguy