fix: subtitle embedding broken via Python API
Docker / docker (push) Successful in 1m38s

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 <noreply@anthropic.com>
This commit is contained in:
dev
2026-05-15 17:41:12 +02:00
parent 32f2d412ed
commit 56a210b4b7
+4 -1
View File
@@ -269,7 +269,10 @@ class DownloadManager:
ydl_opts.update({ ydl_opts.update({
"writesubtitles": True, "writesubtitles": True,
"subtitleslangs": ["fr"], "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 # "embedsubtitle+ffmpeg_o" sets title + default disposition during subtitle embed
ydl_opts["postprocessor_args"]["embedsubtitle+ffmpeg_o"] = ( ydl_opts["postprocessor_args"]["embedsubtitle+ffmpeg_o"] = (