Request input from users on MJPEG streaming features for IpCamera binding

Tonight I successfully added some proxy server code to the IpCamera binding and can now stream video from my cameras to Habpanel. It will work for any camera that can send MJPEG http streams and the same code will open up future features like RTSP and FFMPEG conversions as a server is needed to feed these streams back to Openhabs features. Unlike the method that I posted in the following thread, the binding will work on all platforms and not just linux.

Looking for feature and UI control ideas on how this should be presented to allow maximum flexibility and easy setup. If you have an idea or feedback on this idea before I clean up the code and implement the controls that would be great…

Extra binding setup:

  • SERVER_PORT (each camera will need a unique and unused port) Example would be ‘5700’
  • STREAM_URL_OVERRIDE To allow any url to be specified or can be left blank for cameras that auto detect the right url.
  • IP_WHITELIST The proxy will refuse to serve the stream to requests not on the whitelist because the proxy removes authentication. Binding will list a WARN when a request is blocked so you know the IP and can enter it if you wish.
  • ONVIF_MEDIA_PROFILE This selects the substream number usually this is a value of 1 with 0 being the mainstream which usually can not be MJPEG format. If you have ONVIF setup you will get some warnings if you have selected a non valid stream.

Channels the binding has for streaming:

Additional features? Some examples…

A switch to turn the stream OFF and ON. ON is actually auto as when the stream is not being used the network traffic stops.

Ability to display a static picture when the stream is turned off by changing the streamUrl string to be a picture link, could be used to display a nice error icon or even a picture of the camera feed just before it was turned off.

2 Likes