This tool requires FFmpeg to convert video and audio formats. You can install FFmpeg easily using Chocolatey on Windows:
- Open PowerShell as Administrator.
- Run the following command to install Chocolatey (if you don't have it yet):
Set-ExecutionPolicy Bypass -Scope Process -Force; `
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; `
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))- After Chocolatey is installed, install FFmpeg by running:
choco install ffmpeg -y- Close and reopen your terminal or PowerShell, then verify the installation by typing:
ffmpeg -versionIf the version information is displayed, FFmpeg is installed correctly.
Make sure you have Python 3.7 or later installed. Then install required Python packages with:
pip install -r requirements.txtRun the tool using:
python y2b.py -mp3 [YouTube URL]
python y2b.py -mp4 -p720 [YouTube URL]
python y2b.py -mp4 [YouTube URL] # defaults to 1080p if quality is not specifiedIf you want to build a standalone .exe file, use PyInstaller:
pyinstaller --onefile y2b.pyThe executable will be located in the dist/ folder.
need to PATH to use the exe file.
Only works in windows.
- FFmpeg must be installed and added to your system PATH for the tool to work correctly.
- The downloaded files will be saved to your Windows Downloads folder.