Foxtrod89

video downloader

Jun 5th, 2020
374
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.36 KB | None | 0 0
  1. @echo off
  2.  
  3. SET DnBest=--no-check-certificate --prefer-insecure -f 22 --external-downloader aria2c --external-downloader-args "-x16 -s16 -k1M"
  4. SET Destination=""%USERPROFILE%"\Desktop\%%(title)s.%%(ext)s"
  5. if not -%1-==-- SET URL=%*
  6. if -%1-==-- goto fopNew
  7.  
  8. :top
  9. CLS
  10. ECHO URL: %URL%
  11. ECHO ----------------------
  12. ECHO Available operations:
  13. ECHO ----------------------
  14.  
  15. ECHO 1. Best of all
  16. ECHO 2. Check all formats available
  17. ECHO 3. New URI
  18. ECHO 4. Select specific format
  19. ECHO 5. Download autogenerated subtitles only
  20. ECHO 6. Download best audio only
  21. ECHO 7. Download video from any website
  22. ECHO 8. Exit
  23.  
  24. SET /P operation=Which operation would you like to do?:
  25. if "%operation%"=="1" goto fop1
  26. if "%operation%"=="2" goto fopFormat
  27. if "%operation%"=="3" goto fopNew
  28. if "%operation%"=="4" goto fopSelect
  29. if "%operation%"=="5" goto fopSubtitles
  30. if "%operation%"=="6" goto fopAudio
  31. if "%operation%"=="7" goto fopAgnostic
  32. if "%operation%"=="8" goto fopQuit
  33.  
  34. :fop1
  35. ECHO Best:
  36. youtube-dl %DnBest% -o %Destination% %URL%
  37. pause
  38. goto top
  39.  
  40. :fopFormat
  41. ECHO List of all possible formats:
  42. youtube-dl -F %URL%
  43. pause
  44. goto top
  45.  
  46. :fopSelect
  47. ECHO List of all possible formats:
  48. youtube-dl -F %URL%
  49. ECHO Enter number of desired format from all possible formats:
  50. SET /P formatF=:
  51. ECHO Download selected format:
  52. SET DnSelect=--no-check-certificate --prefer-insecure -f "%%formatF%%" --external-downloader aria2c --external-downloader-args "-x16 -s16 -k1M"
  53. youtube-dl %DnSelect% -o %Destination% %URL%
  54. pause
  55. goto top
  56.  
  57. :fopNew
  58. SET /P URL=Enter the video URL:
  59. goto top
  60.  
  61. :fopSubtitles
  62. SET selectSubtitles=--no-check-certificate --prefer-insecure --skip-download --write-auto-sub
  63. youtube-dl %selectSubtitles% -o %Destination% %URL%
  64. ECHO subtitles downloaded succesfully!
  65. pause
  66. goto top
  67.  
  68. :fopAudio
  69. SET selectAudio=--no-check-certificate --prefer-insecure --extract-audio -f bestaudio[ext=webm] --postprocessor-args "-acodec libopus -b:a 64K" --external-downloader aria2c --external-downloader-args "-x16 -s16 -k1M"
  70. youtube-dl %selectAudio% -o %Destination% %URL%
  71. ECHO Audio downloaded succesfully!
  72. pause
  73. goto top
  74.  
  75. :fopAgnostic
  76. SET setAria=--no-check-certificate --prefer-insecure --external-downloader aria2c --external-downloader-args "-x16 -s16 -k1M"
  77. youtube-dl %setAria% -o %Destination% %URL%
  78. ECHO Audio downloaded succesfully!
  79. pause
  80. goto top
  81.  
  82.  
  83. :fopQuit
  84. @echo off
Add Comment
Please, Sign In to add comment