this post was submitted on 26 Jun 2024
12 points (83.3% liked)

Open Source

30771 readers
515 users here now

All about open source! Feel free to ask questions, and share news, and interesting stuff!

Useful Links

Rules

Related Communities

Community icon from opensource.org, but we are not affiliated with them.

founded 5 years ago
MODERATORS
 

Can I have some help regarding using yt-dlp.

  1. How to select a specific duration of video to be downloaded like from 00 to 600 seconds in video of 8 hours.
  2. When downloading songs from youtube with metadata and thumbnail I get thumbnails in rectangular shape instead of square. How to turn them square?

Asking it here cause, Discussion on repository is closed and it is FOSS software.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 4 points 3 months ago

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