From 7e9a53d83ca7f15c37e9e6415504a168bfa91723 Mon Sep 17 00:00:00 2001 From: AmanoSpica Date: Sat, 11 Apr 2026 21:27:50 +0900 Subject: [PATCH] fix: add audio codec specification to download command --- app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app.py b/app.py index 703f435..fefd034 100644 --- a/app.py +++ b/app.py @@ -20,11 +20,11 @@ def run_download(job_id, url, format_choice, format_id): cmd = ["yt-dlp", "--no-playlist", "-o", out_template] if format_choice == "audio": - cmd += ["-x", "--audio-format", "mp3"] + cmd += ["-x", "--audio-format", "mp3", "-S", "acodec:aac"] elif format_id: - cmd += ["-f", f"{format_id}+bestaudio/best", "--merge-output-format", "mp4"] + cmd += ["-f", f"{format_id}+bestaudio/best", "--merge-output-format", "mp4", "-S", "acodec:aac"] else: - cmd += ["-f", "bestvideo+bestaudio/best", "--merge-output-format", "mp4"] + cmd += ["-f", "bestvideo+bestaudio/best", "--merge-output-format", "mp4", "-S", "acodec:aac"] cmd.append(url)