Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet for video streaming from Web Cam

 
Padmanabh Sahasrabudhe
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am working on a project where I need to create an applet which will do following things:

1] Detect the webcam device
2] Start streaming the Webcam after clicking the button to a frame within the applet.

My question is should JMF part of the applet on the client or client needs to have JMF installed on it?

Also I have come accross the code where I can give the type of webcam in the code but how to make it generalized to detect a webcam on a particular system and then stream from it?

Thanks in advance
Padmanabh
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A webcam is generally connected to a server, which then streams its pictures to a client; so I'm guessing what you're talking about is a desktop camera?

I don't know how an applet would detect a desktop camera, but JMF needn't be installed - it's Java-only, and can be part of the applet. And the applet would definitely need to be signed, since it's interacting with desktop resources.

I think Quicktime4Java has a few tricks for interacting with cameras, but I'm fairly certain that JMF doesn't.
 
Padmanabh Sahasrabudhe
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much for the reply.
 
Padmanabh Sahasrabudhe
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One more question. Any source for QuickTime4Java...I searched on google but didn't get any link for its download..
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's linked in the http://faq.javaranch.com/java/OtherOpenSourceProjectsFaq along with JMF, jVLC and several other libraries useful for doing media stuff in Java.
 
Padmanabh Sahasrabudhe
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a ton for those useful links. Need one more info. I am trying to develop applet but and run it without the browser...anybody knows a good IDE for developing applet.

My application will be a swing based application. I am not too much familiar with applet development using swing so just wanted to know how can I avoid using browser for it and run it as a application itself.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm confused. Both applets and applications use Swing (or AWT), so that's not a differentiating factor. Also, I don't see a difference in the way you'd develop them. Can you clarify what got you confused?
 
Padmanabh Sahasrabudhe
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for he confusion. Yes, after some research on the web I found that both applets and application use SWING. My problem is to decide the UI I am trying to develop for this software which streams live video, should I use the applet approach or application approach?
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It doesn't seem to make sense to make this an applet if what it shows are images from a local camera. There's nothing web-related about it, so no need to involve a browser.

But have you made sure that Java code can actually access a local camera? I would imagine that the process could be different for every camera in existence, so make sure to test it with at least the major types/brands of cameras.
 
Padmanabh Sahasrabudhe
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok. My application needs to catch the video thru' local webcam but then upload it to a server placed remotely from where it will be broadcasted. While broadcasting I don't want to involve browser at all. In this case are you saying that I should better use an applet?

The requirement is of a live streaming. Thanks again for your suggestion.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, I'm saying the opposite: that you should not use an applet. Applets introduce various kinds of security complications, and since there seem to be no other benefits to using them in this case, I'd go with a desktop app instead. Java Web Start is a technology for web distribution of desktop apps.
[ September 16, 2008: Message edited by: Ulf Dittmer ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic