0.2.7 • Published 4 years ago
homebridge-camera-ffmpeg-maio v0.2.7
homebridge-camera-ffmpeg-maio - MAIO FORM WITH MQTT EVENTS (WITH TWO SENSORS)
ffmpeg plugin for Homebridge
Installation
- Install ffmpeg on your computer (note that in some cases, this requires compiling ffmpeg from scratch due to the use of rstp, namely for pi configurations)
- Install this plugin using: npm install -g homebridge-camera-ffmpeg-maio
- Edit
config.jsonand add the camera. - Run Homebridge
- Add extra camera accessories in Home app. The setup code is the same as homebridge.
Config.json Example
{
"platform": "Camera-ffmpeg-maio",
"cameras": [
{
"name": "Camera Name",
"videoConfig": {
"source": "-re -i rtsp://myfancy_rtsp_stream",
"stillImageSource": "-i http://faster_still_image_grab_url/this_is_optional.jpg",
"maxStreams": 2,
"maxWidth": 1280,
"maxHeight": 720,
"maxFPS": 30
}
}
]
}Optional Parameters
uploaderenable uploading of snapshots to Google Drive, defaults tofalse. See wiki for more detailed instructions.motionenable a dummy switch and motion sensor to trigger picture notifications in iOS 13, defaults tofalse. See wiki for more detailed instructions.manufacturerset manufacturer name for display in the Home appmodelset model for display in the Home appserialNumberset serial number for display in the Home appfirmwareRevisionset firmware revision for display in the Home app
Example with manufacturer, model, serial number and firmware set:
{
"platform": "Camera-ffmpeg-maio",
"cameras": [
{
"name": "Camera Name",
"manufacturer": "ACME, Inc.",
"model": "ABC-123",
"serialNumber": "1234567890",
"firmwareRevision": "1.0",
"videoConfig": {
"source": "-re -i rtsp://myfancy_rtsp_stream",
"stillImageSource": "-i http://faster_still_image_grab_url/this_is_optional.jpg",
"maxStreams": 2,
"maxWidth": 1280,
"maxHeight": 720,
"maxFPS": 30
}
}
]
}Optional videoConfig Parameters
maxStreamsis the maximum number of streams that will be generated for this camera, default 2maxWidthis the maximum width reported to HomeKit, default1280maxHeightis the maximum height reported to HomeKit, default720maxFPSis the maximum frame rate of the stream, default10maxBitrateis the maximum bit rate of the stream in kbit/s, default300vcodecIf you're running on a RPi with the omx version of ffmpeg installed, you can change to the hardware accelerated video codec with this option, defaultlibx264audiocan be set to true to enable audio streaming from camera. To use audio ffmpeg must be compiled with --enable-libfdk-aac, see https://github.com/KhaosT/homebridge-camera-ffmpeg/wiki, defaultfalse. Many ffmpeg binaries are not compiled with libfdk-aac, and to work around this issue, force the OPUS codec:"acodec": "libopus"packetSizeIf audio or video is choppy try a smaller value, set to a multiple of 188, default1316vflipFlips the stream vertically, defaultfalsehflipFlips the stream horizontally, defaultfalsemapvideoSelect the stream used for video, default0:0mapaudioSelect the stream used for audio, default0:1videoFilterAllows a custom video filter to be passed to FFmpeg via-vf, defaults toscale=1280:720additionalCommandlineAllows additional of extra command line options to FFmpeg, for example'-loglevel verbose'debugShow the output of ffmpeg in the log, defaultfalse
A somewhat complicated example:
{
"platform": "Camera-ffmpeg-maio",
"cameras": [
{
"name": "Camera Name",
"videoConfig": {
"source": "-re -i rtsp://myfancy_rtsp_stream",
"stillImageSource": "-i http://faster_still_image_grab_url/this_is_optional.jpg",
"maxStreams": 2,
"maxWidth": 1280,
"maxHeight": 720,
"maxFPS": 30,
"maxBitrate": 200,
"vcodec": "h264_omx",
"audio": false,
"packetSize": 188,
"hflip": true,
"additionalCommandline": "-x264-params intra-refresh=1:bframes=0",
"debug": true
}
}
]
}Using another Video Processor
videoProcessoris the video processor used to manage videos. eg: ffmpeg (by default) or avconv or /a/path/to/another/ffmpeg. Need to use the same parameters than ffmpeg.
{
"platform": "Camera-ffmpeg-maio",
"videoProcessor": "avconv",
"cameras": [
...
]
}{
"platform": "Camera-ffmpeg-maio",
"videoProcessor": "/my/own/compiled/ffmpeg",
"cameras": [
...
]
}Setting a source interface, or IP address
interfaceNameselects the IP address of a given network interface. The default is to select the first available, and that may not be the same IP address that ffmpeg will use. A mismatch will cause the iOS device to discard the video stream.
{
"platform": "Camera-ffmpeg-maio",
"interfaceName": "bond0",
"cameras": [
...
]
}Tested configurations
We have started collecting tested configurations in the wiki, so please before raising an issue with your configuration, please check the wiki. Also if you have a working configuration that you would like to share, please add it to the wiki.
0.2.1
4 years ago
0.2.0
4 years ago
0.2.7
4 years ago
0.2.6
4 years ago
0.2.3
4 years ago
0.2.2
4 years ago
0.2.5
4 years ago
0.2.4
4 years ago
0.1.28
6 years ago
0.1.26
6 years ago
0.1.27
6 years ago
0.1.25
6 years ago
0.1.24
6 years ago
0.1.23
6 years ago
0.1.22
6 years ago
0.1.21
6 years ago
0.1.20
6 years ago
0.1.19
6 years ago
0.1.18
6 years ago
0.1.17
6 years ago
0.1.16
6 years ago
0.1.15
6 years ago
0.1.14
6 years ago