diff --git a/src/plugins/play_url.py b/src/plugins/play_url.py index fffddf9..e51a836 100644 --- a/src/plugins/play_url.py +++ b/src/plugins/play_url.py @@ -117,9 +117,9 @@ def run_ffmpeg(self, url: str, volume: VolumeType): ffmpeg_command_parts.extend(["-re", "-i", url]) ffmpeg_command_parts.extend(["-af", f"volume={volume}"]) - ffmpeg_command_parts.extend(["-f", "s32le", - "-ac", "2", - "-ar", "48000", + ffmpeg_command_parts.extend(["-f", f"s{self.stream_info.bit_depth}le", + "-ac", f"{self.stream_info.channels}", + "-ar", f"{self.stream_info.sample_rate}", f"pipe:{self.fifo_write}"]) logger.debug("[PlayURL] ffmpeg command line: %s", ffmpeg_command_parts) diff --git a/src/utils/utils.py b/src/utils/utils.py index 3178915..2bb3444 100644 --- a/src/utils/utils.py +++ b/src/utils/utils.py @@ -13,7 +13,7 @@ def set_process_name(shortname: str = "", fullname: str = ""): """Sets the process name so it can be viewed under top. Short name is limited to 14 chars.""" shortname = shortname[:16] - logger.debug("Setting process name for pid %s to: short: %s long %s", + logger.debug("Setting process name for pid %s to: short: %s long %s", os.getpid(), shortname, fullname) if len(fullname) > 2: setproctitle.setproctitle(f"ScreamRouter ({os.getpid()}): {fullname}")