Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing thumbnails formats selection #28752

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

andrea-aus-hh
Copy link

Please follow the guide below

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

Before submitting a pull request make sure you have:

In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

  • Bug fix
  • Improvement
  • New extractor
  • New feature

Description of your pull request and other information

Responding to this feature req:
#28726

Trying to add a --thumbnail-format option, that allows the user to choose which of the available thumbnails to download.
It takes the ID (as reported with the --list-thumbnails options) as input, and falls back to the default one (last element of the thumbnails dictionary) if the ID is invalid.
Not sure if it's the best idea to use a separate option like I did, or if it would be better to collapse everything into --write-thumbnail, though I'd be afraid to break existing scripts. Glad to get input on this - well, or any input in general :-)
Pardon the multiple commits.

Usage example:
python -m youtube_dl --write-thumbnail --thumbnail-format 2 https://www.youtube.com/watch?v=YQ04r4HGS-U

@andrea-aus-hh andrea-aus-hh changed the title Trying to implement a simple thumbnails formats selection Implementing thumbnails formats selection May 6, 2021
@aviv926
Copy link

aviv926 commented Sep 26, 2021

Hi Hello below for the thread I opened #28457 and this thread #28726

I saw that you added the option to the--list-thumbnails
I really appreciate it!

I wanted to ask is it possible to create a command that downloads all the images as a jpg from a YouTube channel?
I tried running the following command but without success:
youtube-dl.exe --write-thumbnail '[ext = jpg]' [URL HERE]
or this
youtube-dl.exe --write-thumbnail -4 --skip-download --output "%(title)s.%(ext)s" [URL HERE]

@Rashad-j
Copy link

I this going to be merged by any chance?

@aviv926
Copy link

aviv926 commented Apr 18, 2022

I this going to be merged by any chance?

Check out the enhanced version of youtube-dl
There is a better version called yt dlp and the option is already supported

yt-dlp.exe --skip-download --write-thumbnail --convert-thumbnails jpg **URL HERE**

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants