Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

IP camera Streaming using java servlet and html over internet  RSS feed

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I want to access IP Camera video stream(MJPEG) in servlet and send the response stream to html page so that i can use html5 video tag to display this live stream.
I have written the code in doGet() where i have taken the camera stream in buffer using HttpURLConnection and sent it on ServletOutputStream.
I have also set the response type as response.setHeader("Content-Type", "video/x-motion-jpeg") because camera returning mjpeg stream.

Please suggest whether i am going correct or not.I don't want to use applet tag to display live video.

It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!