ffmpeg-normalize 1.41.0__tar.gz → 1.41.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ffmpeg_normalize-1.41.0 → ffmpeg_normalize-1.41.1}/PKG-INFO +1 -1
- {ffmpeg_normalize-1.41.0 → ffmpeg_normalize-1.41.1}/pyproject.toml +1 -1
- {ffmpeg_normalize-1.41.0 → ffmpeg_normalize-1.41.1}/src/ffmpeg_normalize/_cmd_utils.py +13 -2
- {ffmpeg_normalize-1.41.0 → ffmpeg_normalize-1.41.1}/LICENSE.md +0 -0
- {ffmpeg_normalize-1.41.0 → ffmpeg_normalize-1.41.1}/README.md +0 -0
- {ffmpeg_normalize-1.41.0 → ffmpeg_normalize-1.41.1}/src/ffmpeg_normalize/__init__.py +0 -0
- {ffmpeg_normalize-1.41.0 → ffmpeg_normalize-1.41.1}/src/ffmpeg_normalize/__main__.py +0 -0
- {ffmpeg_normalize-1.41.0 → ffmpeg_normalize-1.41.1}/src/ffmpeg_normalize/_errors.py +0 -0
- {ffmpeg_normalize-1.41.0 → ffmpeg_normalize-1.41.1}/src/ffmpeg_normalize/_ffmpeg_normalize.py +0 -0
- {ffmpeg_normalize-1.41.0 → ffmpeg_normalize-1.41.1}/src/ffmpeg_normalize/_logger.py +0 -0
- {ffmpeg_normalize-1.41.0 → ffmpeg_normalize-1.41.1}/src/ffmpeg_normalize/_media_file.py +0 -0
- {ffmpeg_normalize-1.41.0 → ffmpeg_normalize-1.41.1}/src/ffmpeg_normalize/_presets.py +0 -0
- {ffmpeg_normalize-1.41.0 → ffmpeg_normalize-1.41.1}/src/ffmpeg_normalize/_streams.py +0 -0
- {ffmpeg_normalize-1.41.0 → ffmpeg_normalize-1.41.1}/src/ffmpeg_normalize/data/presets/music.json +0 -0
- {ffmpeg_normalize-1.41.0 → ffmpeg_normalize-1.41.1}/src/ffmpeg_normalize/data/presets/podcast.json +0 -0
- {ffmpeg_normalize-1.41.0 → ffmpeg_normalize-1.41.1}/src/ffmpeg_normalize/data/presets/streaming-video.json +0 -0
- {ffmpeg_normalize-1.41.0 → ffmpeg_normalize-1.41.1}/src/ffmpeg_normalize/py.typed +0 -0
|
@@ -6,6 +6,7 @@ import os
|
|
|
6
6
|
import re
|
|
7
7
|
import shlex
|
|
8
8
|
import subprocess
|
|
9
|
+
import sys
|
|
9
10
|
from contextlib import contextmanager
|
|
10
11
|
from shutil import which
|
|
11
12
|
from typing import Any, Iterator
|
|
@@ -40,6 +41,16 @@ def _get_ffmpeg_env() -> dict[str, str] | None:
|
|
|
40
41
|
return _ffmpeg_env_var.get()
|
|
41
42
|
|
|
42
43
|
|
|
44
|
+
def _get_ffmpeg_popen_kwargs() -> dict[str, Any]:
|
|
45
|
+
"""Return common keyword arguments for ffmpeg subprocesses."""
|
|
46
|
+
kwargs: dict[str, Any] = {"env": _get_ffmpeg_env()}
|
|
47
|
+
if sys.platform == "win32":
|
|
48
|
+
# Hide consoles spawned by GUI applications. See https://github.com/slhck/ffmpeg-normalize/issues/319.
|
|
49
|
+
# Add a public context manager if callers ever need to opt out.
|
|
50
|
+
kwargs["creationflags"] = subprocess.CREATE_NO_WINDOW
|
|
51
|
+
return kwargs
|
|
52
|
+
|
|
53
|
+
|
|
43
54
|
DUR_REGEX = re.compile(
|
|
44
55
|
r"Duration: (?P<hour>\d{2}):(?P<min>\d{2}):(?P<sec>\d{2})\.(?P<ms>\d{2})"
|
|
45
56
|
)
|
|
@@ -124,7 +135,7 @@ class CommandRunner:
|
|
|
124
135
|
_logger.debug(f"Running command: {shlex.join(cmd)}")
|
|
125
136
|
with FfmpegProgress(cmd, dry_run=self.dry) as ff:
|
|
126
137
|
yield from ff.run_command_with_progress(
|
|
127
|
-
popen_kwargs=
|
|
138
|
+
popen_kwargs=_get_ffmpeg_popen_kwargs()
|
|
128
139
|
)
|
|
129
140
|
|
|
130
141
|
self.output = ff.stderr
|
|
@@ -156,7 +167,7 @@ class CommandRunner:
|
|
|
156
167
|
stdout=subprocess.PIPE,
|
|
157
168
|
stderr=subprocess.PIPE,
|
|
158
169
|
universal_newlines=False,
|
|
159
|
-
|
|
170
|
+
**_get_ffmpeg_popen_kwargs(),
|
|
160
171
|
)
|
|
161
172
|
|
|
162
173
|
stdout_bytes, stderr_bytes = p.communicate()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ffmpeg_normalize-1.41.0 → ffmpeg_normalize-1.41.1}/src/ffmpeg_normalize/_ffmpeg_normalize.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ffmpeg_normalize-1.41.0 → ffmpeg_normalize-1.41.1}/src/ffmpeg_normalize/data/presets/music.json
RENAMED
|
File without changes
|
{ffmpeg_normalize-1.41.0 → ffmpeg_normalize-1.41.1}/src/ffmpeg_normalize/data/presets/podcast.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|