]> jfr.im git - yt-dlp.git/commitdiff
[embedthumbnail] Fix for missing output filename for ffmpeg call (Closes #38)
authorpukkandan <redacted>
Thu, 28 Jan 2021 08:47:18 +0000 (14:17 +0530)
committerpukkandan <redacted>
Thu, 28 Jan 2021 10:18:33 +0000 (15:48 +0530)
youtube_dlc/postprocessor/embedthumbnail.py
youtube_dlc/postprocessor/ffmpeg.py

index bad005cca5f097524ea07a37d85f7d20e7f71da5..2bce72bea3d341c794d10deecf81f7e7d40679a3 100644 (file)
@@ -155,7 +155,7 @@ def is_webp(path):
             if not _has_mutagen:
                 raise EmbedThumbnailPPError('module mutagen was not found. Please install.')
             size_regex = r',\s*(?P<w>\d+)x(?P<h>\d+)\s*[,\[]'
-            size_result = self.run_ffmpeg_multiple_files([thumbnail_filename], '', ['-hide_banner'])
+            size_result = self.run_ffmpeg(thumbnail_filename, thumbnail_filename, ['-hide_banner'])
             mobj = re.search(size_regex, size_result)
             width, height = int(mobj.group('w')), int(mobj.group('h'))
             mimetype = ('image/%s' % ('png' if thumbnail_ext == 'png' else 'jpeg')).encode('ascii')
index 94eeec98081718722888c7ede938b9dbff38d21b..2bc75e78400319659f9145efdb88c382b9ef3483 100644 (file)
@@ -268,7 +268,7 @@ def run_ffmpeg_multiple_files(self, input_paths, out_path, opts):
         return stderr.decode('utf-8', 'replace')
 
     def run_ffmpeg(self, path, out_path, opts):
-        self.run_ffmpeg_multiple_files([path], out_path, opts)
+        return self.run_ffmpeg_multiple_files([path], out_path, opts)
 
     def _ffmpeg_filename_argument(self, fn):
         # Always use 'file:' because the filename may contain ':' (ffmpeg