Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SocketException: Broken pipe when using WebcamStreamer
fixes #19
- Loading branch information
Showing
1 changed file
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35e1f5b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could use netty....and i don't think steam the original JPG data is that good.anyway,i some use case that's enough
35e1f5b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about Jetty, but didn't want to add more 3rd party dependencies. Agree that MJPEG stream is not that good, for sure not able to stream high FPS rate images, but as you said - in some cases it's enough. Maybe in 0.3.8 I will create additional interface for
WebcamStreamer
so one will just run it and register own encoder class which will stream buffered images in 3rd party format. But this is future, I didn't think about it yet.35e1f5b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a MjpegServlet? You can use it on any servlet container. Netty/Mina is a special case (async, good for the scenario with many clients) but I don't know about the complexity on development part. You can see in here [1] a snippet code for a mjpeg streamer with netty.
[1] http://blog.maurus.be/index.php/2012/05/netty-mjpeg-streamer/
35e1f5b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@decebals
This is also wonderful idea, but as I said before - I would rather avoid adding more dependencies to Webcam Capture API core because it's good to keep small output binaries size, I think (e.g. to use in your Raspberry Pi, or Arduino in future). However, if anyone create some good example of how to stream MJPEG with Netty / Jetty, I will be really happy to include it in examples. All good source codes are welcome :D