I’am trying to figure out, how to properly use rtmp-streams restreamed by frigate.
I got the rtmp-stream working in vlc. So far so good. But where the hell should it appear in homeassistant? I got a camera-entity which only shows the low resolution stream used for detection.
Where do I get the high resolution stream?
mqtt:
host: 192.168.xxx.xxx
user: xxx
password: xxx
cameras:
hof:
ffmpeg:
hwaccel_args:
- -c:v
- h264_v4l2m2m
inputs:
- path: rtsp://user:[email protected]:554/h264Preview_01_main
roles:
- clips
- rtmp
- path: rtsp://user:[email protected]:554/h264Preview_01_sub
roles:
- detect
- record
width: 640
height: 352
fps: 5
detect:
max_disappeared: 100
objects:
track:
- person
- car
- dog
- bicycle
- cat
- bird
motion:
mask:
- 304,0,253,187,201,207,163,352,0,352,0,0
- 640,352,525,352,586,0,640,0
threshold: 50
contour_area: 150
zones:
strasse:
coordinates: 312,82,576,88,585,0,332,0
einfahrt:
coordinates: 171,352,524,352,595,90,270,90
snapshots:
enabled: true
retain:
default: 10
objects:
person: 15
clips:
enabled: true
pre_capture: 5
post_capture: 5
retain:
default: 14
record:
enabled: true
retain_days: 7
detectors:
coral:
type: edgetpu
device: usb
{
"cameras": {
"hof": {
"best_image_timeout": 60,
"clips": {
"enabled": true,
"objects": null,
"post_capture": 5,
"pre_capture": 5,
"required_zones": [],
"retain": {
"default": 14,
"objects": {}
}
},
"detect": {
"enabled": true,
"max_disappeared": 100
},
"ffmpeg_cmds": [
{
"cmd": "ffmpeg -hide_banner -loglevel warning -c:v h264_v4l2m2m -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://user:[email protected]:554/h264Preview_01_main -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /tmp/cache/hof-%Y%m%d%H%M%S.mp4 -c copy -f flv rtmp://127.0.0.1/live/hof",
"roles": [
"clips",
"rtmp"
]
},
{
"cmd": "ffmpeg -hide_banner -loglevel warning -c:v h264_v4l2m2m -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://user:[email protected]:554/h264Preview_01_sub -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an /media/frigate/recordings/hof-%Y%m%d%H%M%S.mp4 -r 25 -f rawvideo -pix_fmt yuv420p pipe:",
"roles": [
"detect",
"record"
]
}
],
"fps": 25,
"frame_shape": [
352,
640
],
"height": 352,
"motion": {
"contour_area": 150,
"delta_alpha": 0.2,
"frame_alpha": 0.2,
"frame_height": 58,
"mask": [
"304,0,253,187,201,207,163,352,0,352,0,0",
"640,352,525,352,586,0,640,0"
],
"threshold": 50
},
"mqtt": {
"bounding_box": true,
"crop": true,
"enabled": true,
"height": 270,
"required_zones": [],
"timestamp": true
},
"name": "hof",
"objects": {
"filters": {
"bicycle": {
"mask": [],
"max_area": 24000000,
"min_area": 0,
"min_score": 0.5,
"threshold": 0.7
},
"bird": {
"mask": [],
"max_area": 24000000,
"min_area": 0,
"min_score": 0.5,
"threshold": 0.7
},
"car": {
"mask": [],
"max_area": 24000000,
"min_area": 0,
"min_score": 0.5,
"threshold": 0.7
},
"cat": {
"mask": [],
"max_area": 24000000,
"min_area": 0,
"min_score": 0.5,
"threshold": 0.7
},
"dog": {
"mask": [],
"max_area": 24000000,
"min_area": 0,
"min_score": 0.5,
"threshold": 0.7
},
"person": {
"mask": [],
"max_area": 24000000,
"min_area": 0,
"min_score": 0.5,
"threshold": 0.7
}
},
"mask": null,
"track": [
"person",
"car",
"dog",
"bicycle",
"cat",
"bird"
]
},
"record": {
"enabled": true,
"retain_days": 7
},
"rtmp": {
"enabled": true
},
"snapshots": {
"bounding_box": false,
"crop": false,
"enabled": true,
"height": null,
"required_zones": [],
"retain": {
"default": 10,
"objects": {
"person": 15
}
},
"timestamp": false
},
"width": 640,
"zones": {
"einfahrt": {
"coordinates": "171,352,524,352,595,90,270,90",
"filters": {}
},
"strasse": {
"coordinates": "312,82,576,88,585,0,332,0",
"filters": {}
}
}
}
},
"clips": {
"max_seconds": 300,
"retain": {
"default": 10,
"objects": {}
},
"tmpfs_cache_size": ""
},
"database": {
"path": "/media/frigate/clips/frigate.db"
},
"detectors": {
"coral": {
"device": "usb",
"num_threads": 3,
"type": "edgetpu"
}
},
"environment_vars": {},
"logger": {
"default": "INFO",
"logs": {}
},
"model": {
"height": 320,
"width": 320
},
"mqtt": {
"client_id": "frigate",
"host": "192.168.178.7",
"port": 1883,
"stats_interval": 60,
"topic_prefix": "frigate",
"user": "mqtt"
},
"snapshots": {
"retain": {
"default": 10,
"objects": {}
}
}
}