diff --git a/gamdl/downloader/base.py b/gamdl/downloader/base.py index 18a7d89..805ebac 100644 --- a/gamdl/downloader/base.py +++ b/gamdl/downloader/base.py @@ -51,6 +51,7 @@ class AppleMusicBaseDownloader: output_path: str = "./Apple Music", temp_path: str = ".", nm3u8dlre_path: str = "N_m3u8DL-RE", + ffmpeg_path: str = "ffmpeg", download_mode: DownloadMode = DownloadMode.YTDLP, album_folder_template: str = "{album_artist}/{album}", compilation_folder_template: str = "Compilations/{album}", @@ -69,6 +70,7 @@ class AppleMusicBaseDownloader: self.output_path = output_path self.temp_path = temp_path self.nm3u8dlre_path = nm3u8dlre_path + self.ffmpeg_path = ffmpeg_path self.download_mode = download_mode self.album_folder_template = album_folder_template self.compilation_folder_template = compilation_folder_template @@ -89,10 +91,12 @@ class AppleMusicBaseDownloader: log = logger.bind(action="initialize_binary_paths") self.full_nm3u8dlre_path = shutil.which(self.nm3u8dlre_path) + self.full_ffmpeg_path = shutil.which(self.ffmpeg_path) log = log.debug( "success", full_nm3u8dlre_path=self.full_nm3u8dlre_path, + full_ffmpeg_path=self.full_ffmpeg_path, ) def get_temp_path( @@ -273,6 +277,8 @@ class AppleMusicBaseDownloader: "--no-log", "--log-level", "off", + "--ffmpeg-binary-path", + self.full_ffmpeg_path, "--save-name", download_path_obj.stem, "--save-dir",