Skip to content

Commit

Permalink
Use streaminfo parameters for ffmpeg
Browse files Browse the repository at this point in the history
  • Loading branch information
netham45 committed May 7, 2024
1 parent 8bd2cab commit 49ab90b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/plugins/play_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion src/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down

0 comments on commit 49ab90b

Please sign in to comment.