Skip to content

Exception in _init_video_manager() when video fails to load on non-Windows platforms #192

Description

@paulagd

Bug/Issue Description:
I am trying to run the detection in my sample video but it fails like:

scenedetect -i sample_seconds.mp4 detect-content list-scenes -n save-images

> scenedetect -i sample_seconds.mp4 detect-content list-scenes -n save-images
[PySceneDetect] Could not parse CLI options.
Traceback (most recent call last):
  File "/home/paulagomez/.virtualenvs/research/lib/python3.6/site-packages/scenedetect/cli/c
ontext.py", line 517, in _init_video_manager
    video_files=input_list, framerate=framerate, logger=logging)
  File "/home/paulagomez/.virtualenvs/research/lib/python3.6/site-packages/scenedetect/video
_manager.py", line 373, in __init__
    video_files=video_files, framerate=framerate)
  File "/home/paulagomez/.virtualenvs/research/lib/python3.6/site-packages/scenedetect/video
_manager.py", line 241, in open_captures
    raise VideoOpenFailure(closed_caps)
scenedetect.video_manager.VideoOpenFailure: OpenCV VideoCapture object failed to return True
 when calling isOpened().

During handling of the above exception, another exception occurred:
Traceback (most recent call last):                                                  [3/1926]
  File "/home/paulagomez/.virtualenvs/research/bin/scenedetect", line 8, in <module>
    sys.exit(main())
  File "/home/paulagomez/.virtualenvs/research/lib/python3.6/site-packages/scenedetect/__mai
n__.py", line 58, in main
    cli.main(obj=cli_ctx)   # Parse CLI arguments with registered callbacks.
  File "/home/paulagomez/.virtualenvs/research/lib/python3.6/site-packages/click/core.py", l
ine 782, in main
    rv = self.invoke(ctx)
  File "/home/paulagomez/.virtualenvs/research/lib/python3.6/site-packages/click/core.py", l
ine 1268, in invoke
    Command.invoke(self, ctx)
  File "/home/paulagomez/.virtualenvs/research/lib/python3.6/site-packages/click/core.py", l
ine 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/paulagomez/.virtualenvs/research/lib/python3.6/site-packages/click/core.py", l
ine 610, in invoke
    return callback(*args, **kwargs)
  File "/home/paulagomez/.virtualenvs/research/lib/python3.6/site-packages/click/decorators.
py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/paulagomez/.virtualenvs/research/lib/python3.6/site-packages/scenedetect/cli/$
_init__.py", line 293, in scenedetect_cli
    frame_skip=frame_skip)
  File "/home/paulagomez/.virtualenvs/research/lib/python3.6/site-packages/scenedetect/cli/$
ontext.py", line 586, in parse_options
    input_list=input_list, framerate=framerate, downscale=downscale)
  File "/home/paulagomez/.virtualenvs/research/lib/python3.6/site-packages/scenedetect/cli/$
ontext.py", line 526, in _init_video_manager
    dll_okay, dll_name = check_opencv_ffmpeg_dll()
TypeError: 'bool' object is not iterable

Computing Environment:

  • OS: Ubuntu 18.04.4 LTS
  • Python Version: 3.6.9
  • OpenCV Version: opencv-python 4.4.0.46

Additional Information:
I have also installed:

ffmpeg                    1.4
imageio-ffmpeg            0.4.2

Can someone tell me what am I doing wrong please?

Thank you in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions