- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi everyone,
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:
# include
# include
# include
# include
# include
using namespace std;
using namespace cv;
int main()
{
Mat frame;
namedWindow("video", 1);
VideoCapture cap(" http://192.168.8.102:8080/video.mjpg");
if(!cap.isOpened())
{
cout<<"Camera not found"<<endl;
getchar();
return -1;
}
while ( cap.isOpened() )
{
cap >> frame;
if(frame.empty()) break;
imshow("video", frame);
if(waitKey(30) >= 0) break;
}
return 0;
}
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"
Thank you.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
intel_corp
Could you help me?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi Yeong,
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!
Regards,
-Leonardo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi Leonardo,
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?
Thank you.
Regards,
Yeong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi Yeong,
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
https://siddhantahuja.wordpress.com/2011/08/15/ros-opencv-read-a-video-file-using-ffmpeg/
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.
Best Regards,
-Leonardo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi Yeong,
I was wondering if you have updates about this case. Was the information helpful?
Remember that we are here to help, just contact us.
Regards,
-Leonardo

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page