From 5ffff18bb202cfb27c8db285fa18e12b42a29c57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Mon, 21 Oct 2024 15:06:33 +0300 Subject: [PATCH] mediamtx: allow camera --- hosts/vno1-gdrx/configuration.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/hosts/vno1-gdrx/configuration.nix b/hosts/vno1-gdrx/configuration.nix index c96b311..5df4e22 100644 --- 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 = {