self.tools = args["tools"]
self.engine = args["engine"]
self.no_video = args["no_video"]
+ self.streaming_only = args["streaming_only"]
+ self.debug = args["debug"]
+
+ if self.debug:
+ os.environ["GST_DEBUG"] = "3"
+
self.conf = yaml.safe_load(conf_file)["telecaster"]
self.stream_types = ["audio", "video"]
+
self.deefuzzer_video_conf_file = "/tmp/telecaster_deefuzzer_webm_monitor.yml"
self.deefuzzer_audio_conf_file = "/tmp/telecaster_deefuzzer_mp3_monitor.yml"
- # print(self.conf)
+
engine = self.conf["audio"]["engine"]["name"]
if "autostart" in self.conf["audio"]["engine"]:
if self.conf["audio"]["engine"]["autostart"]:
self.engine = True
- print("OK")
+ print("engine started")
+
self.params = PARAMS[engine]
self.params["options"] = self.params["options"].format(**self.conf["audio"][engine])
self.params["gst_audio_options"] = self.params["gst_audio_options"].format(**self.conf["audio"][engine])
+
if "boot_time_delay" in self.conf:
self.time_delay = self.conf["boot_time_delay"]
else:
self.time_delay = 1
if self.verbose:
+ print(self.conf)
print(self.params)
def write_conf(self, conf_dict, path):
deefuzzer_global_conf["deefuzzer"]["station"].append(deefuzzer_local_conf)
time.sleep(self.time_delay)
- if not self.dry_run:
+ if not self.dry_run or not self.streaming_only:
self.deefuzzer_start(deefuzzer_global_conf, self.deefuzzer_video_conf_file)
def audio_start(self):
deefuzzer_global_conf["deefuzzer"]["station"].append(deefuzzer_local_conf)
time.sleep(self.time_delay)
- if not self.dry_run:
+ if not self.dry_run or not self.streaming_only:
self.deefuzzer_start(deefuzzer_global_conf, self.deefuzzer_audio_conf_file)
def connect(self):
parser.add_argument("-t", "--tools", help="start tools", action="store_true")
parser.add_argument("-e", "--engine", help="start engine", action="store_true")
parser.add_argument("-nv", "--no-video", help="no video", action="store_true")
+ parser.add_argument("-so", "--streaming-only", help="streaming only, no monitor recording", action="store_true")
+ parser.add_argument("-db", "--debug", help="debug mode", action="store_true")
args = vars(parser.parse_args())
if os.path.exists(DEFAULT_CONFIG_FILE) and not args["config"]:
args['config'] = DEFAULT_CONFIG_FILE