mirror of
https://github.com/yt-dlp/yt-dlp
synced 2024-11-16 07:48:01 +01:00
[embedthumbnail] Fix for missing output filename for ffmpeg call (Closes #38)
This commit is contained in:
parent
8d0ea5f955
commit
ece8a2a1b6
2 changed files with 2 additions and 2 deletions
|
@ -155,7 +155,7 @@ class EmbedThumbnailPP(FFmpegPostProcessor):
|
|||
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')
|
||||
|
|
|
@ -268,7 +268,7 @@ class FFmpegPostProcessor(PostProcessor):
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue