diff options
| author | exislow <exislow@users.noreply.github.com> | 2025-11-29 17:05:03 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-29 17:05:03 +0100 |
| commit | 45977986dfa7dde065233099b4c86c74cc9ea163 (patch) | |
| tree | 081cd0040bae20f97ae0bea7b74ab84b4f08126e | |
| parent | 98da6bc795961eb0c3b2efc82bea685ed661bba1 (diff) | |
| parent | 4b9a4062d2e40c79c9c4d2892ce77602811052f5 (diff) | |
| download | tidal-dl-ng-45977986dfa7dde065233099b4c86c74cc9ea163.tar.gz | |
Merge pull request #668 from jotalevi/hide-ffmpeg-flash
fix(ffmpeg): prevent terminal window flash on Windows during media conversion
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | tidal_dl_ng/download.py | 14 |
2 files changed, 15 insertions, 0 deletions
@@ -1,4 +1,5 @@ docs/source +vs_code/ # From https://raw.githubusercontent.com/github/gitignore/main/Python.gitignore diff --git a/tidal_dl_ng/download.py b/tidal_dl_ng/download.py index a95f351..728b45f 100644 --- a/tidal_dl_ng/download.py +++ b/tidal_dl_ng/download.py @@ -1689,14 +1689,21 @@ class Download: pathlib.Path: Path to the converted MP4 file. """ path_file_out: pathlib.Path = path_file.with_suffix(AudioExtensions.MP4) + + self.fn_logger.debug(f"Converting video: {path_file.name} -> {path_file_out.name}") + ffmpeg = ( FFmpeg(executable=self.settings.data.path_binary_ffmpeg) .option("y") + .option("hide_banner") + .option("nostdin") .input(url=path_file) .output(url=path_file_out, codec="copy", map=0, loglevel="quiet") ) ffmpeg.execute() + + self.fn_logger.debug(f"Video conversion complete: {path_file_out.name}") return path_file_out @@ -1710,8 +1717,13 @@ class Download: pathlib.Path: Path to the extracted FLAC file. """ path_media_out = path_media_src.with_suffix(AudioExtensions.FLAC) + + self.fn_logger.debug(f"Extracting FLAC: {path_media_src.name} -> {path_media_out.name}") + ffmpeg = ( FFmpeg(executable=self.settings.data.path_binary_ffmpeg) + .option("hide_banner") + .option("nostdin") .input(url=path_media_src) .output( url=path_media_out, @@ -1724,6 +1736,8 @@ class Download: ) ffmpeg.execute() + + self.fn_logger.debug(f"FLAC extraction complete: {path_media_out.name}") return path_media_out |
