Skip to main content

Simplifies the process of searching, downloading and converting Youtube videos to MP3 files

Project description

YouTube to MP3

Build Status PyPi Version Documentation Status PyPI Python Versions License


Description

This program simplifies the process of searching, 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.
The program will attempt to retrieve data for a song matching the provided input by querying the iTunes API and use the data to find a corresponding YouTube video, if a URL is not provided. The video will then be downloaded, converted, and the gathered data will be used to populate the metadata of the MP3.
Once finished, the resulting MP3 file will be saved to your Downloads directory, with the following file-structure Music/{artist}/{track}.mp3.

Note: If a URL is provided and no match is found for the song data, the program will prompt the user for the track/artist and the YouTube thumbnail will be used as the album artwork.

Getting Started

Prerequisites

The program only requires that you have Python 3.4+ and ffmpeg or libav installed. For more information, check out the additional setup.

Install

You can install the program with the following command:

$ pip install yt2mp3

Usage

The program can be executed via the as follows:

$ yt2mp3 [-options]

Options:

Arguments
-t, --track Specify the track name query
-a, --artist Specify the artist name query
-c, --collection Specify the album name query
-u, --url Specify a Youtube URL or ID
-p, --playlist Specify a Youtube playlist URL or ID
-o, --overwrite Overwrite the file if one exists in output directory
-r, --resolution Specify the resolution for the cover-art
-q, --quiet Suppress program command-line output
-v, --verbose Display a command-line progress bar
--version Show the version number and exit
-h, --help Display information on usage and functionality

Documentation

Further documentation is available on Read The Docs

Contributing

If you'd like to contribute to the project, feel free to suggest a feature request and/or submit a pull request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
yt2mp3-1.2.3-py2-none-any.whl (9.5 kB) Copy SHA256 hash SHA256 Wheel py2
yt2mp3-1.2.3-py3-none-any.whl (9.5 kB) Copy SHA256 hash SHA256 Wheel py3
yt2mp3-1.2.3.tar.gz (8.9 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page