Opencv video codec OSX - macos

I'm working through the example in openCV Highgui that can be found here. It may be worth noting that i'm running osx. When running the file I get the error "WARNING: Couldn't read movie file video/Megamind.avi" . Is this a codec problem (the .avi file came with openCV) or an environment problem? How is this fixed?

sometime port install complains and screws up old installations. Try brew OS X's package manager to install ffmpeg

I believe Megamind.avi is in XVID. Try installing the XVID codec from XVID. I guess the OSX package manager can get it as well.
To answer your question more directly: I guess you could both build opencv with the right references but it worked for me (in Windows) just to setup the codec for my system in general.

I followed the instruction (See below) for installing opencv on mac os X with ffmpeg support.
It worked and I can see my .avi files working. There is a detail installation instruction,
step by step.
follow this link

Related

getting ghostscript in docker image for mac

Apologies if this is a trivial question, I am very new to docker.
I'm trying to install ghostscript in a python base running on a mac. I've looked online and seen people load gs on linux with apt-get and on windows loading an exe installer program. On mac Ghostscript is loaded using brew, but brew is not in my docker image.
What options do I have? Should I try to find and pull a layer ghostscript? Copy the lib files into my image in the dockerfile? Somehow get brew in my image and use that to load?
Thanks
KenS's answer works - building from source code gives what I need, and also works for other architectures (where things like the apt-get or .exe installer I found through searches are platform dependent). I learned something about using Docker from his answer.

Installation of gstreamer bad plugins and opencv3.3 on Ubuntu 16.04 arm64

I have been working on some video playing/streaming pipelines for Computer Vision work on Nvidia Jetson TX2. It had Ubuntu 16.04 with latest Jetpack.
I have already installed opencv 3.3 and to test some of the pipelines, with .MP$ video files, I need h264parse plugin which is a part of gst-bad-plugins. However, when I try to install it using apt-get, it shows that following packages will be installed:
freepats gstreamer1.0-plugins-bad-faad gstreamer1.0-plugins-bad-videoparsers
libbs2b0 libde265-0 libflite1 libfluidsynth1 libgstreamer-plugins-bad1.0-0
libmimic0 libmjpegutils-2.1-0 libmms0 libmpeg2encpp-2.1-0 libmplex2-2.1-0
libofa0 libopenal-data libopenal1 libopencv-calib3d2.4v5
libopencv-contrib2.4v5 libopencv-core2.4v5 libopencv-features2d2.4v5
libopencv-flann2.4v5 libopencv-highgui2.4v5 libopencv-imgproc2.4v5
libopencv-legacy2.4v5 libopencv-ml2.4v5 libopencv-objdetect2.4v5
libopencv-video2.4v5 libsoundtouch1 libspandsp2 libsrtp0 libvo-aacenc0
libvo-amrwbenc0 libwildmidi-config libwildmidi1 libzbar0
Here it tries to install an older version of opencv and this really messes up with my current opencv (v3.3) install.
Does anyone have any idea on how should I overcome this problem. I would not want the option to just ignore all the dependencies. But somehow, if it detects the installed opencv version, that would be awesome.
Any help is appreciated.
Thanks!
I am working on Jetson Tx1 , and have problem installing opencv 3.3 in virtual environment onto it due to space issues. I tried to compile the build file from external sd card and make from there. Then Sym-link (cv2.so) file to appropriate path. Can you tell me how you were able to install opencv3.3 ??

wkhtmltopdf generates tiny output on Mac

I'm running wkhtmltopdf 0.12.4 on Mac OS 10.11.6. When I try to run the basic example "wkhtmltopdf http://google.com google.pdf", though, I'm getting an unusual output. Where I'm expecting something like this:
(PDF generated directly from Chrome), I'm instead getting this:
It seems odd to me that the default output should be so far off, but I've tried some options as well (including --disable-smart-shrinking) with no luck. Would appreciate any direction you can offer!
Same here with Mac OS 10.11.6 WKHTMLTOPDF v 0.12.4.
Using --lowquality is the only thing that seems to resolve the "tiny output" issue.
Default wkhtmltopdf output without --lowquality:
screenshot
With --lowquality, "tiny output" issue is fixed (and works with additional options like increasing resolution via --viewport-size):
--lowquality screenshot
I had the same problem, using wkhtmltopdf version 0.12.4 on a Mac installed via homebrew. I uninstalled that and tried version 0.12.3, downloaded from http://wkhtmltopdf.org/, and now I have normal size output.
I have been trying to use the 0.12.4 version on Mac OS 10.13.3.
Adding some information about this issue.
This is a known issue in 0.12.4 version. https://github.com/wkhtmltopdf/wkhtmltopdf/issues/3241
It has been fixed in a commit but not yet released as part of 0.12.4
https://github.com/wkhtmltopdf/wkhtmltopdf/commit/1c0e72d2faa6da026edc139fac97fcda43535fd3
the 'lowquality' flag fix discussed above is the fastest way to resolve this OR you can install the 0.12.5 version if you are an advanced user. https://github.com/wkhtmltopdf/wkhtmltopdf/blob/master/CHANGELOG.md
To solve problem install wkpdftohtml via
brew install Caskroom/cask/wkhtmltopdf
I encountered this issue when running wkhtmltopdf on very large screens, and found that specifying print media-type instead of screen media-type, i.e. via --print-media-type, resolved the issue.
For example:
wkhtmltopdf --print-media-type http://google.com google.pdf

Which one I should download? "Download the latest version of libclang"

I want to install YouCompleteMe, on Mac OSX, early 2015.
I have installed it under guidance of Mac OSX part. However, I got one warning:
NoExtraConfDetected: No .ycm_extra_conf.py file detected.
Then I read the full installation guide, and know that I should Download the latest version of libclang. However, there are so many source code on the official webpage of LLVM, and I don't know what to install (figure below).
So, could you please tell me, which one I should install?
Thanks!
If you go to http://llvm.org/releases/download.html#3.8.0 you can see Pre-Build binaries for MacOsX that's what you need to download and extract. Once you extract this. You will need to source it's location using the path variable.
Now, You can also install clang using brew from the terminal.
brew install --with-clang llvm

Imagemagick installation no good on Lion

I have a fresh installation of Lion. I need to install ImageMagick (IM) to use the "identify" command line tool to search for corrupt images in folders that have thousands of time lapse images.
I have installed IM from the Mac OS X Binary Release, word for word based on these directions.
I have Xcode 4.2 installed from the Mac App Store.
X11 appears to be installed default with Lion. X11 about shows: XQuartz 2.6.3 (xorg-server 1.10.3).
The problem is that IM's installation appears successful but every time I use the "identify" command it returns "identify: command not found".
I have searched and searched (within stack overflow, google, etc.) and found MANY MANY articles on both subjects (IM and detecting corrupt images), but I've found nothing that helps me out.
I have also tried installing MacPorts and that didn't work either. And it freaked me out as one of it's dependencies was downloaded from Facebook.net (WHAT?!). I did a fresh install of Lion after that happened.
Thanks for your time.
Installing ImageMagick with Homebrew worked for me:
brew install imagemagick

Resources