You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Operating System / Platform => Raspbian Buster/ARMV7
Compiler => GCC 8.3
Detailed description
The following sample code to read a video fails with the following error. Opencv has been crosscompiled with inference engine using a docker, as the documentation says.
[ WARN:0] global /opencv/modules/videoio/src/cap_gstreamer.cpp (1759) handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module matroskademux0 reported: Internal data stream error.
Error opening video stream or file
[ WARN:0] global /opencv/modules/videoio/src/cap_gstreamer.cpp (888) open OpenCV | GStreamer warning: unable to start pipeline
[ WARN:0] global /opencv/modules/videoio/src/cap_gstreamer.cpp (480) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
Steps to reproduce
#include "opencv2/opencv.hpp"
#include <iostream>
using namespace std;
using namespace cv;
int main(){
// Create a VideoCapture object and open the input file
// If the input is the web camera, pass 0 instead of the video file name
VideoCapture cap("../trackingexample/faceocc2.webm");
// Check if camera opened successfully
if(!cap.isOpened()){
cout << "Error opening video stream or file" << endl;
return -1;
}
while(1){
Mat frame;
// Capture frame-by-frame
cap >> frame;
// If the frame is empty, break immediately
if (frame.empty())
break;
// Display the resulting frame
imshow( "Frame", frame );
// Press ESC on keyboard to exit
char c=(char)waitKey(25);
if(c==27)
break;
}
// When everything done, release the video capture object
cap.release();
// Closes all the frames
destroyAllWindows();
return 0;
}
Issue submission checklist
I report the issue, it's not a question
I checked the problem with documentation, FAQ, open issues,
answers.opencv.org, Stack Overflow, etc and have not found solution
I updated to latest OpenCV version and the issue is still there
There is reproducer code and related data files: videos, images, onnx, etc
The text was updated successfully, but these errors were encountered:
@roccopietrini how did you come to this conclusion? I am facing the same error on a Jetson Xavier. There I installed OpenCV 4.4.0 with Python 3.8 by means of pip.
@PatrickNa Honesly I don't know precisely, I just followed this to get opencv installed on the raspberry, and matroska was not working, while other formats were working. I didn't manage to make it work, as it is something related to gstreamer, which I'm not familiar with.. I remember I tried installing gstreamer plugin packages without any luck. If you find out something, please write here. Thanks
This is what I have learned: When creating a VideoCapture instance one can, but does not have to, specify a 'Capture API'. In case it is not specified the system falls back to what is available. In my case, I have installed OpenCV with pip and the only capture API that was there was GStreamer, which expects a different syntax as with what I was familiar with. You can check which capture APIs are available by running the following lines in a python shell. The Video I/O section lists the information you are looking for.
importcv2print(cv2.getBuildInformation())
Since I am more familiar with FFMPEG I compiled OpenCV including this API and was able to use VideoCapture as I knew it.
Hope this helps!
System information (version)
Detailed description
The following sample code to read a video fails with the following error. Opencv has been crosscompiled with inference engine using a docker, as the documentation says.
[ WARN:0] global /opencv/modules/videoio/src/cap_gstreamer.cpp (1759) handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module matroskademux0 reported: Internal data stream error.
Error opening video stream or file
[ WARN:0] global /opencv/modules/videoio/src/cap_gstreamer.cpp (888) open OpenCV | GStreamer warning: unable to start pipeline
[ WARN:0] global /opencv/modules/videoio/src/cap_gstreamer.cpp (480) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
Steps to reproduce
Issue submission checklist
answers.opencv.org, Stack Overflow, etc and have not found solution
The text was updated successfully, but these errors were encountered: