I am trying to do some processing on video being streamed from an Edi-Cam server (https://github.com/drejkim/edi-cam GitHub - drejkim/edi-cam: Video streaming on Intel Edison) which is written in nodejs.
Is it possible for me to capture video stream from Edi-Cam Server using C++ in openCV?
The C++ coding that i wrote as follow:
using namespace std;
using namespace cv;
VideoCapture cap(" http://192.168.8.102:8080/video.mjpg");
cout<<"Camera not found"<<endl;
while ( cap.isOpened() )
cap >> frame;
if(waitKey(30) >= 0) break;
When running the C++, it does not show me the video and show me "Camera not found".
However, in Intel Edison terminal, it shows:
"GET /video.mjpg 206 87.816 ms - 1248"
Can you explain me the procedure that you are trying to follow to capture the video stream with OpenCV? Are you running the Edi-Cam code first? Or just running the C++ code?
By the way I'm not sure if it is possible to do this, because the Edi-Cam example uses FFMPEG library and you want to use another library like OpenCV. I think that the best suggestion that I can give you is to use just one library.
I will be waiting for your reply to help you more.
Have a nice day!
Thanks for your reply. Yes, I am running the Edi-Cam code first and I can view the video using web browser without any problem. After that, I would like to do some image processing using openCV.
Is there any alternative method? How to use FFMPEG to view and save the video?
If I want to use openCV library, how to stream video using openCV?
Right now, I'm doing my best to help you. So I found some links that can be useful for you:
FFMPEG and OpenCV: http://stackoverflow.com/questions/7574554/stream-video-from-ffmpeg-and-capture-with-opencv
FFMPEG Video Streaming: https://trac.ffmpeg.org/wiki/StreamingGuide
Looks like you can use both libraries and maybe those links can guide you, but I think you shouldn't use the Edi-Cam code and try to create your own code.
Just let us know if you still have issues.
Thank you for remaining so positive.
I was wondering if you have updates about this case. Was the information helpful?
Remember that we are here to help, just contact us.