From 0258026ebd81e9c068fec6039b37c70e6fbee8de Mon Sep 17 00:00:00 2001 From: Lucas Date: Sun, 23 Apr 2023 18:30:54 -0300 Subject: [PATCH] fixed audio post processing audio download bug --- video_creation/background.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/video_creation/background.py b/video_creation/background.py index 8c3dcee..d27ee6b 100644 --- a/video_creation/background.py +++ b/video_creation/background.py @@ -7,7 +7,6 @@ from typing import Any, Tuple,Dict from moviepy.editor import VideoFileClip,AudioFileClip from moviepy.video.io.ffmpeg_tools import ffmpeg_extract_subclip -from pytube.cli import on_progress from utils import settings from utils.console import print_step, print_substep import yt_dlp @@ -106,10 +105,7 @@ def download_background_audio(background_config: Tuple[str, str, str]): ydl_opts = { 'outtmpl': f'./assets/backgrounds/audio/{credit}-{filename}', 'format': 'bestaudio/best', - 'postprocessors': [{ - 'preferredcodec': 'mp3', - 'preferredquality': '192', - }], + 'extract_audio': True, } with yt_dlp.YoutubeDL(ydl_opts) as ydl: