From 8528ba7daa53624e45f78b2362278ae5c6607e5a Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Wed, 12 Mar 2025 16:10:50 +0100 Subject: [PATCH] use pw in py script --- bin/streaming/telecaster.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/streaming/telecaster.py b/bin/streaming/telecaster.py index 6f08b96..9f9463c 100755 --- a/bin/streaming/telecaster.py +++ b/bin/streaming/telecaster.py @@ -10,14 +10,14 @@ from copy import deepcopy # ! queue ! clockoverlay time-format="%D %H:%M:%S" \ -VIDEO_PIPELINE_BASE="""v4l2src device=/dev/video{id} ! {format}, width={width}, height={height}, framerate={framerate}/1 \ +VIDEO_PIPELINE_BASE="""pipewiresrc client-name="video_streaming" \ ! queue ! {decoder} \ ! videoflip method={flip} \ ! queue ! videoconvert \ ! queue ! vp8enc threads=4 deadline=2 target-bitrate={vp8_bitrate} \ ! queue ! muxout. \ - jackaudiosrc connect=2 ! audio/x-raw, format=F32LE, channels={channels} \ - ! audiocheblimit mode=high-pass cutoff=120 poles=4 \ + pipewiresrc client-name="video_streaming" ! audio/x-raw, format=F32LE, channels={channels} \ + ! queue ! audiocheblimit mode=high-pass cutoff=120 poles=4 \ ! queue ! volume volume={gain_pre} \ ! queue ! audiodynamic characteristics=soft-knee mode=compressor threshold=0.125 ratio=0.125 \ ! queue ! volume volume={gain_post} \ @@ -29,7 +29,7 @@ VIDEO_PIPELINE_BASE="""v4l2src device=/dev/video{id} ! {format}, width={width}, ! queue ! shout2send ip={ip} port={port} password={password} mount=telecaster_live_{id}.webm """ -AUDIO_PIPELINE_BASE="""jackaudiosrc connect=2 ! audio/x-raw, format=F32LE, channels={channels} \ +AUDIO_PIPELINE_BASE="""pipewiresrc client-name="audio_streaming" ! audio/x-raw, format=F32LE, channels={channels} \ ! queue ! audiocheblimit mode=high-pass cutoff=120 poles=4 \ ! queue ! volume volume={gain_pre} \ ! queue ! audiodynamic characteristics=soft-knee mode=compressor threshold=0.125 ratio=0.125 \ @@ -81,7 +81,7 @@ class TeleCaster(Thread): def v4l2_ctl(self, video): params = video["v4l2-ctl"] - print(params) + print(params) for param in params: print(param) command = "v4l2-ctl -d %s -c %s=%s" % (video["id"], param, params[param]) -- 2.39.5