]> git.parisson.com Git - telecaster-server.git/commitdiff
add audio and video delay in gst pipeline, add video id to record dir
authorGuillaume Pellerin <yomguy@parisson.com>
Wed, 13 Mar 2024 09:53:19 +0000 (10:53 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Wed, 13 Mar 2024 09:54:07 +0000 (10:54 +0100)
bin/streaming/telecaster.py

index d1247b4b18a98de039a81d3f7461b4a5e2af1ad1..155907edbb4041558de4f756a44f709732a3d7a5 100755 (executable)
@@ -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)