You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug/Issue Description:
G:\PySceneDetect-0.5>scenedetect -i "G:\I2\I.mp4" detect-content list-scenes split-video --copy
Traceback (most recent call last):
File "G:\PySceneDetect-0.5\scenedetect.py", line 34, in
from scenedetect.main import main
File "G:\PySceneDetect-0.5\scenedetect_init_.py", line 52, in
from scenedetect.scene_manager import SceneManager
File "G:\PySceneDetect-0.5\scenedetect\scene_manager.py", line 55, in
import cv2
ModuleNotFoundError: No module named 'cv2'
G:\PySceneDetect-0.5>
Computing Environment:
OS: Windows 10 Pro
Python Version: 3.7.0 32bit
OpenCV Version: Don't know, don't install this.
Additional Information:
I downloaded source code zip file, after extracting I run setup file. I don't install opencv cause I don't have any issue with previous issue as I did same way.
Media [Videos/Images/Screenshots]:
MP4 file
Remove this section if there is no media associated with the issue/bug report.
For 32-bit Python 3.7, you want the file opencv_python‑3.4.3‑cp37‑cp37m‑win32.whl, and install it via pip (e.g. pip install [file]). Also note that you can install PySceneDetect via pip now (e.g. pip install scenedetect).
I'll try to have a more descriptive error message in the program in the next release, thanks for bringing this up. Let me know if you have any issues getting OpenCV installed.
Edit: I didn't add OpenCV as a dependency to the setup.py file because the opencv-python package used to not include static libraries, but it seems to now. You can now just type the following to install both:
After installing with "pip install opencv-python" command, I got this:
Error: Invalid value for split-video: mkvmerge is required for split-video -c/--copy.
Install the above tool to enable video splitting support.
Then I recalled you told to use MKVmerge.exe on scenedetect folder, so I used portable and copy MKVmerge.exe and it works flawlessly.
by the way, how to use ffmpeg with scenedetect. kindly reply me step by step for being total noob on programing field. thanks.
Likewise, you do the same thing (just drop ffmpeg.exe where scenedetect.exe is). I'll try to make the download link a little bit more apparent, and when I finalize the Windows release (portable/installer), it should include both programs for you as well.
I recently used 64bit python. so don't know why this I got error!
C:\Python37\Lib\site-packages\scenedetect>pip install scenedetect
Requirement already satisfied: scenedetect in c:\python37\lib\site-packages (0.5)
Requirement already satisfied: Click in c:\python37\lib\site-packages (from scenedetect) (6.7)
Requirement already satisfied: numpy in c:\python37\lib\site-packages (from scenedetect) (1.15.1)
Here is error:
C:\Python37\Lib\site-packages\scenedetect>scenedetect -i "G:\MGPM\MM2018.mp4" -o "G:\MGPM\A" detect-content list-scenes split-video --copy
Traceback (most recent call last):
File "c:\python37\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "c:\python37\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Python37\Scripts\scenedetect.exe_main.py", line 5, in
File "c:\python37\lib\site-packages\scenedetect_init.py", line 52, in
from scenedetect.scene_manager import SceneManager
File "c:\python37\lib\site-packages\scenedetect\scene_manager.py", line 55, in
import cv2
ModuleNotFoundError: No module named 'cv2'
Activity
Breakthrough commentedon Sep 1, 2018
Hi @raj6996;
You need to install the
opencv-pythonmodule via:If the above methods fail, you can also download the cv2 module from:
https://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv
For 32-bit Python 3.7, you want the file opencv_python‑3.4.3‑cp37‑cp37m‑win32.whl, and install it via
pip(e.g.pip install [file]). Also note that you can install PySceneDetect viapipnow (e.g.pip install scenedetect).I'll try to have a more descriptive error message in the program in the next release, thanks for bringing this up. Let me know if you have any issues getting OpenCV installed.
Edit: I didn't add OpenCV as a dependency to the setup.py file because the opencv-python package used to not include static libraries, but it seems to now. You can now just type the following to install both:
raj6996 commentedon Sep 2, 2018
After installing with "pip install opencv-python" command, I got this:
Then I recalled you told to use MKVmerge.exe on scenedetect folder, so I used portable and copy MKVmerge.exe and it works flawlessly.
by the way, how to use ffmpeg with scenedetect. kindly reply me step by step for being total noob on programing field. thanks.
Breakthrough commentedon Sep 2, 2018
Hi @raj6996;
You can get both ffmpeg/mkvmerge from here for 64-bit Windows:
https://github.com/Breakthrough/PySceneDetect/blob/resources/third-party/split-video-progams-win64.7z?raw=true
Likewise, you do the same thing (just drop ffmpeg.exe where scenedetect.exe is). I'll try to make the download link a little bit more apparent, and when I finalize the Windows release (portable/installer), it should include both programs for you as well.
If you have 32-bit Windows, you can find download links for ffmpeg/mkvmerge from:
https://pyscenedetect.readthedocs.io/en/latest/examples/video-splitting/
Let me know if this solves it, thanks again for your help in testing the software!!
raj6996 commentedon Sep 9, 2018
I recently used 64bit python. so don't know why this I got error!
C:\Python37\Lib\site-packages\scenedetect>pip install scenedetect
Requirement already satisfied: scenedetect in c:\python37\lib\site-packages (0.5)
Requirement already satisfied: Click in c:\python37\lib\site-packages (from scenedetect) (6.7)
Requirement already satisfied: numpy in c:\python37\lib\site-packages (from scenedetect) (1.15.1)
Here is error:
C:\Python37\Lib\site-packages\scenedetect>scenedetect -i "G:\MGPM\MM2018.mp4" -o "G:\MGPM\A" detect-content list-scenes split-video --copy
Traceback (most recent call last):
File "c:\python37\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "c:\python37\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Python37\Scripts\scenedetect.exe_main.py", line 5, in
File "c:\python37\lib\site-packages\scenedetect_init.py", line 52, in
from scenedetect.scene_manager import SceneManager
File "c:\python37\lib\site-packages\scenedetect\scene_manager.py", line 55, in
import cv2
ModuleNotFoundError: No module named 'cv2'
C:\Python37\Lib\site-packages\scenedetect>
Breakthrough commentedon Sep 10, 2018
@raj6996;
You need to
pip install opencv-pythonas above again.raj6996 commentedon Sep 10, 2018
Thanks Breakthrough, awesome and fast support!
Breakthrough commentedon Jul 20, 2019
Fixed in 6c4c8d4.
Breakthrough commentedon Aug 4, 2019
Original fix caused new bug (captured by #111).
mrobe commentedon Oct 17, 2019
I am getting this same error on macOS 10.13.6. Tried everything in this thread but no joy.
What to do?
hlgope commentedon Dec 27, 2019
Thanks...