]> jfr.im git - yt-dlp.git/commitdiff
[postprocessor/EmbedThumbnail,postprocessor/FFmpegMetadata] Fix error on attaching...
authorLesmiscore <redacted>
Mon, 27 Mar 2023 16:17:42 +0000 (01:17 +0900)
committerGitHub <redacted>
Mon, 27 Mar 2023 16:17:42 +0000 (01:17 +0900)
Authored by: Lesmiscore

Current yt-dlp code never hit this bug, but would hit once filename sanitization gets better

yt_dlp/postprocessor/embedthumbnail.py
yt_dlp/postprocessor/ffmpeg.py

index b02d9d499d752ed47aa10407708b2f8a17b73a20..88a767132acd7613967af0cd39828ed0da19e3e8 100644 (file)
@@ -107,7 +107,7 @@ def run(self, info):
                 options.extend(['-map', '-0:%d' % old_stream])
                 new_stream -= 1
             options.extend([
-                '-attach', thumbnail_filename,
+                '-attach', self._ffmpeg_filename_argument(thumbnail_filename),
                 '-metadata:s:%d' % new_stream, 'mimetype=%s' % mimetype,
                 '-metadata:s:%d' % new_stream, 'filename=cover.%s' % thumbnail_ext])
 
index 0e8f4c70b118dbb70d74f9fe792486d0dafe4a27..63fc9ace65b35d294d5e33a1ce46790babe0a53f 100644 (file)
@@ -809,7 +809,7 @@ def _get_infojson_opts(self, info, infofn):
             new_stream -= 1
 
         yield (
-            '-attach', infofn,
+            '-attach', self._ffmpeg_filename_argument(infofn),
             f'-metadata:s:{new_stream}', 'mimetype=application/json',
             f'-metadata:s:{new_stream}', 'filename=info.json',
         )