fixed audio post processing audio download bug

This commit is contained in:
Lucas committed 2023-04-23 18:30:54 -03:00
1 parent d9ff36b034
commit 0258026ebd
1 file changed
+1 -5
+1 -5
View File
@@ -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: