• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

connect a webcam via java

 
Harry Tuttle
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

as a java developer i want to make a connection to my webcam from java using the java media framework. and here is my problem: when i create an instance of MediaLocator i use the same url my brower use to display the video image, but this url cause an error "The URL may not exist. Please check URL". i can't figure out what's going wrong. any ideas how the url must look?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13055
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does the URL that works on the browser look like?

Where, exactly, do you get this error message?

Bill
 
Harry Tuttle
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
William Brogden wrote:What does the URL that works on the browser look like?

Where, exactly, do you get this error message?

Bill


this is the method to initialize the cam



the ml, ds and player are fields of the class. and here is the output of the printStackTrace():



 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13055
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
String mediaFile = "http://192.168.2.108/img/main.cgi?next_file=main.htm";


That sure looks like the URL for a HTML page - your browser probably understands that and extracts the real URL of the image file in order to make a request for the image data.

If this was my problem I would examine the source on the browser to see what it is really doing.

Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic