OpenROV / openrov-software

Meta project for all of the OpenROV Software projects
http://openrov.com
Other
423 stars 188 forks source link

Investigate manually decoding mjpeg to a canvas #477

Open BrianAdams opened 8 years ago

BrianAdams commented 8 years ago

https://github.com/getify/mpAjax

The current 'reliable' system is using two image tags to pull data which doubles the bandwidth. At some point, Chrome appears to have broken the ability to pull mjpeg data through a img element using CORS.

If instead we can efficiently parse the incoming multipart stream in javascript, possibly via a webworker, we will get getter fine grain control over errors and gain the ability to access the CORS protected resources again.

BrianAdams commented 8 years ago

An alternate solution would be to make a plugin for MJPEG streamer that exposes the data frames via a socket.io or zero-mq->socket.io interface.