|
1 | | ---- i/r128gain/__init__.py |
2 | | -+++ w/r128gain/__init__.py |
3 | | -@@ -78,7 +78,7 @@ def get_ffmpeg_lib_versions(ffmpeg_path=None): |
4 | | - Example: 0x3040100 for FFmpeg 3.4.1 |
5 | | - """ |
6 | | - r = collections.OrderedDict() |
7 | | -- cmd = (ffmpeg_path or "ffmpeg", "-version") |
8 | | -+ cmd = (ffmpeg_path or "@ffmpeg@/bin/ffmpeg", "-version") |
9 | | - output = subprocess.run(cmd, |
10 | | - check=True, |
11 | | - stdout=subprocess.PIPE, |
12 | | -@@ -156,7 +156,7 @@ def get_r128_loudness(audio_filepaths, *, calc_peak=True, enable_ffmpeg_threadin |
13 | | - os.devnull, |
14 | | - **additional_ffmpeg_args, |
15 | | - f="null").global_args("-hide_banner", "-nostats"), |
16 | | -- cmd=ffmpeg_path or "ffmpeg") |
17 | | -+ cmd=ffmpeg_path or "@ffmpeg@/bin/ffmpeg") |
| 1 | +diff --git a/r128gain/__init__.py b/r128gain/__init__.py |
| 2 | +index 79a5cbd..d8f13ba 100755 |
| 3 | +--- a/r128gain/__init__.py |
| 4 | ++++ b/r128gain/__init__.py |
| 5 | +@@ -86,7 +86,7 @@ def get_ffmpeg_lib_versions(ffmpeg_path: Optional[str] = None) -> Dict[str, int] |
| 6 | + Example: 0x3040100 for FFmpeg 3.4.1 |
| 7 | + """ |
| 8 | + r = collections.OrderedDict() |
| 9 | +- cmd = (ffmpeg_path or "ffmpeg", "-version") |
| 10 | ++ cmd = (ffmpeg_path or "@ffmpeg@/bin/ffmpeg", "-version") |
| 11 | + output_str = subprocess.run(cmd, check=True, stdout=subprocess.PIPE, universal_newlines=True).stdout |
| 12 | + output_lines = output_str.splitlines() |
| 13 | + lib_version_regex = re.compile(r"^\s*(lib[a-z]+)\s+([0-9]+).\s*([0-9]+).\s*([0-9]+)\s+") |
| 14 | +@@ -194,7 +194,7 @@ def get_r128_loudness( # noqa: C901 |
| 15 | + ffmpeg.output(*output_streams, os.devnull, **additional_ffmpeg_args, f="null").global_args( |
| 16 | + "-hide_banner", "-nostats" |
| 17 | + ), |
| 18 | +- cmd=ffmpeg_path or "ffmpeg", |
| 19 | ++ cmd=ffmpeg_path or "@ffmpeg@/bin/ffmpeg", |
| 20 | + ) |
18 | 21 |
|
19 | | - # run |
20 | | - logger().debug(cmd_to_string(cmd)) |
21 | | -@@ -740,7 +740,7 @@ def cl_main(): |
22 | | - help="Maximum number of tracks to scan in parallel. If not specified, autodetect CPU count") |
23 | | - arg_parser.add_argument("-f", |
24 | | - "--ffmpeg-path", |
25 | | -- default=shutil.which("ffmpeg"), |
26 | | -+ default="@ffmpeg@/bin/ffmpeg", |
27 | | - help="""Full file path of ffmpeg executable (only needed if not in PATH). |
28 | | - If not specified, autodetect""") |
29 | | - arg_parser.add_argument("-d", |
| 22 | + # run |
| 23 | +@@ -885,7 +885,7 @@ def cl_main() -> None: |
| 24 | + arg_parser.add_argument( |
| 25 | + "-f", |
| 26 | + "--ffmpeg-path", |
| 27 | +- default=shutil.which("ffmpeg"), |
| 28 | ++ default="@ffmpeg@/bin/ffmpeg", |
| 29 | + help="""Full file path of ffmpeg executable (only needed if not in PATH). |
| 30 | + If not specified, autodetect""", |
| 31 | + ) |
0 commit comments