-
-
Notifications
You must be signed in to change notification settings - Fork 228
Tested Configurations
- Locating URL paths for cameras
- Vstarcam C7824WIP
- HOOBS + Reolink RLC-410W + Amcrest IP3M-HX2W + Raspberry Pi 4
- Hikam S5 Raspberry Pi2
- Alptop AT-200B
- Avtech MDR751B DVR
- Avtech AVM542B
- Blue Iris
- MotionEyeOS
- tested Amcrest IP2M-841
- tested ROCAM-NC400HD camera with Raspberry Pi Model B 512Mb RAM - jessie by BonRm
- VESKYS 720P Tilt / Pan, (example)
- ReoLink Camera RLC-410 (example)
- IP Webcam App by Pavel Khlebovich
- Ubiquiti AirCam (Generation 1, firmware v3.1.4.39), RPi 3
- Sannce 1080P IP Cameras
- D-Link ip camera (930L)
- D-Link ip camera (932L)
- D-Link ip camera (934L)
- D-Link ip camera (936L)
- D-Link ip camera (DCS-2332L/DCS-2330L) * Video profile 1 * Video profile 2
- D-Link ip camera (DCS-5222LB1)
- Generic Chinese DVR (Anran DVR)
- Doorbird Video Doorbell - Full
- Doorbird Video Doorbell - Basic
- Raspberry PI 2 ( Jessie ) and Vivotek IP Camera ( CC-8130 )
- Raspberry PI 2 ( Jessie ) and IP Webcam running on an older Samsung Smartphone
- Raspberry PI 3 and Samsung SNH-P6410BN - Samsung SmartCam (firmware 1.08)
- Foscam IQ200 cameras
- Foscam R2
- Foscam FI8910W
- Foscam FI9900EP / FI9826P
- Pelco cameras
- Y-cam Cameras
- Xiaomi Xiaofang (Small White Square) with Raspberry Pi 3 Model B
- Xiaomi Dafang with Raspberry Pi 3 Model B
- Wyzecam V1 with Raspberry Pi 3 Model B Rev 1.2
- WyzeCam V2 with Raspberry Pi 4 Model B
- Raspberry PI Zero W ( Jessie ) and official CAMERA MODULE V2
- Raspberry PI 3B ( Stretch ) and the WaveShare RPi Camera (H)
- IeGeek IP camera with Raspberry Pi 3 Model B
- DBPOWER MEYE-155303-FBACE IPCAM with Raspberry Pi 3 Model B
- Maygion H264 IPCam (Software Version: H.264 6.40) with Raspberry Pi 3 Model B
- Axis M3024-L with Raspberry Pi 3 Model B
- Mobotix M24 with Raspberry Pi 3 Model B
- Logitech HD Pro Webcam C920
- Logitech HD Pro Webcam C920 w/ Raspberry Pi
- Zoneminder
- ZNV IP Cam ZDIE-2121W-N3T-A * config.json
- SecuritySpy for MacOs
- EZVIZ Mini Plus * config.json
- EZVIZ C1C 720P
- Digoo DG-W02F
- V380 Cloudcam
- Pi Camera V2
- eufy Security eufyCam
- UniFi Video G3-Micro
- Official Raspberry Pi camera v1.3 connected to a different Raspberry Pi
- Reolink RLC-422
- August Doorbell Cam V1
- ESP32-Cam
- UNV Uniview Model-NVR301-04LB-P4
- TP-Link C100
- TP-Link C200
- Amcrest IP4M-1026
- Ubiquiti UVC G3
- Amcrest IPM-HX1B with MP4 Passthrough
- SZSINOCAM IP ONVIF
ISpyConnect maintains a large database of camera manufacturers, supported methods (MJPEG, FFMPEG, RTSP), and the necessary URL’s (and querystrings) needed for accessing video, audio, and stills.
If you don’t know, or can’t find this information, start with this website.
- 7 cameras working as expected. Copy vcodec seems smoother but the other option here working fine with ultrafast option chosen
{
"platform": "Camera-ffmpeg",
"cameras": [
{
"name": "Camera Driveway Reolink",
"videoConfig": {
"source": "-rtsp_transport tcp -re -i rtsp://admin:lola9698@192.168.1.241:554/h264Preview_01_main",
"stillImageSource": "-i http://192.168.1.241/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=wuuPhkmUCeI9WG7C&user=admin&password=pwd",
"maxStreams": 2,
"maxWidth": 1280,
"maxHeight": 720,
"maxFPS": 30,
"maxBitrate": 300,
"vcodec": "copy",
"packetSize": 1316,
"audio": false,
"debug": true
}
}
]
},
{
"platform": "Camera-ffmpeg",
"cameras": [
{
"name": "Camera Living Room Amcrest",
"videoConfig": {
"source": "-rtsp_transport tcp -re -i rtsp://user:pwd@192.168.1.221/cam/realmonitor?channel=1&subtype=00&authbasic=YWRtaW46bG9sYTk2OTg=",
"stillImageSource": "-i http://user:pwd@192.168.1.221/cgi-bin/snapshot.cgi?1",
"maxStreams": 2,
"maxWidth": 1280,
"maxHeight": 720,
"maxFPS": 15,
"maxBitrate": 300,
"vcodec": "libx264 -preset ultrafast",
"packetSize": 1316,
"audio": false,
"debug": true
}
}
]
},
- using homebridge-camera-ffmpeg-omx from legotheboss
- removed "-tune zerolatency" from ffmpeg.js (invalid option for my installation)
- low res "rtsp://xxx.xxx.xxx.xxx/onvif2" stream works fine w/ moderate cpu load
- high res "rtsp://xxx.xxx.xxx.xxx/onvif1" stream works w/ cpu load of 150%
- using homebridge-camera-ffmpeg
- authentication for rtsp disabled in camera config
- RaspberryPi seems to work with higher res but chokes
{
"platform": "Camera-ffmpeg",
"cameras": [{
"name": "Crib Camera",
"videoConfig": {
"source": "-re -i rtsp://192.168.88.198/channel1",
"maxStreams": 2,
"maxWidth": 1280,
"maxHeight": 720,
"maxFPS": 20
}
}]
}
Server running on windows 10.
{
“name":
"Entrance Camera",
"videoConfig": {"source":
"-rtsp_transport tcp -re -i rtsp://admin:admin@192.168.1.26/live/h264",
"maxStreams": 1,
"maxWidth": 640,
"maxHeight": 480,
"maxFPS": 30
}
Server on Synology with Docker via oznu's homebridge-syno-spk
{
"name": "AVM542B",
"motion": false,
"manufacturer": "Avtech",
"model": "AVM-542B",
"videoConfig": {
"source": "-rtsp_transport tcp -re -i rtsp://admin:password@192.168.1.1/live/video/profile1",
"maxStreams": 2,
"maxWidth": 1920,
"maxHeight": 1080,
"maxBitrate": 500,
"maxFPS": 5
}
}
If you have a Blue Iris server, you can add any camera with the following configuration:
{
"platform": "Camera-IP",
"cameras": [
{
"name": "My First Camera",
"videoConfig": {
"source": "-re -i http://user:password@serverip/h264/camshortname/temp.ts",
"stillImageSource": "-i http://user:password@serverip/image/camshortname?q=75",
"maxStreams": 2,
"maxWidth": 1280,
"maxHeight": 1024,
"maxFPS": 15
}
}
]
}
- user/password - user with camera view permissions in Blue Iris
- serverip - The IP or hostname of your Blue Iris server
- camshortname - The short name of the camera in Blue Iris
- maxWidth/maxHeight - set to the camera native resolution
For example, you could use the following URL if for user:homebridge, password: password, server: bi.example.com, camshortname: driveway
http://homebridge:password@bi.example.com/h264/driveway/temp.ts
This config reads images from a remote computer (e.g. Raspberry Pi) running MotionEyeOS with default settings, using an IP of 192.168.2.26. If you use MotionEyeOS' fast network camera feature, then you need to change the stillImageSource to the appropriate URL.
{
"platform": "Camera-ffmpeg",
"cameras": [
{"name": "MotionEyeOS",
"videoConfig": {
"source": "-re -f mjpeg -i http://192.168.2.26:8081",
"stillImageSource": "-f mjpeg -i http://192.168.2.26/picture/1/current/",
"maxStreams": 2,
"maxWidth": 1280,
"maxHeight": 800,
"maxFPS": 10
}
}
]
}
Tested from Linux. These camera's aren't that great and have difficulty holding a stream for longer than 30s.
{
"platform": "Camera-ffmpeg",
"cameras": [
{
"name": "Nursery Camera",
"videoConfig": {
"source": "-xerror -rtsp_transport tcp -i rtsp://username:password@10.0.1.5/cam/realmonitor?channel=1&subtype=0 -c:a aac -b:a 128k -c:v libx264 -b:v 2500k -preset superfast",
"stillImageSource": "-i http://username:password@10.0.1.5/cgi-bin/snapshot.cgi",
"maxStreams": 2,
"maxWidth": 1280,
"maxHeight": 720,
"maxFPS": 30
}
}
]
}
{
"platform":"Camera-ffmpeg",
"cameras":[
{
"name":"Camera Rocam-NC400HD",
"videoConfig":{
"source":"-re -i http://IPADDRESS:PORT/videostream.cgi?loginuse=ADMIN&loginpas=PASSWORD",
"stillImageSource":"-i http://IPADDRESS:PORT/snapshot.cgi?user=ADMIN&pwd=PASSWORD",
"maxStreams":2,
"maxWidth":1280,
"maxHeight":720,
"maxFPS":30
}
}
]
}
VESKYS 720P Tilt / Pan, (example)
{
"platform":"Camera-ffmpeg",
"cameras":[
{
"name":"Veskys Camera",
"videoConfig":{
"source":"-rtsp_transport tcp -i rtsp://admin:PASSWORD@IPADDRESS:10554/tcp/av0_0 -map 0",
"stillImageSource":"-i http://IPADDRESS:81/snapshot.cgi?user=admin&pwd=PASSWORD",
"maxStreams":2,
"maxWidth":1280,
"maxHeight":720,
"maxFPS":30
}
}
]
}
Notes: Replace IPADDRESS, PASSWORD with your data. I could not get this working with RPi and ffmpeg-omx, but working successfully on a macOS installation
ReoLink Camera RLC-410 (example) (Should work with all ReoLink-Cams supporting RTSP)
{
"platform":"Camera-ffmpeg",
"cameras":[
{
"name":"ReoLink",
"videoConfig":{
"source": "-rtsp_transport tcp -i rtsp://USER:PASSWORD@XXX.XXX.XXX.XXX:XXX/h264Preview_01_main",
"stillImageSource": "-i http://XXX.XXX.XXX.XXX:XXXX/image.jpeg",
"maxStreams":2,
"maxWidth":1280,
"maxHeight":720,
"maxFPS":30
}
}
]
}
Notes: Replace IPADRESS, PASSWORD etc with your values. Port stays the same for usual. For the stillImageSource I used a motioneyeos implementation, but you can just use a snapshot image of the Reolink camera or don't use stillImageSource (it is optional) You can install omx.
Working through http
{
"name":"Bedroom",
"videoConfig":{
"source":"-re -i http://src/video -i http://src/audio.opus",
"stillImageSource":"-i http://src/shot.jpg",
"maxStreams":2,
"maxWidth":640,
"maxHeight":480,
"maxFPS":30,
"audio": true,
"mapvideo": "0",
"mapaudio": "1"
}
},
Working without Ubiquiti NVR (running software UniFi Video), available on [Ubiquiti site] (https://www.ubnt.com/download/unifi-video/) or via a direct RTSP connection to camera (older firmware, via ffmpeg).
Using https://github.com/legotheboss/homebridge-camera-ffmpeg-omx fork for RPi 3 support.
{
"name":"Driveway",
"videoConfig":{
"source":"-rtsp_transport http -re -i rtsp://domain:port/4a1baa33-31a8-52f3-5524-12345aa111a7_0",
"maxStreams":2,
"maxWidth":1270,
"maxHeight":720,
"maxFPS":15
}
}
- The RTSP stream can come from cameras or UniFi Video server (probably from the NVR too).
- Works remotely if you have Apple TV 4/iPad setup as a homekit hub.
- Running homebridge on Raspberry Pi 3.
- Streaming startup takes ~10s, thumbnails get generated automatically.
Purchased as a set of 4 with an NVR (no HD), available on [Amazon.ca] (https://www.amazon.ca/gp/product/B01ABRSM8S/ref=oh_aui_detailpage_o09_s00?ie=UTF8&psc=1) (Model POE-1080P-4CH)
{
"name":"Sannce",
"videoConfig":{
"source":"-rtsp_transport tcp -re -i rtsp://192.168.1.100/user=name_password=pass_channel=1_stream=0.sdp?real_stream",
"maxStreams":2,
"maxWidth":1920,
"maxHeight":1080,
"maxFPS":30
}
}
- The IP address can be the cameras themselves, or the NVR.
- You can specify different cameras from the NVR IP by incrementing the
channel
number.
- You can specify different cameras from the NVR IP by incrementing the
- Adding the
-rtsp_transport tcp
option greatly improved the video performance and quality for me.- Without it, stream would take a long time to load, stutter frequently, and would often be covered in streaks and artifacts.
- Anyone looking to improve the output of similar IP cameras should also look at ffmpeg's RTSP-specific options
- I found that the quality of the stream would suffer when multiple devices were streaming straight from the cameras/NVR, so I've set up an RTSP proxy on the same machine running
homebridge-camera-ffmpeg
- I'm running
homebridge-camera-ffmpeg
and its own instance ofhomebridge
in a docker container using themarcoraddatz/homebridge
image.- This required installing ffmpeg from the
jessie-backports
apt source inside the container.
- This required installing ffmpeg from the
Tested on Raspberry Pi 3 (with omx)
{
"name": "D-Link Camera",
"videoConfig": {
"source": "-re -f mjpeg -i http://admin:password@localip:port/video.cgi",
"stillImageSource": "-f mjpeg -i http://admin:password@localip:port/image.jpg",
"maxStreams": 2,
"maxWidth": 640,
"maxHeight": 480,
"maxFPS": 20
}
}
Works on Mac Mini core i5, Raspberry Pi 3 (with and without omx)
{
"name":"D-Link Camera",
"videoConfig":{
"source":"-re -f mjpeg -i http://admin:password@10.0.1.101/mjpeg.cgi -i http://admin:password@10.0.1.101/audio.cgi",
"stillImageSource":"-f mjpeg -i http://admin:password@10.0.1.101/mjpeg.cgi",
"maxStreams":2,
"maxWidth":640,
"maxHeight":480,
"maxFPS":30
}
},
Tested on Raspberry Pi 3 (with omx)
{
"name": "D-Link Camera",
"videoConfig": {
"source": "-re -f mjpeg -i http://admin:password@localip:port/video.cgi",
"stillImageSource": "-f mjpeg -i http://admin:password@localip:port/image/jpeg.cgi",
"maxStreams": 2,
"maxWidth": 640,
"maxHeight": 480,
"maxFPS": 20
}
}
Works on Raspberry Pi 3 (only with omx)
{
"name":"D-Link Camera",
"videoConfig":{
"source":"-rtsp_transport tcp -i rtsp://admin:password@10.0.1.101:554/play1.sdp",
"stillImageSource":"-i http://admin:password@10.0.1.101/image/jpeg.cgi",
"maxStreams":2,
"maxWidth":1280,
"maxHeight":720,
"maxFPS":30,
"vcodec": "h264_omx"
}
},
Works for both DCS-2332L and DCS2330L on Mac Mini late 2009 (MacOS El Capitan 10.11.6). The video profiles for the cameras are set as below in the web interface.
- H.264
- Frame size/view window area 1280x720
- Max frame rate 25
- Video quality fixed/excellent
- JPEG
- Frame size/view window area 1280x720
- Max frame rate 25
- Video quality fixed/good
{
"name":"D-Link Camera",
"videoConfig":{
"source": "-re -i http://user:password@192.168.0.1/video2.mjpg",
"stillImageSource": "-i http://user:password@192.168.0.1/image/jpeg.cgi?profileid=1",
"maxStreams": 2,
"maxWidth": 1280,
"maxHeight": 720,
"maxFPS": 30
}
},
Notes: Replace IPADDRESS XX.XX.XX.XX, USER and PASSWORD with your data.
{
"name": "D-LINK CAMERA",
"cameras": [
{
"name": "DCS-5222LB",
"videoConfig": {
"source": "-rtsp_transport tcp -i rtsp://USER:PASSWORD@XX.XX.XX.XX/live1.sdp",
"stillImageSource": "-i http://USER:PASSWORD@XX.XX.XX.XX/image/jpeg.cgi",
"maxStreams": 4,
"maxWidth": 1280,
"maxHeight": 720,
"maxFPS": 30,
"maxBitrate": 300,
"vcodec": "h264_omx",
"packetSize": 564,
"audio": true,
"debug": false
}
}
],
"platform": "Camera-ffmpeg"
},
This works perfectly with a properly powered computer (my Mac mini i5). I am also having the DVR send motion emails to the smtpsensor plugin. This triggers a motion sensor for the area and immediately sends a homekit notification with a clip from the camera.
{
"platform":"Camera-ffmpeg",
"cameras":[
{
"name":"Outside Front",
"videoConfig":{
"source":"-re -i rtsp://10.0.1.93:554/user=admin&password=XXXXXX&channel=1&stream=0.sdp?real_stream--rtp-caching=100",
"stillImageSource":"-re -i rtsp://10.0.1.93:554/user=admin&password=XXXXXX&channel=1&stream=1.sdp?real_stream--rtp-caching=100",
"maxStreams":2,
"maxWidth":1280,
"maxHeight":720,
"maxFPS":50
}
},
{
"name":"Outside Rear",
"videoConfig":{
"source":"-re -i rtsp://10.0.1.93:554/user=admin&password=XXXXXX&channel=2&stream=0.sdp?real_stream--rtp-caching=100",
"stillImageSource":"-re -i rtsp://10.0.1.93:554/user=admin&password=XXXXXX&channel=2&stream=1.sdp?real_stream--rtp-caching=100",
"maxStreams":2,
"maxWidth":1280,
"maxHeight":720,
"maxFPS":50
}
}
]
}
This is a more complete set of settings for the Doorbird Video Doorbell based on the latest API and specs. The Doorbird video camera is 720p, capable of up to 15fps. Doorbird supports at most one live connection at a time currently. These settings use RTSP for speed / efficiency, but you can switch to HTTP if you prefer, though I wouldn't expect most people to want / need to. RTSP tends to be the standard for IP cameras. I would recommend looking at the homebridge-doorbird plugin as well to enable HomeKit doorbell integration on your Doorbird.
{
"platform":"Camera-ffmpeg",
"cameras":[
{
"name":"Doorbird Camera",
"videoConfig":{
"source":"-re -i rtsp://<username>:<password>@<doorbird_ip>:554/mpeg/media.amp",
"stillImageSource":"-i http://<username>:<password>@<doorbird_ip>/bha-api/image.cgi",
"maxStreams":1,
"maxWidth":1280,
"maxHeight":720,
"maxFPS":15
}
}
]
}
This works for me, it's for a Doorbird Video Doorbell, which I think uses the same hardware or at least same connection method as a Axis IP camera.
{
"platform":"Camera-ffmpeg",
"cameras":[
{
"name":"Front Door Camera",
"videoConfig":{
"source":"-re -i http://192.168.1.100:80/bha-api/video.cgi?http-user=username&http-password=password",
"maxStreams":2,
"maxWidth":640,
"maxHeight":480,
"maxFPS":3
}
}
]
}
To resolve playback issues I had to use the OMX fork to get the PI 2 and FFMPEG to work more or less reliably. https://github.com/legotheboss/homebridge-camera-ffmpeg-omx
the settings for Media->Video->Stream 2 to
JPEG
Frame Size 1280x800
Maximum frame rate 30
Video Quality: Fixed
Video Quality: Excellent
Maximum bit rate 40 Mbps
{
"platform":"Camera-ffmpeg",
"cameras":[
{
"name":"Office Camera",
"videoConfig":{
"source":"-re -i http://login:password@192.168.1.98/video2.mjpg",
"stillImageSource":"-f mjpeg -i http://login:password@192.168.1.98/cgi-bin/viewer/video.jpg",
"maxStreams":2,
"maxWidth":1920,
"maxHeight":1080,
"maxFPS":30
}
}
]
}
To resolve playback issues I had to use the OMX fork to get the PI 2 and FFMPEG to work more or less reliably. https://github.com/legotheboss/homebridge-camera-ffmpeg-omx
Video Resolution: 1920x1080
Photo Resolution: 2048x1152
{
"platform":"Camera-ffmpeg",
"cameras":[
{
"name":"Front Porch Camera",
"videoConfig":{
"source":"-f mjpeg -i http://alice:8080/video",
"stillImageSource":"-i http://alice:8080/shot.jpg",
"maxStreams":2,
"maxWidth":1920,
"maxHeight":1080,
"maxFPS":30
}
}
]
}
I had to use the OMX fork to get the PI 3 and FFMPEG to work more or less reliably. https://github.com/legotheboss/homebridge-camera-ffmpeg-omx
I disabled WDR on the camera via the iOS app to get better frame rates at higher quality for my BlueIris setup using profile 5.
rtsp://username:password@IPAddress:554/profile5/media.smp
For the PI 3 I ended up using profile 2.
rtsp://username:password@IPAddress:554/profile2/media.smp
If you don't use the HD quality profile 5 or don't need/want higher frame rates when using it then you can experiment with WDR ON or OFF for your setup.
There are also other profiles to try: rtsp://username:password@IPAddress:554/profile3/media.smp rtsp://username:password@IPAddress:554/profile4/media.smp rtsp://username:password@IPAddress:554/profile6/media.smp
{
"platform":"Camera-ffmpeg",
"cameras":[
{
"name":"CamNameHere",
"videoConfig":{
"source":"-re -i rtsp://username:password@ipaddress:554/profile2/media.smp",
"maxStreams":2,
"maxWidth":640,
"maxHeight":360,
"maxFPS":15
}
}
]
}
Working through RTSP
{
"platform":"Camera-ffmpeg",
"cameras":[
{
"name":"Camera",
"videoConfig":{
"source":"-re -i rtsp://username:password@192.168.31.51:88/videoMain",
"stillImageSource":"-i http://username:password@192.168.31.51:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=username&pwd=password&",
"maxStreams":2,
"maxWidth":1280,
"maxHeight":720,
"maxFPS":30
}
}
]
}
Working through RTSP
{
"platform": "Camera-ffmpeg",
"cameras": [
{
"name": "Camera",
"videoConfig": {
"source": "-re -i rtsp://user:pass@10.0.1.132:47082/videoMain",
"stillImageSource": "-i http://10.0.1.132:47082/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=user&pwd=pass&",
"maxStreams": 2,
"maxWidth": 1280,
"maxHeight": 720,
"maxFPS": 30
}
} ] }
Streaming via http
{
"platform": "Camera-ffmpeg",
"cameras": [
{
"name": "Camera",
"videoConfig": {
"source": "-re -i http://user:pass@10.0.1.131:8090/videostream.asf?user=user&pwd=pass&resolution=320x240",
"stillImageSource": "-i http://user:pass@10.0.1.131:8090/snapshot.jpg?user=user&pwd=pass&strm=0",
"maxStreams": 2,
"maxWidth": 1280,
"maxHeight": 720,
"maxFPS": 30
}
} ] }
Working through RTSP on RaspberryPi
{
"platform":"Camera-ffmpeg",
"cameras":[
{
"name":"Camera",
"videoConfig":{
"source":"-rtsp_transport tcp -re -i rtsp://username:password@XXX.XXX.XXX.XXX:port/videoSub",
"stillImageSource":"-i http://username:password@XXX.XXX.XXX.XXX:port/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=username&pwd=password",
"maxStreams": 2,
"maxWidth": 1280,
"maxHeight": 720,
"maxFPS": 10,
"maxBitrate": 300,
"vcodec": "h264_omx",
"audio": false,
"packetSize": 1316,
"debug": false
}
}
]
}
- Replace XXX.XXX.XXX.XXX:port with the IP Address and port, ie: 192.168.0.10:88
- For the source, use either “videoSub” or “videoMain” to select the sub or main stream
- Runs smoothly on a RaspberryPi 2 Model B or RaspberryPi 3 Model B+, with the MPEG-omx codec enabled
- Without the “-rtsp_transport tcp”, the live feed stutters, so make sure it’s added
Working through RTSP
Pelco cameras have two streams rtsp//camera-ip/stream1
and rtsp//camera-ip/stream2
In my example below I use a Sarix Pro IBP519 and use the second stream from the camera. I have configured the stream to be 640x480 and 12ips but in the config.json you see that I use 30ips and this is that HomeBridge working this way. I took my second camera IME219 and to get the jpeg to work in this I needed to change the stillImageSource
to be -f mjpeg -i http://192.168.5.33/jpeg
{
"platform":"Camera-ffmpeg",
"cameras":[
{
"name":"Baksidan",
"videoConfig":{
"source":"-re -i rtsp://192.168.5.34/stream2",
"stillImageSource":"-i http://192.168.5.34/jpeg",
"maxStreams":2,
"maxWidth":640,
"maxHeight":480,
"maxFPS":30
}
}
]
}
Working through RTSP
This applies to the Y-Cam Cube HD1080 & Y-Cam Bullet HD1080. These are a few years old, not the current generation. These cameras have 3 Stream types; Primary (Stream "live/0"), Secondary (Stream "live/1"), and Mobile Stream (Stream "live/2"). The Primary has higher resolution(image size) options. The mobile is designed for streaming with low-bandwidth. I have my configuration setup to use the Primary stream at 1920x1080, 18 fps, MJPEG & JPEG Snapshot Quality set to 90. I enabled authentication, but this can be disabled. For the Preview image (stillImageSource) to work, I had to add the "-f mjpeg" to the stream. Away from home, I get very good image/video quality.'
It may be worth mentioning, there are several streams available coming from the Y-Cam. This is by default and they are all on all the time. I tested them all, and had better image quality away from home using the RTSP MJPEG stream.
- RTSP H.264 stream: rtsp://ip_address/live/0/h264.sdp
- RTSP MPEG4 stream: rtsp://ip_address/live/0/mpeg4.sdp
- RTSP MJPEG stream: rtsp://ip_address/live/0/mjpeg.sdp
- RTSP audio stream: rtsp://ip_address/live/0/audio.sdp
- HTTP M3U8 stream: http://ip_address/live/0/h264.m3u8
- HTTP MJPEG stream: http://ip_address/live/0/mjpeg.jpg
- HTTP ASF stream: http://ip_address/live/0/mpeg4.asf
- HTTP snapshot image: http://ip_address/live/0/jpeg.jpg
{
"platform":"Camera-ffmpeg",
"cameras":[
{
"name":"Y-Cam",
"videoConfig":{
"source":"-rtsp_transport tcp -re -i rtsp://user:pass@ip:554/live/0/mjpeg.sdp",
"stillImageSource":"-f mjpeg -i http://user:pass@ip:554/live/0/mjpeg.jpg",
"maxStreams":2,
"maxWidth":1920,
"maxHeight":1080,
"maxFPS":30
}
}
]
}
Note: I applied Fang-Hacks to the camera to enable the RTSP stream.
I also reduced the RTSP output to 720p which is helpful when your Wi-Fi link is not great.
{
"platform":"Camera-ffmpeg",
"cameras":[
{
"name":"Camera 1",
"videoConfig":{
"source":"-rtsp_transport tcp -i rtsp://ip-address/unicast",
"stillImageSource":"-i rtsp://ip-address/unicast -vframes 1 -r 1",
"maxStreams":2,
"maxWidth":720,
"maxHeight":480,
"maxFPS":10,
"vcodec":"h264_omx"
}
}
]
}
Note: Dafang-Hacks Enable the RTSP stream.
Reduced the RTSP output to 720p which is helpful when your Wi-Fi link is not great. Remove the "-rtsp_transport tcp" if you got FFMpeg Zombie's
I run this config for my 3 Cams.
{
"platform":"Camera-ffmpeg",
"cameras":[
{
"name":"Camera 1",
"videoConfig":{
"source":"-rtsp_transport tcp -i rtsp://ip-address/unicast",
"stillImageSource":"-rtsp_transport tcp -i rtsp://ip-address/unicast -vframes 1 -r 1",
"maxStreams":5,
"maxWidth":1280,
"maxHeight":720,
"maxFPS":25,
"vcodec":"h264_omx"
}
}
]
}
Replica of the Xiaomi Xiaofang (Small White Square)
Note: I used the homebridge-camera-ffmpeg-omx plugin (https://github.com/legotheboss/homebridge-camera-ffmpeg-omx) along with OpenIPC v0.2.4 for Wyze V1 (https://github.com/openipcamera/openipc-firmware) which is forked from Fang-Hacks(https://github.com/samtap/fang-hacks)
The rest of the config.json
file is similar to the above Xioami Xiaofang config.json
{
"platform": "Camera-ffmpeg-omx",
"cameras": [
{
"name": "Garage Camera",
"videoConfig": {
"source": "-re -i rtsp://192.168.2.128/unicast",
"stillImageSource": "-i rtsp://192.168.2.128/unicast -vframes 1 -r 1",
"maxStreams": 2,
"maxWidth": 1920,
"maxHeight": 1080,
"maxFPS": 30
}
}
]
}
As described in this blog post, I was able to get the WyzeCam V2 streaming to HomeKit with no transcoding and no custom compiling required using the following settings.
{
"platform": "Camera-ffmpeg",
"cameras": [
{
"name": "Wyze Cam",
"videoConfig": {
"source": "-i rtsp://username:password@192.168.0.100/live",
"stillImageSource": "-i rtsp://username:password@192.168.0.100/live -vframes 1 -r 1",
"vcodec": "copy"
}
}
]
}
I had to build ffmpeg with "--enable-libx264" to be able to use the "-tune zerolatency" from ffmpeg.js, and with "--enable-omx" and "--enable-omx-rpi" to use the GPU encoding
I had to remove from the homebridge-camera-ffmpeg code (ffmpeg.js) the resolution and scale for stillImage and videoStream to switch back to GPU encoding, and I now get a decent 10~20 FPS with pretty good video quality and ffmpeg using ~12% CPU on the pi zero
Still image sometimes don't refresh in homekit App : Need to reboot the iPhone to get it back ...
config.json (credits @GeorgViehoever )
{
"platform": "Camera-ffmpeg",
"cameras": [
{
"name": "piCam",
"uploader": false,
"videoConfig": {
"source": "-re -f video4linux2 -i /dev/video0",
"stillImageSource": "-re -f video4linux2 -ss 0.9 -i /dev/video0 -vframes 1",
"maxStreams": 2,
"maxWidth": 1920,
"maxHeight": 1080,
"maxFPS": 30,
"vcodec": "h264_omx"
}
}
]
}
Configurations using the following video codec as per the vcodec
parameter:
-
copy
codec for streaming with much higher quality but with a downside that you must specify the target video resolution for your iOS/MacOS device by updating thevideo_size
parameter. This seems to work intermittently for some reason. -
h264
codec for streaming with good quality but using more processor power -
h264_omx
codec for streaming with minimal processing power but with lower quality
The resolution in the example configuration below has been tested to work for iPhone, iPad and MacOS. It is confirmed not to work for Apple Watch.
The -timestamps abs
ffmpeg command can be removed if for some reason streaming doesn't work - which is intermittent.
{
"cameras": [
{
"name": "Pi 3B Camera",
"motion": true,
"switches": true,
"videoConfig": {
"source": "-re -r 30 -video_size 1920x1080 -f video4linux2 -input_format h264 -i /dev/video0 -copyts -timestamps abs",
"stillImageSource": "-video_size 1920x1080 -f video4linux2 -i /dev/video0 -ss 1.5",
"maxStreams": 2,
"maxFPS": 30,
"vcodec": "copy",
"audio": false,
"vflip": false,
"hflip": false,
"debug": true
}
}
],
"platform": "Camera-ffmpeg"
}
{
"cameras": [
{
"name": "Pi 3B Camera",
"motion": true,
"switches": true,
"videoConfig": {
"source": "-re -r 30 -video_size 1920x1080 -f video4linux2 -input_format h264 -i /dev/video0 -crf 18 -threads 3",
"stillImageSource": "-video_size 1920x1080 -f video4linux2 -i /dev/video0 -ss 1.5",
"maxStreams": 2,
"maxFPS": 30,
"vcodec": "h264",
"audio": false,
"vflip": false,
"hflip": false,
"debug": true
}
}
],
"platform": "Camera-ffmpeg"
}
{
"cameras": [
{
"name": "Pi 3B Camera",
"motion": true,
"switches": true,
"videoConfig": {
"source": "-re -r 30 -video_size 1920x1080 -f video4linux2 -input_format h264 -i /dev/video0",
"stillImageSource": "-video_size 1920x1080 -f video4linux2 -i /dev/video0 -ss 1.5",
"maxStreams": 2,
"maxFPS": 30,
"maxBitrate": 500000000,
"vcodec": "h264_omx",
"audio": false,
"vflip": false,
"hflip": false,
"debug": true
}
}
],
"platform": "Camera-ffmpeg"
}
You can also use "rtsp://ip-address/11" for HQ-Stream.
{
"platform": "Camera-ffmpeg",
"cameras": [
{
"name": "Camera",
"videoConfig": {
"source": "-rtsp_transport tcp -re -i rtsp://ip-address/12",
"stillImageSource": "-i http://username:password@ip-address/tmpfs/auto.jpg",
"maxStreams": 2,
"maxWidth": 640,
"maxHeight": 352,
"maxFPS": 5,
"vcodec": "h264_omx"
}
}
]
}
No rtsp streams available - all via MJPEG...
{
"platform":"Camera-ffmpeg",
"cameras":[
{
"name":"DBPower",
"videoConfig":{
"source":"-re -i http://[USER]:[PASSWORD]@ip-address:81/videostream.cgi",
"stillImageSource":"-i http://ip-address:81/snapshot.cgi?user=[USER]&pwd=[PASSWORD]",
"maxStreams":2,
"maxWidth":640,
"maxHeight":480,
"maxFPS":16,
"vcodec":"h264_omx"
}
}
]
}
MPEG Snapshot & RTSP Stream
{
"platform":"Camera-ffmpeg",
"cameras":[
{
"name":"Maygion",
"videoConfig":{
"source":"-re -i rtsp://[USER]:[PASSWORD]@ip-address:81/videostream.cgi",
"stillImageSource":"-i http://ip-address:81/snapshot.cgi?user=[USER]&pwd=[PASSWORD]",
"maxStreams":2,
"maxWidth":1280,
"maxHeight":720,
"maxFPS":16,
"vcodec":"h264_omx"
}
}
]
}
{
"platform":"Camera-ffmpeg",
"cameras":[
{
"name": "Axis M3024-L",
"videoConfig": {
"source": "-rtsp_transport tcp -i rtsp://user:password@192.168.100.100:554/axis-media/media.amp?streamprofile=Media?tcp",
"stillImageSource": "-i http://user:password@192.168.100.100/axis-cgi/jpg/image.cgi",
"maxStreams": 3,
"maxWidth": 1920,
"maxHeight": 1080,
"maxFPS": 30,
"vcodec":"h264_omx"
}
}
]
}
{
"platform":"Camera-ffmpeg",
"cameras":[
{
"name": "Mobotix M24",
"videoConfig": {
"source": "-f mxg -i http://user:password@192.168.100.100/control/faststream.jpg?stream=MxPEG",
"stillImageSource": "-i http://user:password@192.168.100.100/cgi-bin/image.jpg",
"maxStreams": 3,
"maxWidth": 1920,
"maxHeight": 1080,
"maxFPS": 30
}
}
]
}
macOS (High Sierra), ffmpeg compiled through macports. Demonstrates use of avfoundation stream. I had to limit the video stream size and frame rate otherwise ffmpeg throws an input/output error.
"platform": "Camera-ffmpeg",
"cameras": [
{
"name": "macCam",
"uploader": true,
"videoConfig": {
"source": "-re -f avfoundation -video_size 640x480 -framerate 30 -i 0",
"stillImageSource": "-re -f avfoundation -video_size 640x480 -framerate 30 -ss 0.9 -i 0 -vframes 1",
"maxStreams": 2,
"maxWidth": 640,
"maxHeight": 480,
"maxFPS": 30,
"vcodec": "h264",
"debug": true
}
}
]
I set up a Rpi1 with the camera and stream using v4l2rtspserver. Install a webserver (Apache / I use Lighttpd) and use this command to take a screenshot every 5 seconds from the stream for faster still image captures (also running on the pi1):
ffmpeg -f rtsp -vcodec h264_mmal -i rtsp://127.0.0.1:8555/unicast -vf fps=fps=1/5 -f image2 -update 1 /var/www/html/latest.jpg
Transcoding happens on a Rpi3. You might get everything to work on one Rpi3. Results in delay of about 50-200ms, Video takes ~10 Seconds to start streaming due to h264_mmal and h264_omx, hangs sometimes.
With Audio:
v4l2rtspserver -c -Q 512 -s -F 0 -H 720 -W 1280 -I 0.0.0.0 -P 8555 -A 32000 -C 2 /dev/video0,plughw:CARD=C920
Video Only:
v4l2rtspserver -c -Q 512 -s -F 0 -H 720 -W 1280 -I 0.0.0.0 -P 8555 /dev/video0
"platform": "Camera-ffmpeg",
"cameras": [
{
"name": "C920",
"videoConfig": {
"source": "-f rtsp -vcodec h264_mmal -i rtsp://rpi:8555/unicast",
"stillImageSource": "-i http://rpi/latest.jpg",
"maxStreams": 2,
"maxWidth": 1280,
"maxHeight": 720,
"maxFPS": 30,
"maxBitrate": 300,
"vcodec": "h264_omx",
"audio": true,
"packetSize": 188,
"debug": false
}
}
]
works pretty well with zoneminder, using the ZM 'nph-zms' urls. Since the stream is already "cleaned up", it's pretty fast starting the stream as well. If you have a decent zoneminder setup (on a beefy server, since you need that anyway for motion detection), just run homebridge-camera-ffmpeg straight there.
{
"name": "Sideyard Cam",
"videoConfig": {
"source": "-re -i http://localhost/zm/cgi-bin/nph-zms?mode=jpeg&monitor=<zm monitor id>&scale=100&maxfps=15&buffer=1000&user=<zm user>&pass=<zm passwd>",
"stillImageSource": "-i http://localhost/zm/cgi-bin/nph-zms?mode=single&monitor=<zm monitor id>&scale=100&user=<zm user>&pass=<zm passwd>",
"maxStreams": 2,
"maxWidth": 1280,
"maxHeight": 720,
"maxFPS": 15,
"debug": true
}
}
Frame Rate:
- Master: 1280×960@25/30fps, 1280×720@25/30fps
- Slave: 704×576@25/30fps, 640×480@25/30fps
{
"platform": "Camera-ffmpeg",
"cameras": [
{
"name": "ZNVCam",
"uploader": false,
"videoConfig": {
"source": "-rtsp_transport tcp -re -I rtsp://<admin>:<password>@192.168.0.254:554/ch0_0.h264",
"maxStreams": 2,
"maxWidth": 1280,
"maxHeight": 720,
"packetSize": 188,
"maxFPS": 30,
"maxBitrate": 300,
"debug": false
}
}
]
}
The great thing about this is, if SecuritySpy supports your camera (which is an extensive list) then you should be able to get it working within Homebridge. So you can add multi-random cameras and only have to worry about getting the config right once.
{
"platform": "Camera-ffmpeg",
"cameras": [
{
"name": "Security Cam 0",
"videoConfig": {
"source": "-i http://<SecurityspyUsername>:<SecurityspyPassword>@<SecurityspyIP>:<SecurityspyPort>/++hls?cameraNum=0&codec=h264&width=1280&height=720",
"stillImageSource": "-i http://<SecurityspyUsername>:<SecurityspyPassword>@<SecurityspyIP>:<SecurityspyPort>/++image?cameraNum=0&width=480&height=270",
"maxStreams": 2,
"maxWidth": 1280,
"maxHeight": 720,
"maxFPS": 30
},
{
"name": "Security Cam 1",
"videoConfig": {
"source": "-i http://<SecurityspyUsername>:<SecurityspyPassword>@<SecurityspyIP>:<SecurityspyPort>/++hls?cameraNum=1&codec=h264&width=1280&height=720",
"stillImageSource": "-i http://<SecurityspyUsername>:<SecurityspyPassword>@<SecurityspyIP>:<SecurityspyPort>/++image?cameraNum=1&width=480&height=270",
"maxStreams": 2,
"maxWidth": 1280,
"maxHeight": 720,
"maxFPS": 30
}
]
}
Great little cams - small, unobtrusive with good pic and great low light / IR capability. Not expensive either. Oh and 5Ghz wifi compatible. Add the cameras in the EZVIZ application downloaded from the app store, so that you can register them on them on your network, and change any settings required. Untick any cloud trials etc etc.
Camera password is the 6 character verification code printed on the back of each camera.
"platform": "Camera-ffmpeg",
"cameras": [
{
"name": "YOUR CAMERA NAME",
"videoConfig": {
"source": "-rtsp_transport tcp -vcodec h264_mmal -i rtsp://admin:password@nn.nn.nn.nn/Streaming/Channels/1",
"stillImageSource": "-i rtsp://admin:password@nn.nn.nn.nn/Streaming/Channels/1/picture",
"maxStreams": 2,
"maxWidth": 1920,
"maxHeight": 1080,
"maxBitrate": 500,
"vcodec": "h264_omx",
"maxFPS": 15,
"audio": true,
"packetSize": 564
}
}
Everithing just said about the Ezviz mini plus model is true for the C1C but with a 1280x720 pixel resolution.
Camera password is the 6 character verification code printed on the back of each camera, too. Sorry, I haven't found a StillImageSource valid string yet
"platform": "Camera-ffmpeg",
"cameras": [
{
"name": "CAMERA NAME",
"videoConfig": {
"source": "-re -i rtsp://admin:password@nn.nn.nn.nn:554/h264_stream",
"maxStreams": 2,
"maxWidth": 1280,
"maxHeight": 720,
"vcodec": "h264_omx"
}
}
]
Working through RTSP on RaspberryPi
{
"platform":"Camera-ffmpeg",
"cameras":[
{
"name" : "Digoo",
"videoConfig" : {
"vcodec" : "h264_omx",
"source" : "-re -i rtsp://XXX.XXX.XXX.XXX",
"maxFPS" : 25,
"maxHeight" : 720,
"maxStreams" : 2,
"maxWidth" : 1280
}
}
]
}
Need to patch the firmware to activate RTSP on port 554.
Solution found here
I found the solution after talking with the support team of these cameras. It is necessary to upgrade the firmware of the camera to open the onvif ports. Download files here
- Unzip the files
- Copy the files to the root of the microSD
- Restart the camera
- Wait until the update finishes, listening if you have a horn or watching the LEDs
- Check that the 554 port has been opened
- Delete the SD update files
{
"platform":"Camera-ffmpeg",
"cameras":[
{
"name" : "V380",
"videoConfig" : {
"vcodec" : "h264_omx",
"source" : "-re -i rtsp://admin:password@XXX.XXX.XXX.XXX/live/ch00_1",
"maxFPS" : 25,
"maxHeight" : 720,
"maxStreams" : 2,
"maxWidth" : 1280
}
}
]
}
/live/ch00_1 : 1280x720
/live/ch00_0 : 640x480
The dedicated homebridge-rpi-camera plugin makes the ffmpeg process crash for me.
According to this comment, this adapted config work smoothly.
{
"platform": "Camera-ffmpeg",
"cameras": [
{
"name": "Pi Cam",
"videoConfig": {
"source": "-re -r 6 -s 1280x720 -f video4linux2 -i /dev/video0",
"stillImageSource": "-s 1280x720 -f video4linux2 -i /dev/video0",
"maxStreams": 2,
"maxWidth": 1280,
"maxHeight": 720,
"maxFPS": 6,
"vcodec": "h264_omx"
}
}
]
}
A wireless camera system that records locally and supports RTSP. Love it! Tested with the original eufyCam not the eufyCam E (but they should work too).
{
"platform": "Camera-ffmpeg",
"cameras": [
{
"name": "Back Yard",
"videoConfig": {
"source": "-re -i rtsp://192.168.x.x:554/live0",
"maxStreams": 2,
"maxWidth": 1920,
"maxHeight": 1080,
"videoFilter": "scale=1280:720"
}
}
]
}
- RTSP streams with these cameras only show after the camera senses motion and broadcasts the stream - no way to trigger it from Home app. To get going you'll need to trigger motion by moving in front of the camera.
- You'll need to have configured RTSP in your iOS app and noted your URL's for each camera. Instructions for RTSP setup are here - just ignore the NAS part https://community.anker.com/t/how-to-setup-rtsp-on-eufycam-to-stream-video-to-your-compatible-nas/64833
Audio and video working on a Raspberry Pi 3 Model B using the instructions here. "source" is from UniFi Protect (medium RTSP URL) hosted on an UniFi Cloud Key G2+ and "stillImageSource" is directly from camera. Connection takes less than 10 seconds.
{
"name": "UniFi-G3-Micro",
"videoConfig": {
"source": "-re -rtsp_transport tcp -i rtsp://UNIFI_CLOUD_KEY_G2_IP:PORT/UNIQUE_ID",
"stillImageSource": "-i http://UNIFI_CAMERA_IP/snap.jpeg",
"additionalCommandline": "-preset slow -profile:v high -level 4.2 -x264-params intra-refresh=1:bframes=0",
"vcodec": "h264_omx",
"audio": true,
"packetsize": 188,
"maxStreams": 2,
"maxWidth": 1024,
"maxHeight": 576,
"maxFPS": 20,
"debug": true,
"mapvideo": "0:1",
"mapaudio": "0:0"
}
}
Raspberry Pi #1: The one that has camera connected to it
Cron job to create a snapshot every minute (if we are not currently streaming)
* * * * * /home/pi/latest.sh
#!/bin/sh
if top -b -n1 | grep raspivid; then
exit 0
else
raspistill -w 480 -h 270 -o /home/pi/latest.jpg -n -awb auto -ex auto
exit 0
fi
raspivid -o - -t 0 -w 1280 -h 720 -fps 15 -n -awb auto -ex auto | cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8000/live}' :demux=h264
Raspberry Pi #2: The one that runs HomeBridge
Cron job to pull the latest snapshot locally every minute
* * * * * ssh pi@192.168.1.107 'cat /home/pi/latest.jpg' > /home/pi/latest.jpg
{
"platform": "Camera-ffmpeg",
"cameras": [
{
"name": "Balcony Camera",
"videoConfig": {
"source": "-f rtsp -re -i rtsp://192.168.1.107:8000/live",
"stillImageSource": "-i file:///home/pi/latest.jpg",
"maxStreams": 2,
"maxWidth": 1280,
"maxHeight": 720,
"maxFPS": 15,
"maxBitrate": 299,
"audio": false,
"packetSize": 188
}
}
]
}
{
"platform":"Camera-ffmpeg",
"cameras":[
{
"name": "RLC 422",
"manufacturer": "Reolink",
"model": "RLC-422",
"serialNumber": "XXXXXX",
"videoConfig": {
"source": "-rtsp_transport tcp -I rtsp://USER:PASSWORD@XXX.XXX.XXX.XXX:XXX:554/h264Preview_01_main",
"stillImageSource": "-i http://XXX.XXX.XXX.XXX/cgi-bin/api.cgi?cmd=Snap&channel=0&user=USER&password=PASSWORD",
"maxStreams": 10,
"maxWidth": 1920,
"maxHeight": 1080,
"maxFPS": 30
}
}
]
}
Replace XXX.XXX.XXX.XXX, USER, PASSWORD etc with your values.
{
"platform":"Camera-ffmpeg",
"cameras":[
{
"name": "August",
"manufacturer": "August",
"model": "Doorbell Cam",
"serialNumber": "XXXXXXXXX",
"videoConfig": {
"source": "-rtsp_transport tcp -i rtsp://admin:password@XXX.XXX.XXX.XXX:554/stream0",
"stillImageSource": "-skip_frame nokey -i rtsp://admin:password@xxx.xxx.xxx.xxx:554/live/stream1 -frames:v 1",
"maxStreams": 10,
"maxWidth": 1280,
"maxHeight": 960,
"maxFPS": 30
}
}
]
}
Replace XXX.XXX.XXX.XXX, etc with your values. Important that use make sure the live video is on stream0 and still is on stream1.
{
"platform":"Camera-ffmpeg",
"cameras":[
{
"name": "ESP32-Cam",
"manufacturer": "espressif",
"model": "ESP32-Cam",
"serialNumber": "XXXXXXXXX",
"videoConfig": {
"source": "-re -f mjpeg -i http://XXX.XXX.XXX.XXX:81/stream",
"stillImageSource": "-f mjpeg -i http://XXX.XXX.XXX.XXX/capture",
"maxStreams": 2,
"maxWidth": 1600,
"maxHeight": 1200,
"maxFPS": 25
}
}
]
}
Replace XXX.XXX.XXX.XXX, etc with your values. This is the config for the ESP32-Cam "CameraWebServer" example provided by espressif. Setup your Arduino IDE accordingly: https://github.com/espressif/arduino-esp32/tree/master/docs/arduino-ide You will just add your Wifi SSID and select camera model in the source code.
{
"platform": "Camera-ffmpeg",
"name": "Camera ffmpeg",
"cameras": [
{
"name": "CamName",
"videoConfig": {
"source": "-i rtsp://username:password@XXX.XXX.XXX.XXX:554/cam/realmonitor?channel=1&subtype=1",
"maxStreams": 2,
"maxWidth": 1080,
"maxHeight": 720,
"maxFPS": 15
}
}
Replace XXX.XXX.XXX.XXX, etc with your values. This is the config for the Lorex LHV2008.
Model NVR301-04LB-P4 Cameras are UNV IPC2122LR3-PF40-E NVR Camera Encoding Setup - Menu > Cameras > Encoding
Sub Stream
Stream Type Network Transmission
Video Compression h264
Resolution 640*360
Bitrate Type VBR
Bit Rate 512
Frame Rate 10
Image Quality level 4
I Frame Interval 50
Smoothing 4
U-Code Off
[
{
"name": "Front of House",
"videoConfig": {
"source": "-rtsp_transport tcp -re -i rtsp://username:password@ipaddress:554/unicast/c1/s1/live",
"maxStreams": 2,
"maxWidth": 1280,
"maxHeight": 720,
"maxFPS": 10,
"maxBitrate": 256,
"mapvideo": "0:0",
"mapaudio": "0:1",
"vcodec": "copy",
"packetSize": 376,
"audio": false,
"debug": true
}
}
]
Model C 100
{
"cameras": [
{
"name": "TP-Link Camera C100",
"manufacturer": "TP-Link",
"model": "C100",
"motion": true,
"videoConfig": {
"source": "-rtsp_transport http -re -i rtsp://user:password@ip:554/stream1",
"stillImageSource": "-rtsp_transport tcp -re -i rtsp://user:password@ip:554/stream1",
"maxStreams": 2,
"maxWidth": 1024,
"maxHeight": 576,
"maxFPS": 10,
"maxBitrate": 300,
"vcodec": "h264_omx",
"packetSize": 188,
"audio": true,
"debug": true
}
}
],
"platform": "Camera-ffmpeg"
}
Model C 200
{
"name": "Camera ffmpeg",
"cameras": [
{
"name": "Camera-Salo_",
"manufacturer": "TP-Link",
"model": "C200",
"serialNumber": "1C3BF372F96C",
"firmwareRevision": "1.0.5",
"videoConfig": {
"source": "-re -i rtsp://user:password@ip:554/stream2",
"stillImageSource": "-i rtsp:// user:password@ip:554/stream2",
"maxStreams": 2,
"maxWidth": 1280,
"maxHeight": 720,
"maxFPS": 10,
"maxBitrate": 300,
"vcodec": "libx264",
"packetSize": 1316,
"audio": true,
"debug": true
}
}
],
}
{
"platforms": [
{
"platform": "Camera-ffmpeg",
"cameras": [
{
"name": "CAMERANAME",
"manufacturer": "Amcrest",
"model": "IP4M-1026",
"videoConfig": {
"source": "-rtsp_transport tcp -re -i rtsp://admin:PASSWORD@IPADDRESS:554/cam/realmonitor?channel=1&subtype=0",
"stillImageSource": "-i http://admin:PASSWORD@IPADDRESS/cgi-bin/snapshot.cgi?chn=1",
"maxStreams": 2,
"maxWidth": 2688,
"maxHeight": 1520,
"maxFPS": 30,
"maxBitrate": 2048,
"vcodec": "libx264 -preset ultrafast",
"packetSize": 1316,
"audio": false,
"debug": false
}
}
]
}
]
}
{
"name": "CCTV Camera",
"manufacturer": "Ubiquiti",
"model": "UVC G3",
"serialNumber": "XYZXYZYZY",
"firmwareRevision": "4.14",
"videoConfig": {
"source": "-rtsp_transport tcp -re -i rtsp://admin:xxxxxxx@172.16.33.67:554/s0",
"maxStreams": 2,
"maxWidth": 1920,
"maxHeight": 1080,
"maxFPS": 30,
"vcodec": "copy",
"audio": true,
"mapvideo": "0:1",
"mapaudio": "0:0"
}
}
],
}
{
"name": "Camera",
"motion": true,
"videoConfig": {
"source": "-i rtsp://admin:PASSWORD@192.168.1.2/cam/realmonitor?channel=1&subtype=0",
"stillImageSource": "-i http://admin:PASSWORD@192.168.1.2/cgi-bin/snapshot.cgi",
"maxStreams": 2,
"maxWidth": 1280,
"maxHeight": 960,
"maxFPS": 30,
"audio": true,
"preserveRatio": "W",
"vcodec": "copy",
"acodec": "copy"
}
}
{
"name": "Pracovna",
"manufacturer": "Dahua",
"model": "IPC-HFW1320S-W",
"serialNumber": "4A040C2PAU4C91E",
"firmwareRevision": "2.400.0000000.16.R",
"videoConfig": {
"source": "-rtsp_transport tcp -re -i rtsp://USERNAME:PASSWORD@CAMERA-IP:PORT//cam/realmonitor?channel=1&subtype=0",
"vcodec": "libx264 -preset ultrafast",
"maxStreams": 2,
"maxWidth": 1280,
"maxHeight": 720,
"maxFPS": 30,
"maxBitrate": 2048,
"packetSize": 376,
"audio": false
}
}
{
"name": "Chodba",
"manufacturer": "Dahua",
"model": "IPC-A35",
"serialNumber": "2L043A6AAK00059",
"firmwareRevision": "2.400.0000000.16.R",
"videoConfig": {
"source": "-rtsp_transport tcp -re -i rtsp://USERNAME:PASSWORD@CAMERA-IP:PORT//cam/realmonitor?channel=1&subtype=0",
"vcodec": "libx264 -preset ultrafast",
"maxStreams": 2,
"maxWidth": 1280,
"maxHeight": 720,
"maxFPS": 30,
"maxBitrate": 2048,
"packetSize": 376,
"audio": true,
"mapaudio": "0:1"
}
}
When using Surveillance Station to connect and record the camera there is no point in homebridge also connecting when it can simply connect to Surveillance Station's shared stream locally. Find the URL in Surveillance Station, IP Camera, right click camera, share stream path. By default this plugin is set to re-encode the video stream but that is a serious problem because the Alpine docker container cannot do hardware encoding of the video so when viewing the stream through the home app it destroys the Synology's CPU as it does software encoding. Since the Surveillance Station stream is already h264 the solution is for this plugin to just forward the existing stream and not re-encode it, that is done by setting the vcodec to copy.
{
"platforms": [
{
"cameras": [
{
"name": "My Camera",
"videoConfig": {
"source": "-re -i rtsp://syno:1234567890abcdef1234567890abcdef@localhost:554/Sms=1.unicast",
"maxWidth": 1920,
"maxHeight": 1080,
"maxFPS": 30,
"maxBitrate": 3000,
"vcodec": "copy",
"audio": true
}
}
],
"platform": "Camera-ffmpeg"
}
]
}
-
using homebridge-camera-ffmpeg
-
authentication for rtsp disabled in camera config
{ "cameras": [ { "name": "Camera", "manufacturer": "SZSINOCAM ", "model": "IPCAM", "motion": false, "videoConfig": { "source": "-rtsp_transport tcp -re -i rtsp://192.168.1.50:554/ucast/11", "stillImageSource": "-re -i http://192.168.1.50/cgi-bin/anv/images_cgi?channel=0", "maxFPS": 20, "debug": false } } ], "platform": "Camera-ffmpeg" }
-
using homebridge-camera-ffmpeg 2.3.0
-
authentication for rtsp admin and camera password
{ "name": "Entrance Camera", "motion": true, "switches": false, "motionTimeout": 35, "videoConfig": { "source": "-rtsp_transport udp -i rtsp://admin:yourpassword@cam-ip:10554/udp/av0_0", "stillImageSource": "-i http://cam-ip/img/snapshot.cgi?user=admin&pwd=yourpassword&res=0", "maxFPS": 25, "packetSize": 1316, "audio": true, "debug": false } }