aspose file tools*
The moose likes Applets and the fly likes Applet for video streaming from Web Cam Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet for video streaming from Web Cam" Watch "Applet for video streaming from Web Cam" New topic
Author

Applet for video streaming from Web Cam

Padmanabh Sahasrabudhe
Ranch Hand

Joined: Mar 04, 2008
Posts: 53
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
Marshal

Joined: Mar 22, 2005
Posts: 41522
    
  53
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.


Ping & DNS - my free Android networking tools app
Padmanabh Sahasrabudhe
Ranch Hand

Joined: Mar 04, 2008
Posts: 53
Thank you very much for the reply.
Padmanabh Sahasrabudhe
Ranch Hand

Joined: Mar 04, 2008
Posts: 53
One more question. Any source for QuickTime4Java...I searched on google but didn't get any link for its download..
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41522
    
  53
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

Joined: Mar 04, 2008
Posts: 53
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
Marshal

Joined: Mar 22, 2005
Posts: 41522
    
  53
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

Joined: Mar 04, 2008
Posts: 53
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
Marshal

Joined: Mar 22, 2005
Posts: 41522
    
  53
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

Joined: Mar 04, 2008
Posts: 53
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
Marshal

Joined: Mar 22, 2005
Posts: 41522
    
  53
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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Applet for video streaming from Web Cam