hkcam icon indicating copy to clipboard operation
hkcam copied to clipboard

rtsp support in hkcam (patch)

Open e1z0 opened this issue 3 years ago • 4 comments

Hello and thank you for the great contribution by supporting the HomeKit in golang world!

I've made h264 rtsp stream as input source support patch, a little bit hacky but in general it works pretty well Patch.: patch -p0 < hkcam-rtsp.patch After compilation use the following parameters to pass the rtsp stream:

./hkcam -input_device rtsp -input_filename "rtsp://admin:[email protected]:554/0/av0" -h264_encoder h264

hkcam-rtsp.patch.zip

e1z0 avatar Sep 13 '20 20:09 e1z0

FWIW I tried it with my IP Camera and it worked great

dbarrosop avatar Nov 14 '20 11:11 dbarrosop

@e1z0 could you submit a pull request so it would out-of-the-box?

bartekpacia avatar May 14 '21 15:05 bartekpacia

Hello, I patched the code files successfully.

How do I generate a new binary for the Raspberry Pi Zero platform?

1lluminaughty avatar Feb 14 '22 20:02 1lluminaughty

Hi ! Thanks for this patch.

@1lluminaughty to answer your question, you can clone the repo and run make build, that should create the binary in the build directory.

I have another question however : what is the preferred option to create the rtsp flux ? I'm using vlc but it seems that it's not the best solution (regarding dropped frames, etc.). Here's my rtsp script

libcamera-vid -t 0 --inline -o - | cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8080/}' :demux=h264

What are the other options for this ? I'm not sure where to look for documentation.

pagbrl avatar Mar 02 '22 14:03 pagbrl