Skip to main content

YouTube to MP3

Build Status Documentation Status PyPi Version 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.

Metadata

Release files for yt2mp3 1.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yt2mp3 1.2.4
File Size Uploaded
yt2mp3-1.2.4.tar.gz 9.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for yt2mp3 1.2.4
File Interpreter ABI Platform
yt2mp3-1.2.4-py3-none-any.whl Python 3 none any Details

Total release size: 20.3 kB

Release files / yt2mp3-1.2.4.tar.gz

Download URL yt2mp3-1.2.4.tar.gz
Size 9.3 kB
Tags Source
SHA-256 checksum
How to use checksums
fa2bed4a1b4c03a2adb4d9c4fbb566285c8938f50758fc819c75f5003a174f51
BLAKE2b-256 checksum
How to use checksums
89cf40325b51e63fe47cbb683628ebdac024412516b980826b8267a684f26a39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

Release files / yt2mp3-1.2.4-py3-none-any.whl

Download URL yt2mp3-1.2.4-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6cc2b6bab71cc6f3640c3335216a7c0860260f182f8b2bab2863389b7166dc89
BLAKE2b-256 checksum
How to use checksums
88333ce051f902bf98bb3815540b94981a0e95fbb0550812a910c9fbd4edc234
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

Release history Release notifications | RSS feed

This release

1.2.4 This release

2 release files

1.2.3

3 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page