💻
Cheatsheets
  • Most Useful Command Line Tools: 50 Cool Tools to Improve Your Workflow, Boost Productivity, and More
  • 7_tips_to_reverse_engineer_javascript
  • Configuring a Repl
  • How to create your command-line program (CLI) with NodeJS and Commander.js | by Duc N. | JavaScript
  • replit Node.JS 24/7 Project Hoster
  • cheatsheets
  • Alacritty, Tmux, and Vim
  • amethyst
  • Android
  • Installing Arch Linux
  • Arch Linux
  • aria2
  • bin
  • bspwm
  • Chocolately Notes
  • command_line_pipes
  • CSS Grid
  • curl
  • The curl guide to HTTP requests
  • Docker
  • Easymotion
  • Emmet
  • Favorite figlet fonts
  • FFMPEG
  • figlet
  • File Serve
  • File Transfer
  • fish shell
  • Front End Dev Links
  • How to use Git.io to shorten GitHub URLs and create vanity URLs
  • Git
  • Downloading a Tarball from GitHub
  • Make Infinite Gmail Addresses For One Inbox
  • How To Use GPG on the Command Line
  • guide_to_fish_completions
  • Homebrew
  • How to clean Arch Linux
  • HTML5 Boilerplate
  • Install
  • All the keyboard shortcuts you’ll ever need for Safari on iPad
  • iosevka
  • iPhone
  • ish (iOS)
  • Javascript Notes
  • jq
  • Jupyter Notebooks
  • Lettering
  • lf-wiki
  • lf
  • Command Line
  • Adding a swapfile after a clean installation without swap partition
  • mac_bluetooth_issues
  • Mac Terminal
  • maim
  • markdown-sample
  • Markdown Notes
  • Images in README.md Markdown Files
  • Organizing information with tables
  • md_cheatsheet
  • NiftyWindows Help
  • nix
  • Justin Restivo - A Portable Text Editor: Nix <3 Neovim
  • NPM
  • neovim configuration
  • Pastery
  • Powershell
  • Table of Basic PowerShell Commands | Scripting Blog
  • Powershell Modules
  • Puppeteer
  • Python
  • rclone-colab
  • replit
  • Hi there, I'm Raju Ghorai - a.k.a. [coderj001]
  • Scriptable
  • Servor
  • Replacing Postlight’s Mercury scraping service with your self-hosted copy
  • Shell Scripts
  • skhd
  • Spicetify
  • SSH
  • SurfingKeys
  • tar
  • Terminal Web Browser Docker
  • Text Generators
  • tmux shortcuts & cheatsheet
  • unicode
  • VIM
  • VIM Diff
  • vi Complete Key Binding List
  • 8 Essential Vim Editor Navigation Fundamentals
  • Vim Shortcut Keys
  • Vite
  • VNC
  • web-servers
  • Web Server
  • Windows Command Line
  • Writeguard
  • WSL Cheatsheet
  • youtube-dl
  • zsh Plugins
  • zspotify
Powered by GitBook
On this page
  • Options
  • My Settinngs
  • Download specific part of video with ffmpeg
  • Save screenshot of specific time
  • Download Best Quality
  • Other Options

Was this helpful?

youtube-dl

Options

My Settinngs

-format "(bestvideo[vcodec^=av01][height>=720][fps>30]/bestvideo[vcodec=vp9.2][height>=720][fps>30]/bestvideo[vcodec=vp9][height>=720][fps>30]/bestvideo[vcodec^=av01][height>=720]/bestvideo[vcodec=vp9.2][height>=720]/bestvideo[vcodec=vp9][height>=720]/bestvideo[height>=720]/bestvideo)+(bestaudio[acodec=opus]/bestaudio)/best" -force-ipv4 --no-continue --download-archive archive.log --add-metadata --write-description --write-info-json --write-annotations --write-thumbnail --embed-thumbnail --sub-format "srt" --embed-subs --write-auto-sub

Download specific part of video with ffmpeg

yt-dlp --download-sections "*07:35-07:45" https://www.youtube.com/watch?v=vidid

Save screenshot of specific time

Just replace the url and the time (2:22)

ffmpeg -ss 2:22 -i $(yt-dlp -f 137 --get-url "https://youtu.be/sL6SgDEHH00") -vframes 1 -q:v 2 out.png

Download Best Quality

--format "(bestvideo[vcodec^=av01][height>=1080][fps>30]/bestvideo[vcodec=vp9.2][height>=1080][fps>30]/bestvideo[vcodec=vp9][height>=1080][fps>30]/bestvideo[vcodec^=av01][height>=1080]/bestvideo[vcodec=vp9.2][height>=1080]/bestvideo[vcodec=vp9][height>=1080]/bestvideo[height>=1080]/bestvideo[vcodec^=av01][height>=720][fps>30]/bestvideo[vcodec=vp9.2][height>=720][fps>30]/bestvideo[vcodec=vp9][height>=720][fps>30]/bestvideo[vcodec^=av01][height>=720]/bestvideo[vcodec=vp9.2][height>=720]/bestvideo[vcodec=vp9][height>=720]/bestvideo[height>=720]/bestvideo)+(bestaudio[acodec=opus]/bestaudio)/best"

Courtesy of Veloldo, tell youtube-dl to download the best quality available prioritizing the most compressed/recent codecs

I'm going to modify it to take out 1080p

Other Options

--verbose : Tell youtube-dl to print various debugging information

--force-ipv4 : Tell youtube-dl to use IPv4, needed because lots of hosting and VPNs providers don't support IPv6.

--ignore-errors : Tell youtube-dl to continue on download errors (for example to skip unavailable videos in a playlist)

--no-continue : Tell youtube-dl not to resume partially downloaded files and to restart from the beginning (Mainly to avoid corruption)

--no-overwrites : Tell youtube-dl not to overwrite existing files (Useful when metadata has already been downloaded)

--download-archive archive.log : Tell youtube-dl to write every video that has been downloaded in archive.log to automatically skip them next time the script is started

--add-metadata : Tell youtube-dl to write metadata to the video files

--write-description : Tell youtube-dl to write video description to a .description file

--write-info-json : Tell youtube-dl to write video metadata to a .info.json file

--write-annotations : Tell youtube-dl to write video annotations to a .annotations.xml file

--write-thumbnail : Tell youtube-dl to write thumbnail image to disk

--embed-thumbnail : Tell youtube-dl to embed thumbnail in the audio as cover art (only useful when downloading audio-only content like podcast)

--all-subs : Tell youtube-dl to download all the available subtitles of the video

--sub-format "srt" : Tell youtube-dl to prioritize .srt subtitles

--embed-subs : Tell youtube-dl to embed subtitles in the video

(Channels Scripts) --output "%(uploader)s/%(uploader)s - %(upload_date)s - %(title)s/%(uploader)s - %(upload_date)s - %(title)s.%(ext)s" : Tell youtube-dl to download the videos in folders and subfolders, using the naming scheme Uploader/Uploader - 20191231 - Title/Uploader - 20191231 - Title.ext

(Playlists Scripts) --output "%(playlist)s (%(uploader)s)/%(upload_date)s - %(title)s/%(upload_date)s - %(title)s.%(ext)s" : Tell youtube-dl to download the videos in folders and subfolders, using the naming scheme PlaylistName - Uploader/20191231 - Title/20191231 - Title.ext

(Unique Scripts) --output "%(title)s - %(uploader)s - %(upload_date)s/%(title)s - %(uploader)s - %(upload_date)s.%(ext)s" : Tell youtube-dl to download the videos in folders and subfolders, using the naming scheme Title - Uploader - 20191231/Title - Uploader - 20191231.ext

--merge-output-format "mkv" : Tell youtube-dl to merge the video and audio that were downloaded separately in a .mkv file

(Archive Scripts) --datebefore 20181231 : Tell youtube-dl to download everything that was created before December 31, 2018 (included).

(Active Scripts) --dateafter 20190101 : Tell youtube-dl to download everything that was created after January 1, 2019 (included).

--batch-file "Source - XXXXXX.txt" : Tell youtube-dl to look for links in Source - XXXXXX.txt

PreviousWSL CheatsheetNextzsh Plugins

Last updated 1 year ago

Was this helpful?