Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Displaying WebCam video in JSP

 
Siddhesh Deodhar
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I was trying to display a live video from Web Cam into a jsp page(Jsp and webcam are on same machine).

Initially I played with JMF API and was able to get access to web cam using Java class.
Then I returned to JSP, and tried displaying a simple video(saved on my Hard Disk) into it using HTML <object>

Now I wanted to integrate above two things. I tried to do it with what ever knowledge I have but could not succeed.

Went on the Net to search if anyone trying similar things. In some forum, for similar question I found reply as follows

Create a java application which can capture the video from your webcam.
Once done that, create a servlet which gets an inputstream from it and writes it to the outputstream of the response.
Once done that, embed a player in your JSP which points to the servlet and supports the stream format in question.


I am unable to grasp last line of above paragraph "Once done that, embed a player in your JSP which points to the servlet and supports the stream format in question."

Can anyone put light on this ?

Note: I don't want to display web cam video in Applet.

 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you do not want Java on the client (which is understandable), then you need some other player; the major choices are Flash, QuickTime and Silverlight. The latter two are not always available, so which is best depends on your target audience; Flash may be best in the general case.

You also need a server component that streams the feed from the webcam to all clients that connect to it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic