]> git.parisson.com Git - telecaster-server.git/commitdiff
add self.time_delay 4.2.1
authorGuillaume Pellerin <guillaume.pellerin@parisson.com>
Mon, 9 Jun 2025 08:52:29 +0000 (10:52 +0200)
committerGuillaume Pellerin <guillaume.pellerin@parisson.com>
Mon, 9 Jun 2025 08:52:29 +0000 (10:52 +0200)
bin/streaming/telecaster.py
etc/telecaster/telecaster-multi.yml
etc/telecaster/telecaster.yml

index f30c4e71dac4cc87cf6b0f35583ce4dc586f4bf8..5de966e14ad3ee351261169669448d49de8388bd 100755 (executable)
@@ -43,8 +43,6 @@ AUDIO_PIPELINE_BASE="""{gst_audio_source} {gst_audio_options} client-name="mp3_s
     ! queue ! shout2send ip={ip} port={port} password={password} mount=telecaster_live.mp3 > /dev/null
 """
 
-BOOT_TIME_DELAY = 1
-
 DEFAULT_CONFIG_FILE = "/etc/telecaster/telecaster.yml"
 
 PARAMS = {
@@ -131,6 +129,10 @@ class TeleCaster(Thread):
         self.params = PARAMS[audio_engine]
         self.params["options"] = self.params["options"].format(**self.conf["audio"][audio_engine])
         self.params["gst_audio_options"] = self.params["gst_audio_options"].format(**self.conf["audio"][audio_engine])
+        if self.conf["boot_time_delay"]:
+            self.time_delay = self.conf["boot_time_delay"]
+        else:
+            self.time_delay = 1
 
         if self.verbose:
             print(self.params)
@@ -159,7 +161,7 @@ class TeleCaster(Thread):
             print(command)
         if not self.dry_run:
             thread.start()
-        time.sleep(BOOT_TIME_DELAY)
+        time.sleep(self.time_delay)
 
     def audio_tools_start(self):
         for tool in self.params["tools"]:
@@ -205,7 +207,7 @@ class TeleCaster(Thread):
             if not self.dry_run:
                 stream.start()
 
-            time.sleep(BOOT_TIME_DELAY)
+            time.sleep(self.time_delay)
 
             deefuzzer_local_conf = deepcopy(deefuzzer_station_conf)
             relay_url = "http://{ip}:{port}/telecaster_live_{id}.webm".format(**video, **self.conf["server"])
@@ -224,7 +226,7 @@ class TeleCaster(Thread):
         # print(deefuzzer_local_conf)
         deefuzzer_global_conf["deefuzzer"]["station"].append(deefuzzer_local_conf)
 
-        time.sleep(BOOT_TIME_DELAY)
+        time.sleep(self.time_delay)
         if not self.dry_run:
             self.deefuzzer_start(deefuzzer_global_conf, self.deefuzzer_video_conf_file)
 
@@ -247,7 +249,7 @@ class TeleCaster(Thread):
         if not self.dry_run:
             stream.start()
 
-        time.sleep(BOOT_TIME_DELAY)
+        time.sleep(self.time_delay)
 
         deefuzzer_local_conf = deepcopy(deefuzzer_station_conf)
         # print(deefuzzer_local_conf)
@@ -256,7 +258,7 @@ class TeleCaster(Thread):
         deefuzzer_local_conf["record"]["dir"] = self.conf["record_dir"] + os.sep + "mp3"
         deefuzzer_global_conf["deefuzzer"]["station"].append(deefuzzer_local_conf)
 
-        time.sleep(BOOT_TIME_DELAY)
+        time.sleep(self.time_delay)
         if not self.dry_run:
             self.deefuzzer_start(deefuzzer_global_conf, self.deefuzzer_audio_conf_file)
 
index 77ab51440c432aa4c15f2cad70fcc925064653c3..cd195c880ffe4371550aa0d2fefb7a6600d4a5b8 100644 (file)
@@ -1,4 +1,5 @@
 telecaster:
+  boot_time_delay: 1
   server:
     ip: 127.0.0.1
     port: 8000
@@ -101,7 +102,7 @@ telecaster:
       samplerate: 48000
     pipewire:
       target_object: telecaster_source
-      #target_object=alsa:acp:ArturiaMsd:0:capture
+      #target_objectalsa:acp:ArturiaMsd:0:capture
     gstreamer:
       channels: 2
       opus_bitrate: 96000
index 1525ccfadde0a80bf824c0a82f0f54ceeb62dfbe..5ea521e3c4d1b86780bf9cc1563b4a36b7dcddc3 100644 (file)
@@ -1,4 +1,5 @@
 telecaster:
+  boot_time_delay: 1
   server:
     ip: 127.0.0.1
     port: 8000
@@ -83,7 +84,7 @@ telecaster:
       samplerate: 48000
     pipewire:
       target_object: telecaster_source
-      #target_object=alsa:acp:ArturiaMsd:0:capture
+      #target_objectalsa:acp:ArturiaMsd:0:capture
     gstreamer:
       channels: 2
       opus_bitrate: 96000