From be8ab74ea75032e06f849d879c12650d95787d73 Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Mon, 6 Oct 2025 10:40:23 -0700 Subject: [PATCH] Tee webcam video to two virtual cameras --- srec.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/srec.py b/srec.py index 7421c74..962c147 100644 --- a/srec.py +++ b/srec.py @@ -111,9 +111,14 @@ def on_start_recording(_: Gtk.Button, stack: Gtk.Stack) -> None: stack.set_visible_child_name("recording") if is_sharing_enabled(stack): + out_opts = [ + '-f', 'v4l2', '-framerate', '25', '-codec:v', 'rawvideo', + '-pix_fmt', 'yuv420p', + ] sharing = Stream.start( - ['ffmpeg', '-i', '/dev/video0', '-f', 'v4l2', '-framerate', '25', - '-codec:v', 'rawvideo', '-pix_fmt', 'yuv420p', '/dev/video9']) + ['ffmpeg', '-i', '/dev/video0'] + + out_opts + ['/dev/video8'] + + out_opts + ['/dev/video9']) time.sleep(3) # Bad!! We should not be sleeping in this thread! recording = Stream.start( -- 2.50.1