Can someone help setting a camera to fully work with proper settings?

I feel like a noob asking this but I’ve tried with multiple different settings, different cameras, searched literally hundreds of different topics here and I could never put a camera properly working with OH.

My system is based on a RPi4 and I’m running OH3.3.

First, can someone that have a live feed working, share full settings so I can literally copy and test it that way?

Then, is it possible to eventually control the camera pan, tilt and zoom?

Last but not least, would this work remotely (not only inside the same network)?

Right now the solution I have is using a link to capture a frame and I update the link each 2 seconds, but that only works locally, not remotely and it’s not even a good solution. :frowning:

Any help will obviously be much appreciated. :slight_smile:

Try using the IP Camera Binding. It will generate links accessible from the cloud (from within the openHAB server and 8080 port)

I’m using a basic IP Camera, but the Binding has support for several brands and protocols.

Here is my Thing configuration for a Tasmota camera:

UID: ipcamera:generic:ip_camera_1
label: IP Camera 1
thingTypeUID: ipcamera:generic
  mjpegOptions: -q:v 5 -r 2 -vf scale=640:-2 -update 1
  updateImageWhen: "0"
  gifPreroll: 0
  ffmpegLocation: /usr/bin/ffmpeg
  ipWhitelist: DISABLE
  mp4OutOptions: -c:v copy -c:a copy
  pollTime: 1000
  port: 80
  snapshotOptions: -an -vsync vfr -q:v 2 -update 1
  hlsOutOptions: -strict -2 -f lavfi -i aevalsrc=0 -acodec aac -vcodec copy -hls_flags delete_segments -hls_time 2 -hls_list_size 4
  gifOutOptions: -r 2 -filter_complex scale=-2:360:flags=lanczos,setpts=0.5*PTS,split[o1][o2];[o1]palettegen[p];[o2]fifo[o3];[o3][p]paletteuse
1 Like

I appreciate your help. Unfortunately for me, it still does nothing.

I have some cheap Hiseeu wifi IP cameras and then I have a Xiaomi IP camera and another “white lable” IP camera that I can get live image from an RTSP link if I use VLC Media Player.

For the others I use them connected to an NVR from Hiseeu and an APP, which works fine.

I used this website to check what URLs I should use and for the snapshots it works perfectly but I cannot put it working with video. :frowning:

See here
IP Camera - Bindings | openHAB

You will need to change the ffmpegInputOptions to -f mjpeg otherwise you will not be able to record and a few other features that ffmpeg give you. Most cameras are h264 based steams, so this change is needed for cameras that have mjpeg based streams.


I would not copy other peoples setups, instead just use the GUI to add a generic camera and fill in the fields that are shown without needing to tick the advanced box. Everything that is needed should be shown without going advanced and confusing you more. If the camera has a working rtsp link then it should work, if not then look at the first paragraph of the ip camera documentation on how to get DEBUG or TRACE level logs. The section is titled what to do if you have issues, and its what you should do if you need help :slight_smile:

Thank you for your help. I will keep that in mind and avoind using the “Advanced” option. :slight_smile:

Regarding copying others people setups, I’m a developer for many years now so I know how it works. :smiley:

I mean, I looked into each line he had, tried to match mine with the necessary changes and still did not worked.

But, I did tried with VLC and I couldn’t also connect to the camera, so this might actually be something other than a problem with the binding or OH.

In a different setup, I have some Reolink cameras and for those I could have them working just fine via RTSP link they provide.

So I am on a good track here and will keep investigating.

Thank you all once again.

Sounds like that is the problem, try using google to find other possible working urls for the cameras. Sadly a lot of cameras are only designed to be used with X mobile app, so sometimes you can find some info by using ‘wireshark’ to spy on what traffic is going between the app and the camera.

1 Like