DEV Community

Ian Muchina
Ian Muchina

Posted on • Originally published at ianmuchina.com on

Some youtube-dl aliases

defaults

alias ydl='youtube-dl -o "./%(title)s.%(ext)s"'

Enter fullscreen mode Exit fullscreen mode
  • Doesn’t change much of the defaults. Only removes unnecessary info from filename eg: video-title-dQw4w9WgXcQ.mp4 to video-title.mp4

720p single video

alias yhd='youtube-dl -f "[height<=720]" -o "~/Videos/%(uploader)s/%(title)s.%(ext)s" --no-playlist '

Enter fullscreen mode Exit fullscreen mode
  • 720p
  • Single video. No playlist
  • Saves to ~/Videos/Uploader/Title.mp4

720p video playlist

alias ypl='youtube-dl -f "[height<=720]" -o "~/Videos/%(uploader)s/%(playlist)s/%(title)s.%(ext)s" '

Enter fullscreen mode Exit fullscreen mode
  • 720p
  • Downloads entire playlist
  • Saves to ~/Videos/Uploader/Playlist/Title.mp4

Audio

alias ymp3='youtube-dl -f "bestaudio" -o "~/Music/%(uploader)s/%(title)s.%(ext)s" --no-playlist -x --audio-format mp3 --embed-thumbnail ' 

Enter fullscreen mode Exit fullscreen mode
  • mp3
  • Single audio. No playlist
  • Saves to ~/Music/Uploader/Title.mp3
  • Adds thumbnail as cover art

Audio Playlist

alias ypl3='youtube-dl -f "bestaudio" -o "~/Music/%(uploader)s/%(playlist)s/%(title)s.%(ext)s" -x --audio-format mp3 --embed-thumbnail'

Enter fullscreen mode Exit fullscreen mode
  • Downloads entire playlist
  • Saves to ~/Videos/Uploader/Playlist/Title.mp3
  • Adds thumbnail as cover art

Top comments (0)