I have just started learn opencv and i encountered a problem about playing video. I use qt-creator for opencv and my os is fedora 28.
My code:
cv::VideoCapture vCap;
vCap.open("/home/enes/sample.mp4");
if(vCap.isOpened()){
cv::Mat frame;
cv::namedWindow("Video");
for(;;){
if(!vCap.read(frame)) break;
cv::imshow("Video", frame);
}
}
My problem is below.
Failed to query video capabilities: Inappropriate ioctl for device
libv4l2: error getting capabilities: Inappropriate ioctl for device
VIDEOIO ERROR: V4L: device /home/enes/sample.mp4: Unable to query number of channels
OpenCV(3.4.1) Error: Unspecified error (GStreamer: your gstreamer installation is missing a required plugin
) in handlemessage, file /builddir/build/BUILD/opencv-3.4.1/modules/videoio/src/cap_gstreamer.cpp, line 1869
VIDEOIO(cvCreateCapture_GStreamer (CV_CAP_GSTREAMER_FILE, filename)): raised OpenCV exception:
OpenCV(3.4.1) /builddir/build/BUILD/opencv-3.4.1/modules/videoio/src/cap_gstreamer.cpp:1869: error: (-2) GStreamer: your gstreamer installation is missing a required plugin
in function handlemessage
CvCapture_OpenNI::CvCapture_OpenNI : Failed to open input file (/home/enes/sample.mp4): Bad file extension
What should I do to solve this problem? Thanks.
I managed to play MP4 video with OpenCV on Fedora 28 by building the opencv module from source, as described here: Install OpenCV-Python in Fedora.
I also installed most of the gstreamer-plugins-* packages and uninstalled the managed OpenCV packages before compiling Open CV.
Related
Installed Puppeteer using the command : npm install puppeteer
OS : CentOs7 3.10.0-693.11.6.el7.x86_64
When I tried to run the file, I am getting the following error
(node:14216) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process!
/opt/xyz/node-v14.16.0-linux-x64/lib/node_modules/npm/node_modules/puppeteer/.local-chromium/linux-856583/chrome-linux/chrome: error while loading shared libraries: libxkbcommon.so.0: cannot open shared object file: No such file or directory
How to solve this error ?
It says what is missing:
error while loading shared libraries: libxkbcommon.so.0
You need to have the library on your system. It seems this is the one, you might be able to install it with your package manager:
# yum install libxkbcommon-x11
I have installed fedora yesterday. I was using arch all my linux-life, fedora is good too. But I have only one problem. For using my headpanel analog sound i run script with pulseaudio module setup:
pactl load-module module-detect
But it doesn't work on Fedora. I have an error every time:
Failure: Module initialization failed
What i need to do?
I have followed all steps mentioned in Compiling the SDK for HTML5 to compile the Minko framework to HTML5.
When I run the batch file build_html5.bat, i have this error
000000000000000), RtlUserThreadStart() + 0x21 bytes(s)
clang++.exe: error: clang frontend command failed with exit code 255 (use -v to see invocation)
ERROR root: compiler frontend failed to generate LLVM bitcode, halting
mingw32-make1: *** [obj/html5/release/Picking.o] Error 1
mingw32-make: *** [minko-framework] Error 2
Here is my Emscripten conf :
LLVM_ROOT='C:/Program Files/Emscripten/clang/e1.30.0_64bit'
EMSCRIPTEN_NATIVE_OPTIMIZER='C:/Program
Files/Emscripten/clang/e1.30.0_64bit/optimizer.exe'
NODE_JS='C:/Program Files/Emscripten/node/0.12.2_64bit/node.exe'
PYTHON='C:/Program Files/Emscripten/python/2.7.5.3_64bit/python.exe'
EMSCRIPTEN_ROOT='C:/Program Files/Emscripten/emscripten/1.30.0'
MINGW_ROOT='C:/Program Files/Emscripten/mingw/4.6.2_32bit'
JAVA='C:/Program Files/Emscripten/java/7.45_64bit/bin/java.exe'
Im on windows 7 64 bit.
Anyone know what causes this error and how can I resolve it?
This is a known problem with Emscripten 1.30, it should be resolved in future versions. For the moment, stick to Emscripten 1.29.
I´m getting this error while trying to compile a Flashdevelop AIR project:
Native Context not available. The Config class is only available in Adobe AIR.
My setup:
Using Starling.
Using the ANE file from https://github.com/logotype/LeapMotionAS3
Using Flex SDK 4.6.0/AIR 3.8 in Flashdevelop 4.4.4 RTM
Extended Desktop profile is on.
The error fires up when I try to use the controller.config() or screen.* as in:
if(leap.config().setFloat("Gesture.Swipe.MinLength", 200.0) && leap.config().setFloat("Gesture.Swipe.MinVelocity", 500)) leap.config().save();
My onConnect();
private function alConectar(event:LeapEvent):void{
trace("conectado");
leap.enableGesture(Gesture.TYPE_SWIPE);
leap.enableGesture(Gesture.TYPE_SCREEN_TAP);
if(leap.config().setFloat("Gesture.Swipe.MinLength", 200.0) && leap.config().setFloat("Gesture.Swipe.MinVelocity", 500)) leap.config().save();
if(leap.config().setFloat("Gesture.ScreenTap.MinForwardVelocity", 30.0) && leap.config().setFloat("Gesture.ScreenTap.HistorySeconds", .5) && leap.config().setFloat("Gesture.ScreenTap.MinDistance", 1.0)) leap.config().save();
//etc...
}
The full output:
Running process: C:\Program Files\FlashDevelop\Tools\fdbuild\fdbuild.exe "C:\Users\CASA\Documents\00_INTERACTIVE\LEAP\Leap_AirAS3Proj\Leap_AirAS3Proj.as3proj" -ipc 8b4c615f-60f6-46ac-aec0-093781073835 -version "3.8.0" -compiler "C:\Program Files\FlashDevelop\Tools\ascsdk" -library "C:\Program Files\FlashDevelop\Library"
Building Leap_AirAS3Proj
mxmlc-cli -load-config="C:\Program Files\FlashDevelop\Tools\ascsdk/frameworks/air-config.xml" -load-config+=obj\Leap_AirAS3ProjConfig.xml -debug=true -inline=true +configname=air -swf-version=21 -o obj\Leap_AirAS3Proj635190875306772137
Running java as: java.exe
Loading configuration: C:\Program Files\FlashDevelop\Tools\ascsdk\frameworks\air-config.xml
Loading configuration: C:\Users\CASA\Documents\00_INTERACTIVE\LEAP\Leap_AirAS3Proj\obj\Leap_AirAS3ProjConfig.xml
206311 bytes written to C:\Users\CASA\Documents\00_INTERACTIVE\LEAP\Leap_AirAS3Proj\obj\Leap_AirAS3Proj635190875306772137 in 6.156 seconds
Build succeeded
Done(0)
[Starting debug session with FDB]
[Starling] Initialization complete.
[Starling] Display Driver: DirectX9 (Baseline Constrained)
init
conectado
[Fault] exception, information=Error: Native Context not available. The Config class is only available in Adobe AIR.
Already change the bat/SetupSDK to: set FLEX_SDK=C:\Program Files\FlashDevelop\Tools\ascsdk to reflect the SDK (Thanks to Philippe from Flashdevelop).
Any help is welcome.
Regards!
Using MonoDroid 4.0.6 and MonoDevelop, any attempt to run in an emulator fails with this error listed below:
The minSdkVersion matches the emulator's SDK version. All AVDs were created by the MonoDroid isntaller.
Detecting package list location
Getting package list from device
Installing shared runtime package on device
1849 KB/s (25866362 bytes in 13.657s)
pkg: /data/local/tmp/Mono.Android.DebugRuntime-debug.apk
Success
Installing the platform framework
1565 KB/s (16530851 bytes in 10.310s)
pkg: /data/local/tmp/Mono.Android.Platform.apk
Failure [INSTALL_FAILED_OLDER_SDK]
Failed to install the platform framework
I solved this in 2 ways.
1) In the manifest the minSdkVersion should match or be lower than the emulator
2) (what tripped me up) The Mono DLLs References of the project should be set to the Android version too.
Both are needed. I come from a Java Android background so never thought to change anything but the manifest.