how to read video stream

i'm a young italian teacher.I'd like to teach to my students how to write a java program which read a stream from a webcam and send the stream to another pc in the LANSomebody can help me with an example?Thanks
[240 byte] By [daniele.ramona] at [2007-11-26 17:30:16]
# 1
Let me get this straight: You're a teacher in italy? Or an italian language teacher?In any case, why are you trying to teach your students something that you don't even know? There's no way you can be successful doing that
tjacobs01a at 2007-7-8 23:58:13 > top of Java-index,Security,Cryptography...
# 2

Are you already familiar with Java Programming -

or do you just want to demo webcam over the LAN

If the latter, then install JRE 1.4.2 AND JMF2.1.1 (performance pack) on all machines that you want to use

You can then run JMStudio on a machine with a webcam & make that transmit into the LAN (choose a multicast/broadcast IP)

On several of your other machine you van run JMStudio to receive that broadcast & display

If you want to program all this up for yourselves

there's lots of code examples if you search

and read through most of the JMF documentation

http://java.sun.com/products/java-media/jmf/reference/api/index.html

Start with a simple app that gets the webcam and can display it locally

Make sure that you use a cloneableDataSource

Vector vCDs = CaptureDeviceManager.getDeviceList(null); //get Devices supported

Iterator iTCams = vCDs.iterator();

while(iTCams.hasNext())

{

CaptureDeviceInfo cDI = (CaptureDeviceInfo)iTCams.next();

if(cDI.getName().startsWith("vfw:"))

{

try{

MediaLocator mL = cDI.getLocator();

DataSource dS = Manager.createCloneableDataSource(Manager.createDataSource(mrl));

Player player = Manager.createPlayer(dS);

player.realize();

.........

build a 'Transmit' button into your GUI from which you can get a clone of the Datasource & establish an RTP session to broadcast into the LAN

AGAIN you can use JMStudio as a receiver for test purposes

Following that you can build a Receiver application

Stefan_Marica at 2007-7-8 23:58:13 > top of Java-index,Security,Cryptography...