Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
Cleaned up and renamed some files and removed unneccessary ones to simplify things.

Also removed the "youtube-dl.exe" since it's already included in the release.
  • Loading branch information
edinsuta committed Jul 24, 2019
1 parent b88f1d5 commit bc7b5c5
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 93 deletions.
20 changes: 7 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,24 @@
# youtube-dl-batch
These batch files are just made to simplify the usage of Windows .exe releases of http://rg3.github.io/youtube-dl/ (Source: https://github.com/rg3/youtube-dl) for people who want to just simply use `youtube-dl` as a tool to download high-quality videos from YouTube without using third-party services or software clients (since these usually come with video quality restrictions) rather than use it for development purposes.
These batch files are just made to simplify the usage of Windows .exe releases of http://rg3.github.io/youtube-dl/ (Source: https://github.com/rg3/youtube-dl) for people who want to just simply use `youtube-dl` as a tool to download high-quality videos from YouTube (or elsewhere) without using third-party services or software clients (since these usually come with video quality restrictions) rather than use it for development purposes.

Videos with video quality above 720p will have to download the video and audio files seperately and then merge them into one file (thats just how YouTube works for some reason). To merge video and audio files `youtube-dl` requires that FFmpeg (https://www.ffmpeg.org/) is installed on your system. Alternatively, if you don't want to install FFmpeg you can download the `youtube-dl-batch` release which includes all neccessary files (including FFmpeg). There is also a `-noFFmpeg` version of the release.

**Note that the `youtube-dl.exe` file must be stored in the same directory as the .bat files in order to work.**

## ytdl.bat
This is the main batch file used to download videos of YouTube by simply providing the command-line prompt with a YouTube video URL. It will try to download the video in the highest quality possible. Videos with video quality above 720p will have to download the video and audio files seperately and then merge them into one file (thats just how YouTube works for some reason). To merge video and audio files `youtube-dl` requires that FFmpeg (https://www.ffmpeg.org/) is installed on your system.
## ytdlBasic.bat
This batch file is the most basic of all. It simply downloads the best available quality video by default.

## ytdlAdvanced.bat
This batch file allows for advanced usage by allowing you to manually enter multiple command-line arguments for `youtube-dl`.
This batch file allows the user to enter a video URL and then proceeds to list all available formats for that video. It then prompt the user to manually select their desired video and audio formats.

## ytdlFormatList.bat
This batch file lists all of the available video formats that you can download (read more about video format selection usage at https://github.com/rg3/youtube-dl/blob/master/README.md#format-selection).

## ytdlFormatSelect.bat
This batch file allows the user to enter a YouTube URL and then proceeds to list all available formats for that video. It then prompt the user to manually select their desired video and audio formats.
## ytdlCustom.bat
This batch file allows for very advanced usage by allowing you to manually enter multiple command-line arguments for `youtube-dl`.

## ytdlInfo.bat
This batch file lists basic information about your current `youtube-dl` Windows .exe release.

## ytdlQualitySelect.bat
This batch file does the same as `ytdl.bat` but allows you to manually specify desired video quality and video fps. It is currently a bit buggy and can generate undesired results for some videos.

## ytdlUpdate.bat
This batch file updates your current `youtube-dl` .exe file if an update is available.

## Note
This repository and its files are currently very barebones. I might add extra features later on. Feel free to contribute if you wish!
This repository and its files are currently very barebones. This is all just made for fun and nothing too serious. I might add extra features later on. Feel free to contribute if you wish!
Binary file removed youtube-dl.exe
Binary file not shown.
51 changes: 48 additions & 3 deletions ytdlAdvanced.bat
Original file line number Diff line number Diff line change
@@ -1,8 +1,53 @@
@ECHO OFF
SET /P URL="Enter YouTube Video URL: "
SET /P arguments="Enter custom arguments: "
ECHO ----------------------------------------------------------------------------------------------------------------------
SET /P URL="[Enter video URL] "
ECHO ----------------------------------------------------------------------------------------------------------------------
goto formatList

:formatList
ECHO.
youtube-dl -o Downloads/%%(title)s.%%(ext)s %URL% %arguments%
ECHO ----------------------------------------------------------------------------------------------------------------------
youtube-dl -F %URL%
ECHO ----------------------------------------------------------------------------------------------------------------------
goto selection


:selection
ECHO.
ECHO ----------------------------------------------------------------------------------------------------------------------
ECHO 1) Video + Audio
ECHO 2) Single format (Audio only / Video only)
ECHO.
SET /P option="Select option: "
if %option% == 1 (goto download)
if %option% == 2 (goto downloadSingle)
ECHO.
ECHO Unknown value
ECHO ----------------------------------------------------------------------------------------------------------------------
goto selection

:download
ECHO ----------------------------------------------------------------------------------------------------------------------
ECHO.
ECHO ----------------------------------------------------------------------------------------------------------------------
SET /P video="Select video format: "
SET /P audio="Select audio format: "
ECHO.
youtube-dl -o Downloads/%%(title)s.%%(ext)s -f %video%+%audio% -i --ignore-config --hls-prefer-native %URL%
ECHO ----------------------------------------------------------------------------------------------------------------------
ECHO.
PAUSE
EXIT

:downloadSingle
ECHO ----------------------------------------------------------------------------------------------------------------------
ECHO.
ECHO ----------------------------------------------------------------------------------------------------------------------
SET /P format="Select format: "
ECHO.
youtube-dl -o Downloads/%%(title)s.%%(ext)s -f %format% -i --ignore-config --hls-prefer-native %URL%
ECHO ----------------------------------------------------------------------------------------------------------------------
ECHO.
PAUSE
EXIT

14 changes: 7 additions & 7 deletions ytdl.bat → ytdlBasic.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@ECHO OFF
SET /P URL="Enter YouTube video URL: "
ECHO.
youtube-dl -o Downloads/%%(title)s.%%(ext)s -i --ignore-config --hls-prefer-native %URL%
ECHO.
PAUSE
EXIT
@ECHO OFF
SET /P URL="[Enter video URL] "
ECHO.
youtube-dl -o Downloads/%%(title)s.%%(ext)s -i --ignore-config --hls-prefer-native %URL%
ECHO.
PAUSE
EXIT
8 changes: 8 additions & 0 deletions ytdlCustom.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@ECHO OFF
SET /P URL="[Enter video URL] "
SET /P arguments="Enter custom arguments: "
ECHO.
youtube-dl -o Downloads/%%(title)s.%%(ext)s %URL% %arguments%
ECHO.
PAUSE
EXIT
7 changes: 0 additions & 7 deletions ytdlFormatList.bat

This file was deleted.

53 changes: 0 additions & 53 deletions ytdlFormatSelect.bat

This file was deleted.

10 changes: 0 additions & 10 deletions ytdlQualitySelect.bat

This file was deleted.

0 comments on commit bc7b5c5

Please sign in to comment.