From 84bdce4bf8f255fdcf903ecdf382c5de254dc2c4 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Wed, 13 Mar 2024 10:53:19 +0100 Subject: [PATCH] add audio and video delay in gst pipeline, add video id to record dir --- bin/streaming/telecaster.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/streaming/telecaster.py b/bin/streaming/telecaster.py index d1247b4..155907e 100755 --- a/bin/streaming/telecaster.py +++ b/bin/streaming/telecaster.py @@ -11,12 +11,14 @@ from copy import deepcopy VIDEO_PIPELINE_BASE="""v4l2src device=/dev/video{id} ! {format}, width={width}, height={height}, framerate={framerate}/1 \ ! queue ! {decoder} \ - ! queue ! videoflip method={flip} \ + ! queue min-threshold-time={video_delay} ! videoflip method={flip} \ + ! queue ! timecodestamper first-timecode-to-now=true \ ! queue ! videoconvert \ + ! queue ! clockoverlay time-format="%D %H:%M:%S" \ ! queue ! vp8enc threads=4 deadline=2 \ ! queue ! muxout. \ jackaudiosrc connect=2 ! audio/x-raw, format=F32LE, channels={channels} \ - ! queue ! audiocheblimit mode=high-pass cutoff=120 poles=4 \ + ! queue min-threshold-time={audio_delay} ! 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} \ @@ -134,7 +136,7 @@ class TeleCaster(Thread): deefuzzer_local_conf = deepcopy(deefuzzer_station_conf) relay_url = "http://{ip}:{port}/telecaster_live_{id}.webm".format(**video, **self.conf["server"]) deefuzzer_local_conf["relay"]["url"] = relay_url - deefuzzer_local_conf["record"]["dir"] = self.conf["record_dir"] + os.sep + "webm" + os.sep + str(video["id"]) + deefuzzer_local_conf["record"]["dir"] = self.conf["record_dir"] + os.sep + "webm" deefuzzer_local_conf["server"]["mountpoint"] = "monitor_" + str(video["id"]) + ".webm" print(deefuzzer_local_conf) deefuzzer_global_conf["deefuzzer"]["station"].append(deefuzzer_local_conf) -- 2.39.5