Back to Blog

YouTube to MP3

PyPi PyPI - Python Version License



A program that simplifies the process of downloading and converting Youtube videos to MP3 files from the command-line. All you need is the video URL or the name of the artist/track you’re looking for.
Once downloaded, the program will also embed the output file with the appropriate metadata and cover art via the iTunes API.


You can install the program with the following command:

pip install yt2mp3


The program can executed via Python 3 as follows:

python [-options]


| Arguments | | |:—————-:|————————————————–| | -t, --track | Specify the track name query | | -a, --artist | Specify the artist name query | | -u, --url | Specify a Youtube URL or ID | | -q, --quiet | Suppress program command-line output | | -p, --progress | Display a command-line progress bar | | -h, --help | Displays information on usage and functionality |

Once complete, the resulting MP3 file will be saved to your Downloads directory, with the following file-structure Music/{artist}/{track}.mp3.

Note: Displaying the progress bar currently has a significant impact on download performance, due to #180.


You can download and install the app with the following commands:

# Clone the repository / most up to date is on saftyBranch
git clone

# Navigate to the directory
cd yt2mp3

# Install program dependencies
pip install -r requirements.txt

Back to Top