Camera widget: MJPEG not working

When trying to setup the Camera widget using a MJPEG stream I can’t see anything. In addition the app is crashing when I have the MJPEG stream available.

(Using static snapshot images are working, but I prefer the real-time stream).

Using OpenHAB 2.3 with Samsung Tablet.

Regards,
Michel

As mentioned on the other thread this isn’t a bug, just not supported yet.
Current widget configuration is designed only for snapshot images.

Okay, then you can close the bug and mark it as solved. I was thinking you would offer feature parity between the versions, that’s why I created this as a separate bug.

My 20cents on this… if you insert an < img > with a src pointin to your mjpeg, there you are! you will have video on a img :slight_smile:

for me still not working in openhab and the release from today…

@Chino can you clarify what is specifically not working? Were you not able to bind mjpeg url to camera widget?

I was able to bind, but it’s just sasing “connecting”

@Chino most likely not working because Snapshot URL is for image URL, so it won’t be able to load video stream. Can you create a widget with only Video URL bound and see if it works?

that’s the first thing i did. Then I started to play around…

Hmmm, ok, let me see what else could be the problem. Thanks for the update.

1 Like

I have installed the Synology Surveillanec Add-On. With that one it is working… but brings a lot of delay with it :confused:

@Chino By default widget only shows snapshots from the video stream to reduce amount of resources. There will be an option to choose snapshot interval and view video stream directly in the future.

ok, good to know, than I can keep this setup

What types of MJPG streams are supported? Are there specific requirements? I’m trying to display a stream from Blue Iris (verified working in browser), but on the HomeHabit widget, it’s never able to display the stream correctly. Here is the config:

Thanks!

            {
          "type": "camera",
          "position": {
            "x": 3,
            "y": 0,
            "width": 1,
            "height": 2
          },
          "properties": {
            "label": "Front Yard",
            "video-uri": "http://XX.XX.XX.XX:XX/mjpg/frontyard",
            "snapshot": "",
            "snapshot-image": null,
            "snapshot-interval": "",
            "scaling": "crop",
            "rotation": 0
          }

Just to make sure that it is not general config error, do you get the dashboard updated correctly with that config? Because something like "snapshot-image": null is not valid, so it fails for me.
In general, it best to omit properties that don’t need to have anything assigned in config, since empty strings or nulls (unless mentioned as supported in docs) will lead to errors.

@igor
Thanks for your reply. Good point.

Taking out the "snapshot-image": null line or other attributes didn’t help. No matter which configurations I try, the widget only shows “Connecting…”

I’ll try tweaking the Blue Iris server to see if anything changes. It’s worth noting from the legacy version, this stream used to work, but I know the current version is using a different codebase.

What is the Android device and OS version do you have?

This is on Samsung Galaxy S10 running Android 9.

Just a couple of updates:

  • Confirmed that it seems to have something to do with the Blue Iris output. I was able to find and verify a working mjpg stream from this URL: http://128.255.86.8/axis-cgi/mjpg/video.cgi?resolution=704x480&dummy=garb.
  • The blue iris URL continues to show “Connecting…”
  • Sorry, should have been more clear. The config posted above was copied from the automatically generated output of the Remote Config Editor (which i’m loving by the way) which is why it shows the extra properties. The issue still exists when using JSON config

I have now switched from zoneminder to blue iris and now the mjpg streams are gone. What makes blue iris different? in the browser, the streams are still in homehabit is now connecting