fix(ffmpeg): prevent terminal window flash on Windows during media conversion
This commit is contained in:
@@ -1689,6 +1689,9 @@ 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")
|
||||
@@ -1699,6 +1702,8 @@ class Download:
|
||||
)
|
||||
|
||||
ffmpeg.execute()
|
||||
|
||||
self.fn_logger.debug(f"Video conversion complete: {path_file_out.name}")
|
||||
|
||||
return path_file_out
|
||||
|
||||
@@ -1712,6 +1717,9 @@ 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")
|
||||
@@ -1728,6 +1736,8 @@ class Download:
|
||||
)
|
||||
|
||||
ffmpeg.execute()
|
||||
|
||||
self.fn_logger.debug(f"FLAC extraction complete: {path_media_out.name}")
|
||||
|
||||
return path_media_out
|
||||
|
||||
|
||||
Reference in New Issue
Block a user