Windows

On Windows this used to work…without adding ffmpeg. Now, you have to add ffmpeg (see video). If ffmpeg is not added per the video on this page you will have video and audio files that will not be merged.
@echo off
set /p MYNAME="Enter a YouTube Link: "
cd C:\Users\guy\desktop
yy -f --no-playlist -f "bestvideo[height<=1080][vcodec!=?vp9]+bestaudio[acodec!=?opus]" %MYNAME%

Add FFmpeg

You can download this .zip folder and just copy some files…or watch the video.

Download FFMpeg 6.1.1

Download here

Linux

This used to work on Linux but, generally, does not work anymore:
#!/bin/bash
echo ""
echo "--------------------------------------------------------------------"
echo " This script will download YouTube videos to your Desktop. "
echo "--------------------------------------------------------------------"
echo ""
echo "Paste the YouTube link below and press ENTER"
echo "$url"
read url
cd /home/guy/Desktop
yy -f 18 $url
chmod 777 *mp4

This works, now, always:
#!/bin/bash
# init
function pause()
{
read -p “$*”
}

echo “”
echo “——————————————————————–”
echo ” This downloads your file in HD 1080p ”
echo ” Files are saved to /home/mint/Desktop ”
echo ” ENTER THE URL ON THE LINE BELOW ”
echo “——————————————————————–”
echo “$url”
read url
echo “”
cd /home/guy/Desktop
yy –no-playlist -f ‘bestvideo[height<=1080][vcodec!=?vp9]+bestaudio[acodec!=?opus]’ $url

Linux Script With Options

In this script you are given choices the first of which will always work – that one will download the largest sized file. The others generally work.

#!/bin/bash
# init
function pause()
{
   read -p “$*”
}
echo ""
echo "--------------------------------------------------------------------"
echo "    Choose an optional size to download your YouTube video.         "
echo "    NOTE: ONLY MAX SIZE IS GUARANTEED TO WORK - OTHERS MAY          "
echo "                  REQUIRE EXPERIMENTATION!                          "
echo "     CHOOSE OPTION 4 FOR ENGLISH DEFAULT IF MULTI-LANGUAGE          "
echo "--------------------------------------------------------------------"

## array of menu entries
entries=( "for MAX_SIZE"
          "for 1280x720" 
          "for 800X450-A"
          "for 800X450-B")

## set prompt for select menu
PS3='Selection: '

while [ "$menu" != 1 ]; do                ## outer loop redraws menu each time
    printf "\nMain Menu:\n\n"             ## heading for menu
    select choice in "${entries[@]}"; do  ## select displays choices in array
        case "$choice" in                 ## case responds to choice
            "for MAX_SIZE" )

echo "--------------------------------------------------------------------"
echo "              ENTER THE URL ON THE LINE BELOW                       "
echo "--------------------------------------------------------------------"
echo "$url"
read url
echo ""
cd /home/guy/Desktop
yy --no-playlist -f 'bestvideo[height<=1080][vcodec!=?vp9]+bestaudio[acodec!=?opus]' $url
chmod 777 *mp4 *mkv *webm
exit

break                     ## break returns control to outer loop
                ;;
            "for 1280x720" )  
            
echo "--------------------------------------------------------------------"
echo "              ENTER THE URL ON THE LINE BELOW                       "
echo "--------------------------------------------------------------------"
echo "$url"
read url
echo ""
cd /home/guy/Desktop
yy -f 136+234 $url
chmod 777 *mp4 *mkv *webm
exit

break                     ## break returns control to outer loop
                ;;
            "for 800X450-A" )  
            
            
echo "--------------------------------------------------------------------"
echo "              ENTER THE URL ON THE LINE BELOW                       "
echo "--------------------------------------------------------------------"
echo "$url"
read url
echo ""

cd /home/guy/Desktop
yy -f 135+bv+ba[language^=en]/ba $url
chmod 777 *mp4 *mkv *webm

exit
break                     ## break returns control to outer loop
                ;;
            "for 800X450-B" )  
            
echo "--------------------------------------------------------------------"
echo "              ENTER THE URL ON THE LINE BELOW                       "
echo "--------------------------------------------------------------------"
echo "$url"
read url
echo ""

cd /home/guy/Desktop
yy -f 606+bv+ba[language^=en]/ba $url

chmod 777 *mp4 *mkv *webm

exit    
break                     ## break returns control to outer loop
                ;;
            "for RESTORE" )         
                echo "Haiiii, exiting"
                menu=1                    ## variable setting exit condition
                break
                ;;
            * )
                echo "ssss"
                break
                ;;
        esac
    done
done

Windows Script With Options (see bottom of page for UPDATE)

@ECHO off
cls
:start
ECHO.
ECHO 1. HI-RESOLUTION
ECHO 2. OPTION2
ECHO 3. OPTION3
ECHO 4. OPTION4
set choice=
set /p choice=Type the number to print text.
if not '%choice%'=='' set choice=%choice:~0,1%
if '%choice%'=='1' goto HI-RESOLUTION
if '%choice%'=='2' goto OPTION2
if '%choice%'=='3' goto OPTION3
if '%choice%'=='4' goto OPTION4
ECHO "%choice%" is not valid, try again
ECHO.
goto start
:HI-RESOLUTION
set /p MYNAME="Enter a YouTube Link: "
cd C:\Users\guy\desktop
yy -f --no-playlist -f "bestvideo[height<=1080][vcodec!=?vp9]+bestaudio[acodec!=?opus]" %MYNAME%
goto end
:OPTION2
set /p MYNAME="Enter a YouTube Link: "
cd C:\Users\guy\desktop
yy -f --no-playlist -f 606+bv+ba[language^=en]/ba %MYNAME%
goto end
:OPTION3
set /p MYNAME="Enter a YouTube Link: "
cd C:\Users\guy\desktop
yy -f --no-playlist -f 136+234 %MYNAME%
goto end
:OPTION4
set /p MYNAME="Enter a YouTube Link: "
cd C:\Users\guy\desktop
yy -f --no-playlist -f 135+bv+ba[language^=en]/ba %MYNAME%
goto end
:end
pause

Downloaded bat scripts for Windows

You can download this zip archive which is a small collection or pre-made bat scripts I found on Github. There is one called “ADVANCED3” that is my own modification on one of the Github files. It downloads a list of video formats for display and then combines them with the best audio in English.

By admin