mirror of
https://github.com/l1ving/youtube-dl
synced 2025-02-03 12:02:54 +08:00
Put back mp3 first
This commit is contained in:
parent
d5bb4d18fc
commit
fbb4e6a746
@ -43,7 +43,13 @@ class EmbedThumbnailPP(FFmpegPostProcessor):
|
||||
if info['ext'] not in ['mp3', 'mkv', 'm4a', 'mp4']:
|
||||
raise EmbedThumbnailPPError('Only mp3, m4a/mp4 and mkv are supported for thumbnail embedding for now.')
|
||||
|
||||
if info['ext'] == 'mkv':
|
||||
if info['ext'] == 'mp3':
|
||||
options = [
|
||||
'-c', 'copy', '-map', '0', '-map', '1',
|
||||
'-metadata:s:v', 'title="Album cover"', '-metadata:s:v', 'comment="Cover (Front)"']
|
||||
input_paths = [filename, thumbnail_filename]
|
||||
|
||||
elif info['ext'] == 'mkv':
|
||||
if thumbnail_filename.endswith(('.jpe', '.jpeg', '.jpg', '.jfif')):
|
||||
mimetype = 'image/jpeg'
|
||||
extension = 'jpg'
|
||||
@ -68,12 +74,6 @@ class EmbedThumbnailPP(FFmpegPostProcessor):
|
||||
'-metadata:s:t', 'title=Thumbnail']
|
||||
input_paths = [filename]
|
||||
|
||||
elif info['ext'] == 'mp3':
|
||||
options = [
|
||||
'-c', 'copy', '-map', '0', '-map', '1',
|
||||
'-metadata:s:v', 'title="Album cover"', '-metadata:s:v', 'comment="Cover (Front)"']
|
||||
input_paths = [filename, thumbnail_filename]
|
||||
|
||||
if info['ext'] in ['mkv', 'mp3']:
|
||||
self._downloader.to_screen('[ffmpeg] Adding thumbnail to "%s"' % filename)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user