Skip to content

Instantly share code, notes, and snippets.

@mayeaux
Forked from thewheat/youtube-dl.md5
Created September 18, 2020 01:07

Revisions

  1. @thewheat thewheat created this gist Sep 7, 2019.
    38 changes: 38 additions & 0 deletions youtube-dl.md5
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,38 @@
    # Quick start for youtube-dl
    - https://github.com/ytdl-org/youtube-dl/

    ## Default usage
    youtube-dl URL

    ## Download certain resolution
    youtube-dl -f "best[height<=480]" URL

    ## Download certain extension
    youtube-dl -f "best[ext=mp4]" URL

    ## Download certain resolution & extension
    youtube-dl -f "best[height<=480][ext=mp4]" URL

    ## Download audio only
    youtube-dl -f "bestaudio" URL
    youtube-dl -f "bestaudio[ext=m4a]" URL

    ## Download video only
    youtube-dl -f "bestvideo" URL
    youtube-dl -f "bestaudio[ext=mp4]" URL
    youtube-dl -f "bestaudio[ext=mp4][height<=360]" URL

    ## Download separate video and output and combine (requires ffmpeg or avconv)
    youtube-dl -f "bestvideo+bestaudio" --merge-output-format "mp4" URL

    ## Fallback to other formats if not found
    youtube-dl -f "bestvideo[ext=mp4]+bestvideo[ext=mp3]/bestvideo[ext=mp4]+bestvideo[ext=m4a]" --merge-output-format "mp4" URL

    ## See all formats available
    youtube-dl -F URL

    ## Download specific format
    youtube-dl -f format_ID URL

    ## General help
    youtube-dl --help