Page 1 of 2

rtsp camera in domoticz

Posted: Thursday 11 December 2014 8:24
by 12345caravan
Can someone tell me how I can integrate my ip cam?
It is using the rtsp protocol like: http://ip-address/11
That's 11 for mainstream, 12 for middle stream and 13 for small stream.
If I enter the data in domoticz it is not working, I think domoticz is going wrong at the videourl, which must be 11 for my camera.
Port for rtsp is 554 on the camera.
Does domoticz have rtsp support or only http?

Re: rtsp camera in domoticz

Posted: Thursday 11 December 2014 18:07
by antwan
What is the make and typenr of the cam?

Re: rtsp camera in domoticz

Posted: Thursday 11 December 2014 18:22
by 12345caravan
EDIT: cam is HI3516C
See image, onvif compatible, 1080P, 3 streams.
Viewable through the danale app on android.....
In a browser I can view the cam, and also vlc is displaying perfectly. Even in synology surveillance station he is working good.
But not in Domoticz.
Hope anyone can help.

Re: rtsp camera in domoticz

Posted: Friday 12 December 2014 8:11
by gizmocuz
I'm afraid this is not possible.
You need a camera with a (jpeg) snapshot url

Re: rtsp camera in domoticz

Posted: Saturday 13 December 2014 20:27
by nayr
RSTP Streams from a security camera wont play in a browser without a plugin, the video has to be transcoded to be streamed with flowplayer or native html5..

Would take some serious horsepower to transcode multiple HD RSTP streams into a compatible web-format, much more power than a domoticz server typically has.

Your camera proabibly has a jpeg snapshot URI, you just need to figure it out.. JPEG might not be the most elegant but it requires no processing by Domoticz and is widely compatible with all devices.

Re: rtsp camera in domoticz

Posted: Sunday 14 December 2014 12:15
by pepijn
12345caravan wrote:cam is HI3516C.
This is not the model and make of your camera but the chipset used (in many Chinese cam's)
Could you give us some more information, what name is on the box, where did you buy it, what's the partnumber etc.

Good news: the chipset supports JPEG, just need to find out how ;)

Re: rtsp camera in domoticz

Posted: Monday 15 December 2014 20:29
by 12345caravan
Label on the box says : Hongjingtian,
according to the Ispy website there's no jpeg snapshot........
http://www.ispyconnect.com/man.aspx?n=HongJingTian
Just rtsp://ip-address:554/11
Chipset can support it but firmware not I think.

Re: rtsp camera in domoticz

Posted: Saturday 26 December 2015 0:11
by nayr
Is your NAS acting as a NVR? if so perhaps you can fetch jpeg snapshots from it, might work but may add some latency.

Re: rtsp camera in domoticz

Posted: Saturday 26 December 2015 13:06
by pj-r
I'm using 720p rtsp camera with avconv in lua.
os.execute('/usr/bin/avconv -i rtsp://user:[email protected]:554/ch0_0.h264 -frames:v 1 -an -y /home/user/domoticz/www/snapshot.jpg')

There is ~2-5 sec delay in executing this with radxa rock so it takes bit juice. I'm just using this to send image to phone when something is triggered.

Re: rtsp camera in domoticz

Posted: Tuesday 29 December 2015 18:03
by patoche
Hi pj-r,

I have a Sricam cam sp008 with only rtsp protocol and i would like use it on raspberry with domoticz.
Can you give me more detail about your script lua, name, complete command line?
Can you also detailed the config in domoticz, gate, user, password, url image,...
Thanks in advance.

Re: rtsp camera in domoticz

Posted: Wednesday 30 December 2015 13:30
by pj-r
I'm not using camera IN domoticz. Domoticz dont support rtsp camera so you cannot use rtsp with camera options found in setup.

I'm using it to send snapshot image when something happens. That avconv line captures a snapshot from rtsp stream and saves it to file. On second line(not shown on post) I use telegram to send the captured image to my phone.

With patching the code it would be possible to show a image captured by script but capturing from rtsp is quite cpu intensive and slow operation so you wouldnt get anywhere realtime "video".
Only problem is the domoticz webserver part. After first image(http://your.domoticz/snapshot.jpg) is shown the UI/browser adds &count=X(http://your.domoticz/snapshot.jpg&count=X) parameter to uri and the domoticz web server cannot provide the file since it wont strip the uri parameters when comparing if the file exists. It would be a small change to code and I will try it when have some spare time. Still we need something to trigger the image capturing.

Re: rtsp camera in domoticz

Posted: Saturday 02 January 2016 12:00
by patoche
Thank you for your quick and clear answer.
Best whishes 2016

Re: rtsp camera in domoticz

Posted: Saturday 02 January 2016 12:30
by Minglarn
borrowing the thread ...

Is it possible to get the camera stream from Domotics?

Did found this for getting the snapshot from Domotics: http://192.168.1.236:8080/camsnapshot.jpg?idx=1
but it would be nice to get the stream from that particular camera...

Re: rtsp camera in domoticz

Posted: Saturday 02 January 2016 21:22
by nayr
no the format IP cameras stream in cannot be embedded into browsers without requiring a 3rd party browser plugin.. typically that plugin is specific to the camera make or model since the industry loves to use proprietary video formats.. for example VLC will stream RSTP from my Dahua cameras but it will not play files saved by those same cameras. When I connect directly to those cameras with a browser the streams requires a OS specific browser plugin from Dahua to display..

Unfortunately RSTP is not a browser friendly format, so you would have to run a transcoding daemon on hardware powerful enough to convert it to a standard compliant web format in real time, such as VLC, Flash Media Encoder, etc.. and thats well beyond the scope of Domoticz.. there are tools for that, if you want em.. use em. Its your Network Video Recorders job to stream video to network devices.. Domoticz is not a NVR.

Domoticz only cares about snapshots so it can associate images with events, ie capturing an image every time a sensor goes off.. If you want to capture video when a sensor goes off, setup a NVR that has physical or IP triggered alarm inputs and tie Domoticz events to fire them off.

Perhaps a feature request can be put in so Cameras have an additional field for inputing a web url to display a "Live Feed" link. This link would take you to an external portal that is streaming the camera, such as the cameras or a NVR's native web interface.. However actually viewing the stream natively within domo is not feasible given the limitations above.

Re: rtsp camera in domoticz

Posted: Sunday 03 January 2016 9:32
by Minglarn
Thanks for The info.
However, when you click on the live icon in Domiticz you see the stream, that's the one I want to use. It looks like Domiticz makes an mjpeg stream.

But i have solved it with php. :)


Sent from space using an app.

Re: rtsp camera in domoticz

Posted: Saturday 05 March 2016 14:38
by hervesz
How did you solve it with php ?
Could you post your script ??

Re: rtsp camera in domoticz

Posted: Saturday 05 March 2016 16:12
by Minglarn
It was solved by using snapshots rapidly with php (kinda the same way Domoticz do it).
So in other words your cam must have snapshot function.
My ANRAN ipcam is not supporting JPG snapshots. But there is an undocumented way..

Try:

Code: Select all

http://IP_TO_CAM/webcapture.jpg?command=snap&channel=1

Re: rtsp camera in domoticz

Posted: Wednesday 06 April 2016 14:48
by Heisenberg
Minglarn wrote:It was solved by using snapshots rapidly with php (kinda the same way Domoticz do it).
So in other words your cam must have snapshot function.
My ANRAN ipcam is not supporting JPG snapshots. But there is an undocumented way..

Try:

Code: Select all

http://IP_TO_CAM/webcapture.jpg?command=snap&channel=1
Unfortunately this doesn't apply to all RTSP cameras. This is what I found in the folders of my camera (model K-6320E) but I couldn't grab a picture. I hope someone can help?

Code: Select all

Index of /cgi-bin/

mode  links  bytes  last-changed  name
dr-x   3         118  Jul 24  2015  ./
dr-x   9         191  Jul 24  2015  ../
-r-x   1         253  Jul 24  2015  jvsweb.cgi*
-r-x   1        8982  Jul 24  2015  proccgi*
drwx   3         180  Jan  1  2000  snapshot/
-r-x   1          87  Jul 24  2015  snapshot.sh*
-r-x   1       12687  Jul 24  2015  transfer_8127*
-r-x   1       10849  Jul 24  2015  wagent*

Re: rtsp camera in domoticz

Posted: Sunday 17 April 2016 20:23
by pj-r
Its hilink hw. try these:

Code: Select all

http://ip.of.camera/cgi-bin/snapshot.sh?1
http://ip.of.camera/cgi-bin/snapshot/temp.jpg
.... or combined
wget http://device/cgi-bin/snapshot.sh?1 && http://device/cgi-bin/snapshot/temp.jpg"
You get bad quality snapshots with this.

Re: rtsp camera in domoticz

Posted: Thursday 27 October 2016 20:24
by Hesmink
Minglarn wrote:It was solved by using snapshots rapidly with php (kinda the same way Domoticz do it).
So in other words your cam must have snapshot function.
My ANRAN ipcam is not supporting JPG snapshots. But there is an undocumented way..

Try:

Code: Select all

http://IP_TO_CAM/webcapture.jpg?command=snap&channel=1
This command also works for an Escam QF001