Rtsp stream support for camera

Correct!!! It was my problem! The file uploaded with filezilla was wrong… I try with scp and works great! A lot of thanks!

I Write here the command for someone needs it:

scp snx_snapshot [email protected]:/media/mmcblk0p2/data/usr/bin/

Oh, glad to hear it, I was worried I had uploaded a wrong file :slight_smile:

Next step is trying to get a mpeg stream but I’m afraid the hardware won’t allow it…in the meantime the jpg stream is reliable and working fine for me, didn’t have any problem and the cam is up and running for 10 days :smile:

thank for the info, i tried this snx_snapshot and jpg is working ok.
I was surprised that the rtsp stream still working in VLC but when i’ve tried to use in ffmpeg script it fails with the error
Invalid RTP/JPEG packet. Quantization tables not found.
Received packet without a start chunk; dropping frame.
I will try to use the jpeg stream with ffmpeg script.

this is brilliant thanks… is there anyway to have both the jpeg and rtsp running at the same time? or am I being too greedy? :slight_smile:

The rtsp_stream should not be working, it’s one or the other.

Might be, but that’s above my pay grade ^^

jpeg is brilliant thanks. I just now need to work out how to add it into qnap surveillance station :slight_smile:

1 Like

Any way of saving the snapshopts for X days (example 3 days of snaptshots)?

You’d have to make a script that move the picture in another folder every X seconds and clean the image older than 3 days. The current implementation of snx_snapshot doesn’t offer this possibility.

Thanks for this. It works better than ffmpeg in my HA. It doesn’t crash my HA anymore. However, rtsp:///unicast doesn’t work anymore. I wonder is it possible to make both work? Perhaps a different script for snapshot?

As for now it’s not possible, it might be possible to combine the two, pausing the live stream to capture a frame and restarting it but I guess it would cause other issue.
Starting both of them is not possible as of now.

Add built in rstp support for cameras or live streams.

This is a duplicate of this feature request:

Please implement rtsp stream

Use FFMPEG component for rtsp streams.
You must install ffmpeg and dependencies via apt-get

many thanks. everything is working well now.

Hi, would you mind sharing how to add the ONVIF camera with FFMPEG for rtsp? Thanks

@mischoe
Below if for install on Raspberry pi that does not use Virtual Env

1.install ffmpeg. AKA “avconv”

sudo apt install libav-tools

2.add location of ffmpeg (or avconv) to configuration.yaml file. below location is example only. you must find yours

ffmpeg:
  ffmpeg_bin: /usr/bin/avconv

3.add camera to configuration.yaml file
FYI. There are many android/ios app support ONVIF to find IP cam RTSP address if you do not know this

camera:
  - platform: ffmpeg
    input: rtsp://192.168.0.20:554/live0.264
    name: CAM_1_RTSP

you can run FFMPEG at command line to verify camera playback

10 Likes

It works, thanks for the instructions.

The best explanation I found! Thank you very much. Finally I was able to understand what was wrong in my configuration and my camera is working on RaspberryPI. :joy:

It works well for me but only video. Only camera video home assistant support or audio too?because for now, only camera video work. I tried rtsp url in VLC…audio and video works well! I think that’s a home assistant/ffmpeg problem.