VideoHelp Forum


Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!


Try StreamFab Downloader and download streaming video from Youtube, Netflix, Amazon! Download free trial.


+ Reply to Thread
Results 1 to 2 of 2
Thread
  1. Member
    Join Date
    Feb 2019
    Location
    Malaysia
    Search Comp PM
    Hi,

    I am totally new to this Forum.

    I wrote a Script to automate the use of youtube-dl (limited commands) and not worry about adware or Spyware.

    Please place this script in the same directory as youtube-dl.exe

    Please rename the script extension from .txt to .cmd or .bat (easier to do this when you select to unhide extensions in folder options)

    Please make available FFMPEG in the same Folder; Example Below:-

    MAIN youtube-dl directory (can be on a desktop, portable hdd etc):-
    C:\ youtube-dl\
    C:\ youtube-dl\downloads
    C:\ youtube-dl\ffmpeg
    C:\ youtube-dl\youtube-dl.exe
    C:\ youtube-dl\Syal-Youtube-dl-BATCH-Script.txt
    C:\ youtube-dl\Syal-Youtube-dl-BATCH-Script.cmd (You should rename this to something easier)

    youtube-dl > ffmpeg Sub-Directory
    C:\ youtube-dl\ffmpeg\bin
    C:\ youtube-dl\ffmpeg\doc
    C:\ youtube-dl\ffmpeg\presets
    C:\ youtube-dl\ffmpeg\LICENCE.txt
    C:\ youtube-dl\ffmpeg\README.txt


    You can get youtube-dl.exe and the required FFMPEG files via google from their official sites and extract the ffmpeg files yourself, if you cannot do this nor understand any of this..... read up and expand your mind! :D

    just double-click and run the .cmd or .bat file YOU renamed and follow its instructions/flow

    I do have a Linux BASH Script, and may make it available upon request.

    Its not perfect (I am not a Programmer)

    I post this as a Help! So I hope you use it responsibly and not download anything illegal :p

    Enjoy!

    Just in case you cannot download - below is the script. Just Copy, paste into notepad and save

    @ECHO OFF
    :top
    cls
    ECHO ###########################################
    ECHO ############################
    ECHO #######
    SET /P URL=Please enter the video URL that you would like to use:

    ECHO ###########################################
    ECHO ############################
    ECHO #######
    ECHO Do you want to rename file?:

    :: This enables renaming File

    ECHO 1.Yes Rename
    ECHO 2.No Use Default

    :: Ask the user to rename or not

    SET /P cnl=Please Enter your CHOICE:
    if "%cnl%"=="1" goto rn1
    if "%cnl%"=="2" goto rn2

    :rn1
    ECHO ???????????????????????????????????????????
    ECHO ????????????????????????
    ECHO ????????
    SET /P fln=Please enter filename without its extension:
    goto frmt

    :rn2
    ECHO ###########################################
    ECHO ############################
    ECHO #######
    ECHO NOTED!!
    SET fln=%%(title)s
    goto frmt

    :frmt
    ECHO ###########################################
    ECHO ############################
    ECHO #######
    ECHO Here is a List of all possible formats (PLEASE TAKE NOTE!!!):
    pause
    youtube-dl -F %URL%&&pause&&goto opr

    :opr
    ECHO ###########################################
    ECHO ############################
    ECHO #######
    ECHO Available operations:

    ::This prints the list of operations
    ECHO 1.Select Format (Based on Format Code)
    ECHO 2.Best Quality Single File (based on Extension)


    ::Ask the user to choose the operation they want
    ECHO ???????????????????????????????????????????
    ECHO ????????????????????????
    ECHO ????????
    SET /P operation=Which operation would you like to do?:
    if "%operation%"=="1" goto op1
    if "%operation%"=="2" goto op2


    :op1
    ECHO ???????????????????????????????????????????
    ECHO ????????????????????????
    ECHO ????????
    SET /P qual=Please Enter Format Code Selection:
    ECHO Downloading your selection..
    youtube-dl -f %qual% %URL% --ffmpeg-location %CD%\ffmpeg\bin -o "%CD%\downloads\%fln%.%%(ext)s
    pause&&ECHO ENJOY!!!!!
    goto top

    :op2
    ECHO ???????????????????????????????????????????
    ECHO ????????????????????????
    ECHO ????????
    SET /P qual=Please Enter Selection (mp4, m4a, 3gp, aac, flv, mp3, ogg, wav, webm:
    ECHO Downloading best video...
    youtube-dl -f %qual% %URL% --ffmpeg-location %CD%\ffmpeg\bin -o %CD%\downloads\%fln%.%%(ext)s
    pause&&ECHO ENJOY!!!!!
    goto top
    Image Attached Files
    Quote Quote  
  2. Member
    Join Date
    Feb 2019
    Location
    Malaysia
    Search Comp PM
    Hi,

    I have updated the Batch Script to include PlayList download minimal control and Cleaned it up a little.

    As with Before, just save the txt file, or copy and paste the below code to Notepad and rename the extension from .txt to .cmd or .bat

    Have Fun!

    @ECHO OFF
    youtube-dl -U&&pause&&goto strt
    :strt
    cls

    ECHO ###########################################
    ECHO ############################
    ECHO #######
    ECHO If Downloading a Playlist -
    ECHO Please check that your Video URL is apart or a PLAYLIST or
    ECHO Please check that the URL is a playlist URL
    ECHO ##
    SET /P URL=Please enter or paste the Video URL that you would like to use:

    :chse
    cls
    :: Playlist or Normal (single File)
    ECHO ###########################################
    ECHO ############################
    ECHO #######
    ECHO 1.SINGLE FILE
    ECHO 2.PLAYLIST
    SET /P plsf=ARE you downloading a SINGLE FILE or a PLAYLIST?:
    if "%plsf%"=="1" (goto sf) else (if "%plsf%"=="2" (goto pl) else (goto chse))

    :sf
    cls
    :: This enables Organising by folder
    ECHO ###########################################
    ECHO ############################
    ECHO #######
    ECHO You can choose to create or save this download to a SUB-FOLDER
    ECHO The SUB-FOLDER will be in the Downloads Folder of this Youtube-dl
    ECHO DEFAULT folder will be in /downloads/
    ECHO Do you want to save this download to a CUSTOM FOLDER?:

    :: Folder Selection

    ECHO 1.Yes CUSTOM FOLDER
    ECHO 2.No Use Default

    :: Ask the user to rename or not
    SET /P cfdr=Please Enter your CHOICE:
    if "%cfdr%"=="1" (goto fldr1) else (if "%cfdr%"=="2" (goto fldr2) else (goto sf))

    :fldr1
    ECHO ###########################################
    ECHO ############################
    ECHO #######
    ECHO PLEASE LEAVE NO SPACE NOR TYPE SPECIAL CHARACTERS
    ECHO ##
    SET /P fdr1=Please NEW FOLDER Name:
    SET fdr2=downloads\%fdr1%
    goto rnm

    :fldr2
    ECHO ###########################################
    ECHO ############################
    ECHO #######
    ECHO NOTED!!
    SET fdr2=downloads
    goto rnm

    :rnm
    cls
    :: This enables file renaming
    ECHO ###########################################
    ECHO ############################
    ECHO #######
    ECHO 1.Yes Rename
    ECHO 2.No Use Default
    SET /P cnl=Do you want to rename file?:
    if "%cnl%"=="1" (goto rn1) else (if "%cnl%"=="2" (goto rn2) else (goto rnm))

    :rn1
    ECHO ###########################################
    ECHO ############################
    ECHO #######
    ECHO PLEASE LEAVE NO SPACE NOR TYPE SPECIAL CHARACTERS
    ECHO ##
    SET /P fln=Please enter filename without its extension:
    goto frmt

    :rn2
    ECHO ###########################################
    ECHO ############################
    ECHO #######
    ECHO NOTED!!
    SET fln=%%(title)s
    goto frmt

    :frmt
    cls
    ECHO ###########################################
    ECHO ############################
    ECHO #######
    ECHO Here is a List of all possible formats (PLEASE TAKE NOTE!!!):
    pause
    youtube-dl -F %URL%&&goto opr

    :opr
    ECHO ###########################################
    ECHO ############################
    ECHO #######
    ECHO Available operations:
    ::This prints the list of operations
    ::Ask the user to choose the operation they want
    ECHO ###########################################
    ECHO ############################
    ECHO #######
    ECHO 1.Select Format (Based on Format Code)
    ECHO 2.Best Quality Single File (based on Extension)
    SET /P operation=Which operation would you like to do?:
    if "%operation%"=="1" (goto op1) else (if "%operation%"=="2" (goto op2) else (goto opr))

    :op1
    ECHO ###########################################
    ECHO ############################
    ECHO #######
    SET /P qual=Please Enter Format Code Selection:
    ECHO Downloading your selection..
    youtube-dl -f %qual% -o "%CD%\%fdr2%\%fln%.%%(ext)s" "%URL%" --ffmpeg-location %CD%\ffmpeg\bin
    pause&&ECHO ENJOY!!!!!
    pause
    goto strt

    :op2
    ECHO ###########################################
    ECHO ############################
    ECHO #######
    SET /P qual=Please Enter Selection (mp4, m4a, 3gp, aac, flv, mp3, ogg, wav, webm:
    ECHO Downloading best video...
    youtube-dl -f %qual% -o "%CD%\%fdr2%\%fln%.%%(ext)s" "%URL%" --ffmpeg-location %CD%\ffmpeg\bin
    pause&&ECHO ENJOY!!!!!
    pause
    goto strt

    :: -------------------------------------------------------------------------------------------

    :pl
    ECHO ###########################################
    ECHO ############################
    ECHO #######
    ECHO Not saving your playlist in a NEW Folder might cause confusion and deletion of old files
    ECHO DEFAULT folder will be in /downloads/playlists/
    ECHO Do you want to save this playlist in a NEW FOLDER?:

    :: Folder Selection

    ECHO 1.Yes NEW FOLDER
    ECHO 2.No Use Default

    :: Ask the user to rename or not
    SET /P plf=Please Enter your CHOICE:
    if "%plf%"=="1" (goto fldr1) else (if "%plf%"=="2" (goto fldr2) else (goto pl))

    :fldr1
    ECHO ###########################################
    ECHO ############################
    ECHO #######
    ECHO PLEASE LEAVE NO SPACE NOR TYPE SPECIAL CHARACTERS
    ECHO ##
    SET /P fdr1=Please NEW FOLDER Name:
    goto plnbr

    :fldr2
    ECHO ###########################################
    ECHO ############################
    ECHO #######
    ECHO NOTED!!
    pause
    SET fdr1=Playlists
    goto plnbr

    :plnbr
    cls
    :: Ask User to download all or by sequential numbers
    ECHO ###########################################
    ECHO ############################
    ECHO #######
    ECHO NOTE 01 - A Playlist may be large and will take a lot of space on your drive!!!
    ECHO NOTE 02 - A Large Playlist may take a lot of TIME and BANDWIDTH to download!!!
    ECHO NOTE 03 - Files can be downloaded via sequential batches
    ECHO NOTE 04 - YOU CAN STOP A DOWNLOAD SEQUENCE AT ANY TIME BY PRESSING CTRL+R
    ECHO ##
    ECHO Do you want to Only download a fixed number of files?:

    :: This enables the choice of manual batched or whole playlist download

    ECHO 1.Yes Select what to download by start-end sequence
    ECHO 2.No DOWNLOAD ALL

    :: Ask the user to make the choice

    SET /P pldlseq=Please Enter your CHOICE:
    if "%pldlseq%"=="1" (goto pldl1) else (if "%pldlseq%"=="2" (goto pldl2) else (goto plnbr))

    :pldl1
    ECHO ###########################################
    ECHO ############################
    ECHO #######
    ECHO The Start Number the the first file (in sequence) you wish to download
    ECHO The First file in a playlist is 1, the end is the last file
    ECHO If a Playlist has 100 files, then start is 1, last is 100
    ECHO If you want to START this Download on the 20th file....
    ECHO THEN the start value should be 20 (example)
    ECHO ##
    SET /P plst=Please enter the number you wish to start for Playlist Download:

    ECHO ###########################################
    ECHO ############################
    ECHO #######
    ECHO The Start Number the the first file (in sequence) you wish to download
    ECHO The First file in a playlist is 1, the end is the last file
    ECHO If a Playlist has 100 files, then start is 1, last is 100
    ECHO If you want to STOP this Download on the 50th file....
    ECHO THEN the END value should be 50 (example)
    ECHO THE END VALUE MUST BE HIGHER THAN THE START VALUE !!!!!!!!
    ECHO ##
    SET /P pled=Please enter the selected END to this Playlist Batch Download:
    goto plop1

    :pldl2
    :: This will Download the whole Playlist
    ECHO ###########################################
    ECHO ############################
    ECHO #######
    ECHO NOTED!!
    ECHO ##
    ECHO The ENTIRE PLAYLIST will be downloaded, ERRORS WILL BE IGNORED
    ECHO Press any key to START DOWNLOAD
    pause
    youtube-dl -f best -ci -o %CD%\downloads\%fdr1%\%%(title)s.%%(ext)s "%URL%" --yes-playlist --playlist-start 1 --ffmpeg-location %CD%\ffmpeg\bin
    pause&&ECHO ENJOY!!!!!
    pause
    goto strt

    :plop1
    :: This will Download the playlist in its specified batch
    ECHO ###########################################
    ECHO ############################
    ECHO #######
    ECHO NOTED!!
    ECHO ##
    ECHO The SELECTED BATCH PLAYLIST will be downloaded, ERRORS WILL BE IGNORED
    ECHO Press any key to START DOWNLOAD
    pause
    youtube-dl -f best -ci -o %CD%\downloads\%fdr1%\%%(title)s.%%(ext)s "%URL%" --yes-playlist --playlist-start %plst% --playlist-end %pled% --ffmpeg-location %CD%\ffmpeg\bin
    pause&&ECHO ENJOY!!!!!
    pause
    goto strt
    Image Attached Files
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!