Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 17th, 2012  |  syntax: None  |  size: 0.46 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!/bin/sh
  2. # wrapper around youtube-dl, from TJ Luoma (http://luo.ma)
  3.  
  4. FOUND=no
  5.  
  6. # these are the mp4 formats that YouTube supports, starting with the highest resolution
  7. for FORMAT in 38 37 22 18 17
  8. do
  9.  
  10.     echo "$NAME: Trying $FORMAT ..."
  11.  
  12.     if [ "$FOUND" = "no" ]
  13.     then
  14.  
  15.         youtube-dl -f "$FORMAT" --no-overwrites \
  16.         -o "%(stitle)s-%(id)s.%(ext)s" "$@" && FOUND=yes # to use with burninator.scpt, this path has to be hard-coded.
  17.  
  18.     fi
  19. done
  20.  
  21. exit 0