From 56a210b4b7426d6b5f2bb0c40b7a4568e0de7ab6 Mon Sep 17 00:00:00 2001 From: dev Date: Fri, 15 May 2026 17:41:12 +0200 Subject: [PATCH] fix: subtitle embedding broken via Python API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit embedsubtitles:True is a CLI-only option — it registers FFmpegEmbedSubtitlePP only via __init__.py's opts processing, not when using YoutubeDL() directly. Must explicitly declare the postprocessor via the 'postprocessors' key. Co-Authored-By: Claude Sonnet 4.6 --- downloader.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/downloader.py b/downloader.py index 83481cc..1e4ad56 100644 --- a/downloader.py +++ b/downloader.py @@ -269,7 +269,10 @@ class DownloadManager: ydl_opts.update({ "writesubtitles": True, "subtitleslangs": ["fr"], - "embedsubtitles": True, + # embedsubtitles:True is CLI-only — must register the postprocessor explicitly + "postprocessors": [ + {"key": "FFmpegEmbedSubtitle", "already_have_subtitle": False}, + ], }) # "embedsubtitle+ffmpeg_o" sets title + default disposition during subtitle embed ydl_opts["postprocessor_args"]["embedsubtitle+ffmpeg_o"] = (