summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/go2rtc.nix9
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/go2rtc.nix b/modules/go2rtc.nix
index 488d679..62d2531 100644
--- a/modules/go2rtc.nix
+++ b/modules/go2rtc.nix
@@ -2,8 +2,8 @@
let
ffmpegDevice =
- device: format: resolution: hz:
- "ffmpeg:device?video=${device}&input_format=${format}&video_size=${resolution}&framerate=${hz}#video=h264#hardware";
+ device: format: resolution: hz: options:
+ "ffmpeg:device?video=${device}&input_format=${format}&video_size=${resolution}&framerate=${hz}${options}";
go2rtcPort = 1984;
webrtcPort = 8555;
@@ -29,7 +29,10 @@ in
};
streams = {
- webcam = ffmpegDevice "/dev/video0" "yuyv422" "1280x720" "30";
+ cam1-yuyv422 = ffmpegDevice "/dev/video0" "yuyv422" "1280x960" "30" "#video=h264#hardware";
+ # todo: i think ffmpeg still currently reencodes the mjpeg again,
+ # but with video=copy all i get back are corrupted frames.
+ cam1-mjpeg = ffmpegDevice "/dev/video0" "mjpeg" "1280x960" "30" "";
};
};
};