- There is the
--download-sections
option. Looking at it, you might want to use--download-sections "*0:00-1:00"
. - I briefly checked with
--list-thumbnails
and it doesn't look like YouTube offers any square ones, so I would look into using ImageMagick to edit the image with a command. I doubt yt-dlp allows you to do any sort of image manipulation out of the box.
Open Source
All about open source! Feel free to ask questions, and share news, and interesting stuff!
Useful Links
- Open Source Initiative
- Free Software Foundation
- Electronic Frontier Foundation
- Software Freedom Conservancy
- It's FOSS
- Android FOSS Apps Megathread
Rules
- Posts must be relevant to the open source ideology
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon from opensource.org, but we are not affiliated with them.
For selecting durations, you can use this --download-sections REGEX
Download only chapters that match the regular expression. A "*" prefix denotes time-range instead of chapter. Negative timestamps are calculated from the end. "*from-url" can be used to download between the "start_time" and "end_time" extracted from the URL. Needs ffmpeg. This option can be used multiple times to download multiple sections, e.g.
--download-sections "*10:15-inf" --download-sections "intro"
As for the thumbnails, usually, when I download a Youtube Music album thumbnail, it is already squared. Before that, I used to use a specific hack, but I don't remember how I did it anymore. Check this discussion, it may help: https://github.com/yt-dlp/yt-dlp/issues/429
You can use the --download-sections
parameter to specify a time range. --download-sections "*0-600"
would download the first 600 seconds to the nearest keyframe. To make it exact, you would have to re-encode the video after downloading it.
For making the thumbnail square, you will probably have to write a script to extract it, crop it, and re-insert it.