daily pastebin goal
39%
SHARE
TWEET

Untitled

a guest May 23rd, 2018 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/sh
  2. #
  3. # A youtube-dl wrapper of my frequent use.
  4. #
  5. # * quality:
  6. #     vp9 1080+ > 1080+ > vp9 > h264 + opus/ogg > best
  7. #
  8. # * output:
  9. #     "20180101 Wqco6PCsJKQ.248+251.webm"
  10. #
  11. # * options:
  12. #     --write-info-json: for archiving
  13. #     --add-metadata: add "movie name", "comment", "date"...
  14. #     --write-all-thumbnails: navigate more easily.
  15. #
  16.  
  17. y=youtube-dl
  18.  
  19. if [ $# -lt 1 ]; then
  20.     echo "Usage: $0 [LIMITED_OPTIONS] URLs/PLAYLIST"
  21.     exit 64
  22. fi
  23.  
  24. p1="bestvideo[vcodec=vp9][width>=1920]+(251/171/bestaudio)"
  25. p2="bestvideo[width>=1920]+(251/171/bestaudio)"
  26. p3="bestvideo[vcodec=vp9]+(251/171/bestaudio)"
  27. p4="bestvideo+(251/171)"
  28.  
  29. $y -f "$p1/$p2/$p3/$p4/best" \
  30.     -o "%(upload_date)s %(id)s.%(format_id)s.%(ext)s" \
  31.     --write-info-json \
  32.     --add-metadata \
  33.     --write-all-thumbnails \
  34.     "$@"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top