Thumbnail is not added to the mp3 #10691

Closed
opened 2026-02-21 05:38:42 -05:00 by deekerman · 3 comments
Owner

Originally created by @persian-telegram on GitHub (May 10, 2017).

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like that [x])
  • Use Preview tab to see how your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.05.09. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

  • [x ] I've verified and I assure that I'm running youtube-dl 2017.05.09

Before submitting an issue make sure you have:

  • [x ] At least skimmed through README and most notably FAQ and BUGS sections
  • [ x] Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • [ x] Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


I am using the Youtube_DL module for python embedding so i wouldn't be able to get the CLI output.

Here is my code:
ydl_opts = {'writethumbnail': true,
'outtmpl': '/home/siyavash/'+fileNAME+'.%(ext)s',
'format': 'bestaudio/best',
'postprocessors': [
{'key': 'FFmpegExtractAudio',
'preferredcodec': 'mp3',
'preferredquality': '192'},
{'key': 'EmbedThumbnail',},

                                    ]

}

Here is Console Output:

WARNING: Parameter outtmpl is bytes, but should be a unicode string. Put from future import unicode_literals at the top of your code file or consider s
witching to Python 3.x.
[youtube] nMB2uCTTvJ0: Downloading webpage
[youtube] nMB2uCTTvJ0: Downloading video info webpage
[youtube] nMB2uCTTvJ0: Extracting video information
WARNING: "id" field is not a string - forcing string conversion
[youtube] nMB2uCTTvJ0: Downloading thumbnail ...
[youtube] nMB2uCTTvJ0: Writing thumbnail to: /home/siyavash/xx_341088146.jpg
[download] Destination: /home/siyavash/xx_341088146.webm
[download] 100% of 2.73MiB in 00:00
[ffmpeg] Destination: /home/siyavash/xx_341088146.mp3
WARNING: Your copy of avconv is outdated, update avconv to version 10-0 or newer if you encounter any errors.
Deleting original file /home/siyavash/xx_341088146.webm (pass -k to keep)
[ffmpeg] Adding thumbnail to "/home/siyavash/xx_341088146.mp3"
WARNING: Your copy of avconv is outdated, update avconv to version 10-0 or newer if you encounter any errors.
ERROR: file:/home/siyavash/xx_341088146.jpg: No such file or directory
ERROR:telegram.ext.dispatcher:An uncaught error was raised while processing the update
Traceback (most recent call last):
File "/home/siyavash/.local/lib/python2.7/site-packages/telegram/ext/dispatcher.py", line 270, in process_update
handler.handle_update(update, self)
File "/home/siyavash/.local/lib/python2.7/site-packages/telegram/ext/messagehandler.py", line 123, in handle_update
return self.callback(dispatcher.bot, update, **optional_args)
File "/home/siyavash/Final3.py", line 367, in echo
path = audioDownloader(chat_id, correctURL)
File "/home/siyavash/Final3.py", line 268, in audioDownloader
ydl.download([correctURL])
File "/home/siyavash/.local/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 1896, in download
url, force_generic_extractor=self.params.get('force_generic_extractor', False))
File "/home/siyavash/.local/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 771, in extract_info
return self.process_ie_result(ie_result, download, extra_info)
File "/home/siyavash/.local/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 825, in process_ie_result
return self.process_video_result(ie_result, download=download)
File "/home/siyavash/.local/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 1539, in process_video_result
self.process_info(new_info)
File "/home/siyavash/.local/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 1877, in process_info
self.post_process(filename, info_dict)
File "/home/siyavash/.local/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 1944, in post_process
self.report_error(e.msg)
File "/home/siyavash/.local/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 589, in report_error
self.trouble(error_message, tb)
File "/home/siyavash/.local/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 559, in trouble
raise DownloadError(message, exc_info)
DownloadError: ERROR: file:/home/siyavash/xx_341088146.jpg: No such file or directory

Description of your issue, suggested solution and other information

This issue happens whenever I try to download the mp3 and embed the thumbnail. I can see the thumbnail in this directory /home/siyavash/xx_341088146.jpg however it still gives me an error.

Explanation of your issue in arbitrary form goes here. Please make sure the description is worded well enough to be understood. Provide as much context and examples as possible.
If work on your issue requires account credentials please provide them or explain how one can obtain them.

Originally created by @persian-telegram on GitHub (May 10, 2017). ## Please follow the guide below - You will be asked some questions and requested to provide some information, please read them **carefully** and answer honestly - Put an `x` into all the boxes [ ] relevant to your *issue* (like that [x]) - Use *Preview* tab to see how your issue will actually look like --- ### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2017.05.09*. If it's not read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected. - [x ] I've **verified** and **I assure** that I'm running youtube-dl **2017.05.09** ### Before submitting an *issue* make sure you have: - [x ] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections - [ x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones ### What is the purpose of your *issue*? - [ x] Bug report (encountered problems with youtube-dl) - [ ] Site support request (request for adding support for a new site) - [ ] Feature request (request for a new functionality) - [ ] Question - [ ] Other --- ### The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your *issue* --- I am using the Youtube_DL module for python embedding so i wouldn't be able to get the CLI output. Here is my code: ydl_opts = {'writethumbnail': true, 'outtmpl': '/home/siyavash/'+fileNAME+'.%(ext)s', 'format': 'bestaudio/best', 'postprocessors': [ {'key': 'FFmpegExtractAudio', 'preferredcodec': 'mp3', 'preferredquality': '192'}, {'key': 'EmbedThumbnail',}, ] } Here is Console Output: WARNING: Parameter outtmpl is bytes, but should be a unicode string. Put from __future__ import unicode_literals at the top of your code file or consider s witching to Python 3.x. [youtube] nMB2uCTTvJ0: Downloading webpage [youtube] nMB2uCTTvJ0: Downloading video info webpage [youtube] nMB2uCTTvJ0: Extracting video information WARNING: "id" field is not a string - forcing string conversion [youtube] nMB2uCTTvJ0: Downloading thumbnail ... [youtube] nMB2uCTTvJ0: Writing thumbnail to: /home/siyavash/xx_341088146.jpg [download] Destination: /home/siyavash/xx_341088146.webm [download] 100% of 2.73MiB in 00:00 [ffmpeg] Destination: /home/siyavash/xx_341088146.mp3 WARNING: Your copy of avconv is outdated, update avconv to version 10-0 or newer if you encounter any errors. Deleting original file /home/siyavash/xx_341088146.webm (pass -k to keep) [ffmpeg] Adding thumbnail to "/home/siyavash/xx_341088146.mp3" WARNING: Your copy of avconv is outdated, update avconv to version 10-0 or newer if you encounter any errors. ERROR: file:/home/siyavash/xx_341088146.jpg: No such file or directory ERROR:telegram.ext.dispatcher:An uncaught error was raised while processing the update Traceback (most recent call last): File "/home/siyavash/.local/lib/python2.7/site-packages/telegram/ext/dispatcher.py", line 270, in process_update handler.handle_update(update, self) File "/home/siyavash/.local/lib/python2.7/site-packages/telegram/ext/messagehandler.py", line 123, in handle_update return self.callback(dispatcher.bot, update, **optional_args) File "/home/siyavash/Final3.py", line 367, in echo path = audioDownloader(chat_id, correctURL) File "/home/siyavash/Final3.py", line 268, in audioDownloader ydl.download([correctURL]) File "/home/siyavash/.local/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 1896, in download url, force_generic_extractor=self.params.get('force_generic_extractor', False)) File "/home/siyavash/.local/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 771, in extract_info return self.process_ie_result(ie_result, download, extra_info) File "/home/siyavash/.local/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 825, in process_ie_result return self.process_video_result(ie_result, download=download) File "/home/siyavash/.local/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 1539, in process_video_result self.process_info(new_info) File "/home/siyavash/.local/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 1877, in process_info self.post_process(filename, info_dict) File "/home/siyavash/.local/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 1944, in post_process self.report_error(e.msg) File "/home/siyavash/.local/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 589, in report_error self.trouble(error_message, tb) File "/home/siyavash/.local/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 559, in trouble raise DownloadError(message, exc_info) DownloadError: ERROR: file:/home/siyavash/xx_341088146.jpg: No such file or directory --- ### Description of your *issue*, suggested solution and other information This issue happens whenever I try to download the mp3 and embed the thumbnail. I can see the thumbnail in this directory /home/siyavash/xx_341088146.jpg however it still gives me an error. Explanation of your *issue* in arbitrary form goes here. Please make sure the [description is worded well enough to be understood](https://github.com/rg3/youtube-dl#is-the-description-of-the-issue-itself-sufficient). Provide as much context and examples as possible. If work on your *issue* requires account credentials please provide them or explain how one can obtain them.
deekerman 2026-02-21 05:38:42 -05:00
  • closed this issue
  • added the
    duplicate
    label
Author
Owner

@dstftw commented on GitHub (May 10, 2017):

Duplicate of #7238.

@dstftw commented on GitHub (May 10, 2017): Duplicate of #7238.
Author
Owner

@persian-telegram commented on GitHub (May 10, 2017):

Can you please give some help instead of just writing "Duplicate"?
How can i write "--prefer-ffmpeg" in python embedded ?

@persian-telegram commented on GitHub (May 10, 2017): Can you please give some help instead of just writing "Duplicate"? How can i write "--prefer-ffmpeg" in python embedded ?
Author
Owner
@dstftw commented on GitHub (May 10, 2017): https://github.com/rg3/youtube-dl/blob/master/youtube_dl/YoutubeDL.py#L299-L300
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#10691
No description provided.