I have installed OpenCV on Ubuntu 14 , when i want to feed it's function with a video , it told me to install ffmpeg libraries but as i know, ffmpeg is replaced with another decoder library on Ubuntu 14, How can i fix it or use another library ?
Related
I am unable to open a camera on the network using Catalina, Python 3.7 and OpenCV 4.1.2.
I am running an IP Webcam app on a phone that exposes an endpoint as: http://192.168.87.26:8080/video. The following command fails:
import cv2
cap = cv2.VideoCapture('http://192.168.87.26:8080/video')
and the error message is:
OpenCV: Couldn't read video stream from file "http://192.168.87.26:8080/video"
At the same time, a video mp4 file works well. I have added permissions in MacOS such that the default webcam also works.
I have tried with both the pip install opencv-python as well as built an opencv from source, but the error for the video stream does not go away.
FFMPEG is installed in the system. FFPLAY on this URL http://192.168.87.26:8080/video works very well.
$ brew info ffmpeg
ffmpeg: stable 4.2.1 (bottled), HEAD
Play, record, convert, and stream audio and video
https://ffmpeg.org/
/usr/local/Cellar/ffmpeg/4.2.1_2 (287 files, 56.6MB) *
What I am missing?
After some more digging around, I was able to make it work. Looks like I had an old version of Intel OpenVINO around from Mojave days that was interfering with any local version of OpenCV that I would install.
During the exercise, I also figured that building OpenCV from scratch is far better than installing it from pip.
I am trying to install the Projector-Camera Calibration software available on: http://mesh.brown.edu/calibration/ . The software demands having installed Qt 4.8.4 and OpenCV 2.4.3 on my computer. It cannot work (as far as i know according to my research and INSTALL.txt file in the installation package) with any other versions of Qt and OpenCV. My problem is that OpenCV 2.4.3 version is no longer available anywhere on the Internet to download. It is not even available on the official OpenCV website: http://opencv.org/releases.html . I've tried downloading other versions of OpenCV, but none of them seems to work with this calibration software. More specifically, when I try to execute nmake release command in my Developer Command Prompt for VS 2017, the
LINK : fatal error LNK1181: cannot open input file
'opencv_core243.lib'
message is displayed which is expected because other versions of OpenCV do not have opencv_core243.lib file. I've done everything demanded in INSTALL.txt file, the PATH variable is set properly and everything else.
Can anybody help me with this problem or send me a link for downloading the OpenCV 2.4.3 if it is available somewhere on the Internet?
I don't see why the library should be dependent on that version of OpenCV. From my experience, the camera calibration functions are very stable through different versions.
You should be able to build the library with other versions of OpenCV by editing the file projector-calib.pro from:
# Windows 7
win32:OPENCV_DIR = "C:/opencv/opencv-2.4.3/opencv/build"
win32:OPENCV_LIB_DIR = $$OPENCV_DIR/x86/vc10/lib
win32:CV_VER = 243
to:
# Windows 7
win32:OPENCV_DIR = "C:/{YOUR_PATH}/opencv/build"
win32:OPENCV_LIB_DIR = $$OPENCV_DIR/{x64/x86}/vc12/lib
win32:CV_VER = {VERSION}
and substituting {YOUR_PATH}, {X64/X86} and {VERSION} properly. For OpenCV 2.4.13, for example, {VERSION} is 2413.
I'm using this gem right now:
Do i need to install FFMPEG like i did for uploading images (imagemagick)?
If I do, i can't seem to figure out how to install FFMPEG since I'm using Nitrous.io, which is a cloud based IDE.
I found out how to install Image magick from a line of code on nitrous.io, but i see nothing for FFMPEG.
So far I have tried googling quite a lot for an alternative encoder that's compatible with nitrous.
Depends on the system you are running and the configuration you need. if on MacOS i suggest using Homebrew.
https://ffmpeg.org/download.html
Firstly, I've installed ffmpeg using
sudo port install ffmpeg
on my Macbook OSX 10.9 and XCode 5.1. I've done the same for OpenCV
sudo port install opencv
and I got face detect working using this SO answer. However, when trying to open a video file in the source code folder using VideoCapture I get the error "WARNING: Couldn't read movie file Alireza_Day1_001.avi". Has anyone faced the same issue? (FYI VideoCapture from my webcam is working fine, but tried opening a .mov and .avi file without luck) Any help is much appreciated!
I'm having problems compiling OpenCV with ffMpeg support under Debian.
I downloaded new ffMpeg and installed it, downloaded opencv-1.1pre1.tar.gz and unpacked it.
then
./configure --enable-apps --enable-shared --with-ffmpeg --with-gnu-ld --without-quicktime CFLAGS=-I/usr/local/include CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib
ffMpeg checked yes and finally when I make it says
../../../otherlibs/highgui/.libs/libhighgui.so: undefined reference to `img_convert'
Now I've been around the forums and tried various stuff but nothing worked.
Can anybody help me get this thing installed?
OpenCV and FFmpeg evolved very much in last months and nowadays its possible to make OpenCV 2.1 work with FFmpeg without much suffering.
There were some changes in FFmpeg API after OpenCV 1.1pre1 was released, so OpenCV might not work properly with new FFMPEG. I'd suggest trying older versions. I was using FFMPEG trunk snapshot of 07/2008 without problems.