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.
|
pathlib.Path: Path to the converted MP4 file.
|
||||||
"""
|
"""
|
||||||
path_file_out: pathlib.Path = path_file.with_suffix(AudioExtensions.MP4)
|
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 = (
|
||||||
FFmpeg(executable=self.settings.data.path_binary_ffmpeg)
|
FFmpeg(executable=self.settings.data.path_binary_ffmpeg)
|
||||||
.option("y")
|
.option("y")
|
||||||
@@ -1700,6 +1703,8 @@ class Download:
|
|||||||
|
|
||||||
ffmpeg.execute()
|
ffmpeg.execute()
|
||||||
|
|
||||||
|
self.fn_logger.debug(f"Video conversion complete: {path_file_out.name}")
|
||||||
|
|
||||||
return path_file_out
|
return path_file_out
|
||||||
|
|
||||||
def _extract_flac(self, path_media_src: pathlib.Path) -> pathlib.Path:
|
def _extract_flac(self, path_media_src: pathlib.Path) -> pathlib.Path:
|
||||||
@@ -1712,6 +1717,9 @@ class Download:
|
|||||||
pathlib.Path: Path to the extracted FLAC file.
|
pathlib.Path: Path to the extracted FLAC file.
|
||||||
"""
|
"""
|
||||||
path_media_out = path_media_src.with_suffix(AudioExtensions.FLAC)
|
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 = (
|
||||||
FFmpeg(executable=self.settings.data.path_binary_ffmpeg)
|
FFmpeg(executable=self.settings.data.path_binary_ffmpeg)
|
||||||
.option("hide_banner")
|
.option("hide_banner")
|
||||||
@@ -1729,6 +1737,8 @@ class Download:
|
|||||||
|
|
||||||
ffmpeg.execute()
|
ffmpeg.execute()
|
||||||
|
|
||||||
|
self.fn_logger.debug(f"FLAC extraction complete: {path_media_out.name}")
|
||||||
|
|
||||||
return path_media_out
|
return path_media_out
|
||||||
|
|
||||||
def _extract_video_stream(self, m3u8_variant: m3u8.M3U8, quality: int) -> tuple[m3u8.M3U8 | bool, str]:
|
def _extract_video_stream(self, m3u8_variant: m3u8.M3U8, quality: int) -> tuple[m3u8.M3U8 | bool, str]:
|
||||||
|
|||||||
@@ -43,8 +43,8 @@ class Settings:
|
|||||||
cover_album_file: bool = True
|
cover_album_file: bool = True
|
||||||
extract_flac: bool = True
|
extract_flac: bool = True
|
||||||
downloads_simultaneous_per_track_max: int = 20
|
downloads_simultaneous_per_track_max: int = 20
|
||||||
download_delay_sec_min: float = 1.0
|
download_delay_sec_min: float = 3.0
|
||||||
download_delay_sec_max: float = 3.0
|
download_delay_sec_max: float = 5.0
|
||||||
album_track_num_pad_min: int = 1
|
album_track_num_pad_min: int = 1
|
||||||
downloads_concurrent_max: int = 3
|
downloads_concurrent_max: int = 3
|
||||||
symlink_to_track: bool = False
|
symlink_to_track: bool = False
|
||||||
|
|||||||
Reference in New Issue
Block a user