I just saw the huge list of sites that yt-dl supports, and it’s … well staggering. I’ve been playing around with it a bit more, and I’m writing custom aliases for ease of downloading. For example I made:

alias bandcamp-dl="youtube-dl -x --audio-format mp3 --add-metadata -o '~/Music/%(artist)s/%(album)s/%(track_number)02d - %(track)s.%(ext)s'"

That alias allows me to do bandcamp-dl <http://some-album.url>, and then it creates the proper artist and album directories in my music library, adds the tracks as mp3s with formatted file names, and sets their metadata so my music app can pick it up.

Anyone else have some handy aliases or yt-dl commands that do something cool?

@ajr
link
1
edit-2
7d

OMG how could I haven’t thought about this… I’m always opening up a text file to copy the command I use… The commands I use which I’ll now turn to aliases are:

  • youtube-dl -f ‘best[height<=720]’ -ciwq “url”&
  • youtube-dl -f ‘best[height<=720]’ --download-archive downloaded.txt --no-post-overwrites -ciwq -o “%(title)s.%(ext)s” “url”&
  • youtube-dl -f ‘best[height<=720]’ -ciwq -o “%(title)s.%(ext)s” --batch-file=‘/path/to/batch-file.txt’

I’ve found this: oh-my-zsh youtube-dl plugin. And I’ve also added them to my dotfiles.

@not_a_cop
link
710M

I use dl-a for download audio (usually music) and dl-a-clipboard for download from clipboard.

alias dl-a=“youtube-dl -x --prefer-free-formats --add-metadata -o ‘~/music/%(stuff)’” alias dl-a-clipboard=“dl-a $(xclip --…)”

Also you can use MPV for viewing any of those videos without a web browser and all your default configs.

@HMH
link
49M

Something cool I figured out just recently is that youtube_dl can also search for videos. That’s why I made a small wrapper that lets you search YouTube via CLI: https://lemmy.ml/post/60177

kazutrash
link
210M

I never thought on using yt-dl like this, you gave me some ideas, usually i’d be just typing every single time i wanted to download something.

@noobda
banned
link
0
edit-2
10M

removed by mod

Welcome to /c/piracy

No netflix or streaming services landlubbers allowed, this is pirates territory.

#pirateactivism Matrix chat

/r/piracy subreddit backup

  • 0 users online
  • 11 users / day
  • 27 users / week
  • 111 users / month
  • 155 users / 6 months
  • 2.61K subscribers
  • 168 Posts
  • 734 Comments
  • Modlog