Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- #
- # A youtube-dl wrapper of my frequent use.
- #
- # * quality:
- # vp9 1080+ > 1080+ > vp9 > h264 + opus/ogg > best
- #
- # * output:
- # "20180101 Wqco6PCsJKQ.248+251.webm"
- #
- # * options:
- # --write-info-json: for archiving
- # --add-metadata: add "movie name", "comment", "date"...
- # --write-all-thumbnails: navigate more easily.
- #
- y=youtube-dl
- if [ $# -lt 1 ]; then
- echo "Usage: $0 [LIMITED_OPTIONS] URLs/PLAYLIST"
- exit 64
- fi
- p1="bestvideo[vcodec=vp9][width>=1920]+(251/171/bestaudio)"
- p2="bestvideo[width>=1920]+(251/171/bestaudio)"
- p3="bestvideo[vcodec=vp9]+(251/171/bestaudio)"
- p4="bestvideo+(251/171)"
- $y -f "$p1/$p2/$p3/$p4/best" \
- -o "%(upload_date)s %(id)s.%(format_id)s.%(ext)s" \
- --write-info-json \
- --add-metadata \
- --write-all-thumbnails \
- "$@"
Add Comment
Please, Sign In to add comment