diff --git a/src/croaker/transcoder.py b/src/croaker/transcoder.py index d563ae8..94e7a23 100644 --- a/src/croaker/transcoder.py +++ b/src/croaker/transcoder.py @@ -1,4 +1,5 @@ import logging +import os import subprocess from dataclasses import dataclass from io import BufferedReader @@ -101,6 +102,8 @@ class FrameAlignedStream: """ Create a FrameAlignedStream instance by transcoding an audio source on disk. """ + + args = [] if os.environ.get("DEBUG") else ["-hide_banner", "-loglevel", "quiet"] ffmpeg_args = ( ffmpeg.input(str(infile)) .output( @@ -116,7 +119,7 @@ class FrameAlignedStream: "ar": kwargs.get("sample_rate", cls.sample_rate), }, ) - .global_args("-hide_banner", "-vn") + .global_args("-vn", *args) .compile() )