From eb0e85faa7958d9b26e75d789720fa099c6b49df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Thu, 18 Apr 2019 16:37:27 +0200 Subject: [PATCH] postprocess to 256 kbps mp3 --- delojza.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/delojza.py b/delojza.py index cac2191..bb60b88 100755 --- a/delojza.py +++ b/delojza.py @@ -79,10 +79,11 @@ class DelojzaBot: } if extract: ydl_opts['format'] = 'bestaudio' - # ydl_opts['postprocessors'] = [{ - # 'key': 'FFmpegExtractAudio', - # 'preferredcodec': 'wav' - # }] + ydl_opts['postprocessors'] = [{ + 'key': 'FFmpegExtractAudio', + 'preferredcodec': 'mp3', + 'preferredquality': '256' + }] with youtube_dl.YoutubeDL(ydl_opts) as ydl: ydl.download(urls) out_dir = os.path.join(self.out_dir, subdir)