How to grab video from IPCamera "Foscam" using JavaCV?

1,676 views
Skip to first unread message

Issam Laradji

unread,
Apr 8, 2012, 3:41:50 PM4/8/12
to jav...@googlegroups.com
Dear all,

I have an IPCamera, in particular Foscam, to be connected using JavaCV, I used OpenCVFrameGrabber grabber = new OpenCVFrameGrabber("IP address of Foscam"); but it was in vain, I have also read about using fmmpeg and that made me go through lots of trouble in linking the libraries and .dlls which at the end did not succeed :(. When I put the IP address of the camera in the browser, the video input is displayed, however, I faced lot of difficulties connecting with it using Java or JavaCV. It will be great and appreciated if someone can kindly provide me with a simple guide that resolves this issue. Thank you

Regards,
--Issam

Samuel Audet

unread,
Apr 9, 2012, 9:46:56 AM4/9/12
to jav...@googlegroups.com
Yes it should work fine with FFmpegFrameGrabber. What issues do you have
with FFmpeg exactly?

Issam Laradji

unread,
Apr 9, 2012, 2:11:43 PM4/9/12
to jav...@googlegroups.com
Well, I am getting this error "java.lang.UnsatisfiedLinkError: C:\Users\Issam\AppData\Local\Temp\jniavutil8825908578221633874.dll: Can't find dependent libraries"

After using this code statement : "FFmpegFrameGrabber grab=new FFmpegFrameGrabber("http://196.15.61.61/videostream.cgi?user=admin&pwd=&resolution=32&rate=6");"

Even though I have put all the required.dll files of FFmpegFrameGrabber such as "avcodec-54.dll" in the System32 folder and added their location to the SYSTEM PATH, yet still did not work :(. I have read about the common problems with openCV but it was not that very helpful. To clarify, I have Windows 7 64-bits. Looking forward for your positive suggestion. Thank you

Greg Perry

unread,
Apr 9, 2012, 2:55:47 PM4/9/12
to jav...@googlegroups.com
I suspect (as you do)  there is something wrong with your av install/location.

As a possible different solution I created a IPCamera frame grabber - the source is here
and it's been tested with a Foscam camera.

Good luck.

Samuel Audet

unread,
Apr 10, 2012, 8:54:31 AM4/10/12
to jav...@googlegroups.com
Ah great, I'll have to put a link (at least) to that project, thanks for
letting me know!

Samuel Audet

unread,
Apr 10, 2012, 8:56:23 AM4/10/12
to jav...@googlegroups.com
Please try again with the known working binaries, as indicated in the
README.txt file, thank you

Issam Laradji

unread,
Apr 10, 2012, 9:01:19 AM4/10/12
to jav...@googlegroups.com

Thank you for the quick and efficient reply :), I will try it and get back to you with the results. Thanks

Anshul katta

unread,
Oct 28, 2013, 8:49:10 AM10/28/13
to jav...@googlegroups.com
This link is not working :(

Greg Perry

unread,
Oct 28, 2013, 10:33:15 AM10/28/13
to jav...@googlegroups.com


--
 
---
You received this message because you are subscribed to the Google Groups "javacv" group.
To unsubscribe from this group and stop receiving emails from it, send an email to javacv+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Samuel Audet

unread,
Nov 3, 2013, 8:09:35 AM11/3/13
to jav...@googlegroups.com
Hey, that's nice. Do you feel this and a few others things would be best
moved into JavaCV itself?

Samuel

Greg Perry

unread,
Nov 3, 2013, 8:26:07 AM11/3/13
to jav...@googlegroups.com
Sure, 
There are 5... 

BlockingQueueGrabber.java
ImageFileFrameGrabber.java
IPCameraFrameGrabber.java
PipelineFrameGrabber.java
VideoSourceFrameGrabber.java

But I think BlockingQueueGrabber, ImageFileFrameGrabber, IPCameraFrameGrabber are probably the ones you might consider.
They are pretty simplistic. 
BlockingQueue is nice when your external source is on a different thread.
IPCameraFrameGrabber is for mjpeg - yes not the fastest, but probably the most ubiquitous codec which doesn't need ffmpeg depenencies
and ImageFileFrameGrabber - which provides grabbing the same image repetitively

The rest probably will drag in more dependencies than you want.
Let me know if you do use them, I'd like to remove them from my archive if you release with something comparable.



--

--- You received this message because you are subscribed to the Google Groups "javacv" group.
To unsubscribe from this group and stop receiving emails from it, send an email to javacv+unsubscribe@googlegroups.com.

Samuel Audet

unread,
Nov 3, 2013, 8:43:43 AM11/3/13
to jav...@googlegroups.com
On 11/03/2013 10:26 PM, Greg Perry wrote:
> Sure,
> There are 5...
>
> BlockingQueueGrabber.java
> ImageFileFrameGrabber.java
> IPCameraFrameGrabber.java
> PipelineFrameGrabber.java
> VideoSourceFrameGrabber.java
>
> But I think BlockingQueueGrabber, ImageFileFrameGrabber,
> IPCameraFrameGrabber are probably the ones you might consider.
> They are pretty simplistic.
> BlockingQueue is nice when your external source is on a different thread.
> IPCameraFrameGrabber is for mjpeg - yes not the fastest, but probably
> the most ubiquitous codec which doesn't need ffmpeg depenencies
> and ImageFileFrameGrabber - which provides grabbing the same image
> repetitively
>
> The rest probably will drag in more dependencies than you want.
> Let me know if you do use them, I'd like to remove them from my archive
> if you release with something comparable.

Sounds good! If you could clean them up to your satisfaction and have
them ready to insert in the com.googlecode.javacpp package, that'd be
great, and I will commit them as is. (BTW, the Google Code Way of
transmitting patches is via the issue page...)

And if you can think of anything else that you would be better off in
JavaCV, bring them along! thanks

Samuel

Samuel Audet

unread,
Nov 17, 2013, 5:29:34 AM11/17/13
to Greg Perry, jav...@googlegroups.com
Hi, Greg,

Am I to assume that you consider your code to be satisfactory and would
like to include it as is in JavaCV?

Samuel

Frank

unread,
Jan 27, 2016, 9:53:37 PM1/27/16
to javacv, supe...@gmail.com
Hi all,

Late to the convo... Also looking for the java source code as mentioned above, but the Google Code URL no longer works.  Would anyone have an updated link?

Thanks a bunch,

Frank

Samuel Audet

unread,
Jan 30, 2016, 1:38:15 AM1/30/16
to jav...@googlegroups.com, Frank
Reply all
Reply to author
Forward
0 new messages