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

Compile opencv allowing reading of video files #80

Open
markkassab opened this issue Jan 19, 2019 · 1 comment · Fixed by #83
Open

Compile opencv allowing reading of video files #80

markkassab opened this issue Jan 19, 2019 · 1 comment · Fixed by #83
Labels
enhancement New feature or request
Milestone

Comments

@markkassab
Copy link

We would like to be able to feed the pipeline from a video file instead of camera while tuning the pipeline. When I use cv::VideoCapture(), to try and open an mp4 file, this is what it generates:

[ INFO:0] VIDEOIO: Enabled backends(3, sorted by priority): V4L2(1000); CV_IMAGES(990); CV_MJPEG(980)
(DEBUG) V4L: opening cube1.mp4
(DEBUG) V4L2: Unable to query capability. try_init_v4l2 open “cube1.mp4”: Inappropriate ioctl for device
VIDIOC_REQBUFS: Inappropriate ioctl for device

And when I try to open an avi file:

[ INFO:0] VIDEOIO: Enabled backends(3, sorted by priority): V4L2(1000); CV_IMAGES(990); CV_MJPEG(980)
(DEBUG) V4L: opening capout.avi
(DEBUG) V4L2: Unable to query capability. try_init_v4l2 open “capout.avi”: Inappropriate ioctl for device
VIDIOC_REQBUFS: Inappropriate ioctl for device
Unexpected element. Expected: idx1. Got: movi.
Failed to parse avi: index was not found
@PeterJohnson PeterJohnson added this to the 2019.3.1 milestone Feb 3, 2019
PeterJohnson added a commit that referenced this issue Feb 3, 2019
Fixes #17.

Stage 2 is fairly minimal, stage 3 builds/installs OpenCV and WPILib et al, and stage 4
builds/installs the FRCVision webdash and adds the vision examples.

Other changes:
- OpenCV compiled with ffmpeg, OpenBLAS, and libgtk (fixes #79, fixes #80)
- OpenBLAS added to image (fixes #65)
- C++ Makefile is more easily extensible (fixes #71)
- Sources for everything are bundled into image into /usr/src
- README updated (fixes #16)
- pkg-config files for wpilibc et al are now installed and C++ Makefile uses them (if compiled local to Pi)
- Both dynamic and static libs are included in image

The only downside of all these changes (particularly the ffmpeg, OpenBLAS, and libgtk inclusion)
is the image size is now over 3GB (800MB compressed). The previous image didn't quite fit on a
2GB card however.
@PeterJohnson PeterJohnson modified the milestones: 2019.3.1, 2020 Feb 18, 2019
@PeterJohnson PeterJohnson reopened this Feb 18, 2019
@PeterJohnson
Copy link
Member

Reopening. We can't pull in ffmpeg yet due to opencv/opencv#10080

@PeterJohnson PeterJohnson added the enhancement New feature or request label Feb 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants