Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VideoCapture{filename} #57

Closed
aronfothi opened this issue Jan 11, 2016 · 5 comments
Closed

VideoCapture{filename} #57

aronfothi opened this issue Jan 11, 2016 · 5 comments

Comments

@aronfothi
Copy link

Hi,
I've tried to run this functionality with web cam and it runs well. But I could not run it with any video file.
I tried this:

th> cap = cv.VideoCapture{filename='/home/user/MH.avi'}

th> cap:isOpened()
false

@aronfothi aronfothi changed the title VideoCapture{filenames} VideoCapture{filename} Jan 11, 2016
@shrubb
Copy link
Contributor

shrubb commented Jan 12, 2016

@aronfothi

Hi,
That's strange. On my machine, this code succeeds. I'm sure this isn't related to the bindings. Are you sure you have OpenCV tied to the necessary codec?

@shrubb
Copy link
Contributor

shrubb commented Jan 18, 2016

@aronfothi
Did you solve this issue? I've run out of ideas :(

@aronfothi
Copy link
Author

Not yet. Could you give me a hint how i could detect the missing codec? The cap:isOpened() ->
false does not give me enough info.
(sry for late reply)

@shrubb
Copy link
Contributor

shrubb commented Jan 18, 2016

@aronfothi
Try checking this:

  1. When installing OpenCV, you should see a report like:
...

--   Video I/O:
--     DC1394 1.x:                  NO
--     DC1394 2.x:                  YES (ver 2.2.1)
--     FFMPEG:                      YES
--       codec:                     YES (ver 53.35.0)
--       format:                    YES (ver 53.21.1)
--       util:                      YES (ver 51.22.1)
--       swscale:                   YES (ver 2.1.0)
--       gentoo-style:              YES
--     GStreamer:                   
--       base:                      YES (ver 0.10.36)
--       app:                       YES (ver 0.10.36)
--       video:                     YES (ver 0.10.36)

Here you can see the codecs that OpenCV had been linked to.

  1. Check the codec that your MH.avi is encoded with. Compare.

@aronfothi
Copy link
Author

It was the problem. It was strange because i installed the ffmpeg just before the OpenCV but somehow it was missing. After reinstall it works well.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants