diff --git a/yt_dlp/postprocessor/embedthumbnail.py b/yt_dlp/postprocessor/embedthumbnail.py index fb778e233..5fd92fd34 100644 --- a/yt_dlp/postprocessor/embedthumbnail.py +++ b/yt_dlp/postprocessor/embedthumbnail.py @@ -100,7 +100,7 @@ def run(self, info): del audio['APIC'] with open(thumbnail_filename, 'rb') as thumbfile: audio['APIC'] = mutagen.id3.APIC( - encoding=3, mime='image/%s' % thumbnail_ext, type=3, + encoding=mutagen.id3.Encoding.UTF8, mime='image/%s' % thumbnail_ext, type=3, desc=u'Cover (front)', data=thumbfile.read()) audio.save() temp_filename = filename # Mutagen saves to the original file diff --git a/yt_dlp/postprocessor/ffmpeg.py b/yt_dlp/postprocessor/ffmpeg.py index 7107574a7..7baff0a67 100644 --- a/yt_dlp/postprocessor/ffmpeg.py +++ b/yt_dlp/postprocessor/ffmpeg.py @@ -672,6 +672,8 @@ def run(self, info): def embed_lyrics(self, input_files): audio_file = input_files[0] subs = input_files[1] + if len(input_files) > 2: + self.report_warning('More than one subtitle file found. Only one will be embedded') if not subs.endswith('.lrc'): raise PostProcessingError('LRC subtitles required. Use "--convert-subs lrc" to convert') @@ -679,7 +681,7 @@ def embed_lyrics(self, input_files): lyrics = f.read().strip() if audio_file.endswith('.mp3'): audio = mutagen.id3.ID3(audio_file) - audio.add(mutagen.id3.USLT(encoding=3, lang='eng', desc='', text=lyrics)) + audio.add(mutagen.id3.USLT(encoding=mutagen.id3.Encoding.UTF8, lang='und', desc='', text=lyrics)) audio.save() else: metadata = mutagen.File(audio_file)