What is the best way to stream opencv IplImage* video on a webpage?
I have a sequence of IplImage objects coming from a webcam, apply some processing, and I would like this video to be shown o开发者_运维技巧n a webpage. What is the best way to do this?
rossb As far as I know opencv has no support for streaming of opencv videos though there has been attempts to stream video over TCP using Sockets but that would not be the best way to implement for a webapp
I was able to do this with the following "hack"
1) set up an amazon aws account to use their S3 service. 2) Create an s3 "bucket". And continuously update the file (use the same name each time) into the bucket. Make sure you set the metadata attribute for no-cache and permissions for everyone to view.
3)create a simple web page where the JavaScript updates the every second (or what u prefer).
This is pretty bandwidth heavy and haven't tested at any scale. Since it's amazon, I'm not worried that things will fall apart when I scale traffic. However, users won't be happy with their bandwidth consumption. But it is free for up to 2000 puts and 20000 gets per month.
Next I want to figure out how to stream properly w codecs, etc, and am pulling my hair out figuring out a solution.
I'm happy to provide my source iOS client and JavaScript) but I'm on a train now. If you are truly interested ping me so I remember when I'm at my desk...
You could make your own webserver. Implementing just the basic GET command should be very simple. If you're using a .net language, things should be very easy for you.
精彩评论