Embedding thumbnail raise errors #8314

Closed
opened 2026-02-21 04:19:43 -05:00 by deekerman · 1 comment
Owner

Originally created by @gigalala on GitHub (Jul 28, 2016).

Hi,
When i added "embed thumbnail" option to my script i got error:

thumbnail_filename = info['thumbnails'][-1]['filename'] KeyError: 'filename'

Here is my code:

        ydl_opts = {
            'key':'IgnoreErrors',
            'format': 'bestaudio/best',
            'download_archive': self.songs_data,
            'outtmpl': '/'+download_path+'/'+'%(title)s.%(ext)s',
            'progress_hooks': [self.my_hook],
            'postprocessors': [{
                'key': 'FFmpegExtractAudio',
                'preferredcodec': 'mp3',
                'preferredquality': '192'},
                {'key': 'EmbedThumbnail'},]}

Not sure if its a bug or just me doing something wrong but i tried everything

Originally created by @gigalala on GitHub (Jul 28, 2016). Hi, When i added "embed thumbnail" option to my script i got error: `thumbnail_filename = info['thumbnails'][-1]['filename'] KeyError: 'filename'` Here is my code: ``` ydl_opts = { 'key':'IgnoreErrors', 'format': 'bestaudio/best', 'download_archive': self.songs_data, 'outtmpl': '/'+download_path+'/'+'%(title)s.%(ext)s', 'progress_hooks': [self.my_hook], 'postprocessors': [{ 'key': 'FFmpegExtractAudio', 'preferredcodec': 'mp3', 'preferredquality': '192'}, {'key': 'EmbedThumbnail'},]} ``` Not sure if its a bug or just me doing something wrong but i tried everything
deekerman 2026-02-21 04:19:43 -05:00
Author
Owner

@dstftw commented on GitHub (Jul 28, 2016):

Carefully read new issue template and provide all requested information.

@dstftw commented on GitHub (Jul 28, 2016): Carefully read [new issue template](https://github.com/rg3/youtube-dl/issues/new) and provide all requested information.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl-ytdl-org#8314
No description provided.