add object masks

This commit is contained in:
Motiejus Jakštys 2025-03-13 19:54:18 +00:00
parent a11a6bb241
commit d3b0585bf4

View File

@ -167,53 +167,61 @@ in
}; };
cameras = { cameras = {
vno4-dome-panorama = { vno4-dome-panorama =
enabled = true; let
motion.mask = [ masks = [
"0.308,0.235,0.305,1,0,1,0,0,0.587,0.005" "0.308,0.235,0.305,1,0,1,0,0,0.587,0.005"
"0.766,1,0.867,0,1,0,1,1" "0.766,1,0.867,0,1,0,1,1"
];
ffmpeg = {
output_args = {
record = "preset-record-generic";
};
inputs = [
{
path = "rtsp://localhost:8554/vno4-dome-panorama-high";
roles = [ "record" ];
}
{
path = "rtsp://localhost:8554/vno4-dome-panorama-low";
roles = [ "detect" ];
}
]; ];
in
{
enabled = true;
motion.mask = masks;
objects.mask = masks;
ffmpeg = {
output_args = {
record = "preset-record-generic";
};
inputs = [
{
path = "rtsp://localhost:8554/vno4-dome-panorama-high";
roles = [ "record" ];
}
{
path = "rtsp://localhost:8554/vno4-dome-panorama-low";
roles = [ "detect" ];
}
];
};
}; };
};
vno4-dome-ptz = { vno4-dome-ptz =
enabled = true; let
motion.mask = [ masks = [ "0,0.115,1,0.115,1,0,0,0" ];
"0,0.115,1,0.115,1,0,0,0" in
]; {
ffmpeg = { enabled = true;
output_args = { motion.mask = masks;
record = "preset-record-generic-audio-copy"; objects.mask = masks;
ffmpeg = {
output_args = {
record = "preset-record-generic-audio-copy";
};
inputs = [
{
path = "rtsp://localhost:8554/vno4-dome-ptz-high";
roles = [
"record"
"audio"
];
}
{
path = "rtsp://localhost:8554/vno4-dome-ptz-low";
roles = [ "detect" ];
}
];
}; };
inputs = [
{
path = "rtsp://localhost:8554/vno4-dome-ptz-high";
roles = [
"record"
"audio"
];
}
{
path = "rtsp://localhost:8554/vno4-dome-ptz-low";
roles = [ "detect" ];
}
];
}; };
};
}; };
}; };