Efficiently handling streaming mjpeg

497 Views Asked by At

I have an android tablet app that streams an mjpeg stream from an ipcamera using an instance of java.io.DataInputStream. This works great when I'm streaming a single stream of mjpeg data. I'd like to be able to stream multiple streams in a gridview. This doc explains the ideal layout:

https://docs.google.com/document/d/1j0pC5BGzgSN2NRQGfsF7eUugf-n54eBpI9ZeC-5KKKI/edit?usp=sharing

For NDA reasons, I can't give out all the source code but I can provide the javadoc for what I have so far:

http://jumpstar.www57.a2hosting.com/camView/index.html

I've been able to display the same camera stream 4 times in a gridview but unfortunately the device starts running extremely slowly.

Does anyone have any suggestions on how I can support 4 live streams while keeping the memory/cpu usage low? I was thinking maybe downrezing the framerate for some of the streams or grabbing less data at every frame (somehow?). I'm open to anything at this point that will allow a somewhat live stream of 4 cameras at once.

Thanks for the help!

0

There are 0 best solutions below