Rtsp stream support for camera

Did you install it on a raspberry pi?
This executable should be run on the camera, not on the raspberry.

Connect per ssh to the camera try it.

Correct,
1.- I have downloaded and copied “snx_snapshot” in the camera /media/mmcblk0p2/data/usr/bin/ with filezilla (macos)


2.- Replace the line “snx_rtsp_server -W 1920 -H 1080 -Q 10 -b 4096 -a >$LOG 2>&1 &”
with this one:
with “snx_snapshot -m -q 40 -n 1 -W 1920 -H 1080 > $LOG 2>&1 &”
3.- Reboot

But don,t works.


I have tried enter to camera and run the snx_snapshot

ssh [email protected]
[email protected]’s password:
Welcome to XiaoFang Hacks :slight_smile:
~ # snx_snapshot
Illegal instruction
~ #

1 Like

Ok, that’s weird.
I’ll have a look and make sure the file is the correct one

hi there, you must to change the file permission using ssh in the folder /media/mmcblk0p2/data/usr/bin/
using the command “chmod 755 snx_snapshot”
and then reboot and it should work.

1 Like

Hi, I test it but don’t works. When I was copy it was change the permisions to 777 but I was tried to 755 and nothing.


Is possible that snx_snapshot are not correct?

Yep, the file I uploaded is 43853 bits and not 44183 bits like your file. Try downloading and uploading it again, something is wrong with the file you’re using.

Make sure your ftp tool doesn’t modify the file (I used scp to transfer the file to the cam).

Maybe try to set filezilla in binary mode:

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