diff --git a/api/app.py b/api/app.py index 2f7e246..3167461 100644 --- a/api/app.py +++ b/api/app.py @@ -155,7 +155,8 @@ def download(): if mode == "video": if format_id: - ydl_opts["format"] = format_id + # Use specific format ID + best audio, then merge + ydl_opts["format"] = f"{format_id}+bestaudio/best" else: ydl_opts["format"] = "bestvideo*+bestaudio/best" else: