stephanecharette / DarkMark

Marking up images for use with Darknet.
https://www.ccoderun.ca/darkmark/Summary.html
Other
160 stars 21 forks source link

Error reading video file #9

Closed lobart closed 3 years ago

lobart commented 3 years ago

Good day! I'm starting DarkMark by terminal. DarkMark 2021-05-29 21:08:10 starting DarkMark v1.5.11-1 2021-05-29 21:08:10 configuration file used: /home/archi/.DarkMark/DarkMark.cfg 2021-05-29 21:08:10 project key 1330964892, timestamp=1622300548 2021-05-29 21:08:10 finding all images and markup files in /home/archi/Videos/darkmark 2021-05-29 21:08:10 /home/archi/Videos/darkmark: number of .weights files to skip: 0 2021-05-29 21:08:18 video import mime type: video/mp4 /home/archi/Videos/video.mp4 <- This step i try to import video 2021-05-29 21:08:27 shutting down DarkMark v1.5.11-1

image

I installed DarkMar by video https://www.youtube.com/watch?v=pJ2iyf_E9PM&t=731s&ab_channel=StephaneCharette Without errors

lobart commented 3 years ago

Get this errors after click by Import button [ERROR:0] global /home/archi/opencv_build/opencv/modules/videoio/src/cap.cpp (140) open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.5.1-dev) /home/archi/opencv_build/opencv/modules/videoio/src/cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): /home/archi/Videos/darkmark/video in function 'icvExtractPattern'

[ERROR:1] global /home/archi/opencv_build/opencv/modules/videoio/src/cap.cpp (140) open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.5.1-dev) /home/archi/opencv_build/opencv/modules/videoio/src/cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): /home/archi/Videos/darkmark/video in function 'icvExtractPattern'

[ERROR:1] global /home/archi/opencv_build/opencv/modules/videoio/src/cap.cpp (140) open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.5.1-dev) /home/archi/opencv_build/opencv/modules/videoio/src/cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): /home/archi/Videos/darkmark/video in function 'icvExtractPattern'

stephanecharette commented 3 years ago

Did you follow the build steps exactly as described on the DarkMark page? Or did you attempt to build OpenCV yourself?

If OpenCV was installed correctly, then my next guess is the video file you are attempting to open is corrupted. DarkMark doesn't process the video directly, it uses OpenCV to handle all video input/output.

I would try to use another tool (VLC, Handbrake, Youtube) to convert the video file to another format, and try again. If DarkMark does this with all videos, then the problem is your copy of OpenCV. If DarkMark can open other video files correctly, then the problem is with the video file.

lobart commented 3 years ago

I followed build steps exactly, i didnt build OpenCV This problem with all video What version of OpenCV is needed for DarkMark? My OpenCV is 4.5.1

stephanecharette commented 3 years ago

DarkMark requires OpenCV v2.x or newer.

stephanecharette commented 3 years ago

What operating system and version are you using? And can you share the video so I can try it out?

When I look at my various systems where I run DarkMark:

On my newer Ubuntu 21.04 which uses the same version of OpenCV as you, I just tested it now with some video files I have and it worked as expected:

image

lobart commented 3 years ago

I removed OpenCV 4.5.1 and install 4.2.0, then built darknet, Darkhelp, DarkMark and it's work! Thank you!