commit 5ffff18bb202cfb27c8db285fa18e12b42a29c57 (tree)
parent 4e2ee9dd217967a53f733822f4a40b4b17a860cf
Author: Motiejus Jakštys <motiejus@jakstys.lt>
Date: Mon, 21 Oct 2024 15:06:33 +0300
mediamtx: allow camera
Diffstat:
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/hosts/vno1-gdrx/configuration.nix b/hosts/vno1-gdrx/configuration.nix
@@ -1,7 +1,8 @@
{
+ lib,
+ pkgs,
config,
myData,
- pkgs,
...
}:
let
@@ -79,6 +80,15 @@ in
services.mediamtx = {
enable = true;
+ allowVideoAccess = true;
+ settings = {
+ paths = {
+ cam = {
+ runOnInit = "${lib.getExe pkgs.ffmpeg} -f v4l2 -i /dev/video0 -f rtsp rtsp://localhost:$RTSP_PORT/$RTSP_PATH";
+ runOnInitRestart = true;
+ };
+ };
+ };
};
mj = {