A commandline utility that enables the creation of albums from Youtube playlists.
To be able to use the mp4 to mp3 conversion feature, ffmpeg must be installed.
sudo apt-get install ffmpeg
- Download ffmpeg binaries from here
- Add the bin\ directory to Windows PATH
pip install ytam
Usage:
usage: ytam [-h] [-t TITLES] [-d DIRECTORY] [-s START] [-e END] [-A ALBUM]
[-a ARTIST] [-i IMAGE] [-p PROXY] [-3 [MP3]] [-k [CHECK]]
URL
positional arguments:
URL the target URL of the playlist to download
optional arguments:
-h, --help show this help message and exit
-t TITLES, --titles TITLES
a plain text file containing the desired titles and
artists of the songs in the playlist, each on a new
line. Format: title<@>artist
-d DIRECTORY, --directory DIRECTORY
the download directory (defaults to 'music' - a
subdirectory of the current directory)
-s START, --start START
from which position in the playlist to start
downloading (defaults to 1)
-e END, --end END position in the playlist of the last song to be
downloaded (defaults to last position in the playlist)
-A ALBUM, --album ALBUM
the name of the album that the songs in the playlist
belongs to (defaults to playlist title)
-a ARTIST, --artist ARTIST
the name of the artist that performed the songs in the
playlist (defaults to Unknown)
-i IMAGE, --image IMAGE
the path to the image to be used as the album cover.
Only works when -A flag is set
-p PROXY, --proxy PROXY
list of proxies to use. Must be enclosed in string
quotes with a space separating each proxy. Proxy
format: <protocol>-<proxy>
-3 [MP3], --mp3 [MP3]
converts downloaded files to mp3 format and deletes
original mp4 file. Requires ffmpeg to be installed on
your machine
-k [CHECK], --check [CHECK]
checks whether ytam is working as it should by trying
to download a pre-defined playlist and setting pre-
defined metadata. Setting this argument causes ytam to
ignore ALL others
TODO
- pytube - Lightweight Python library for downloading videos
- mutagen - For MP4 metadata tagging
- argparse - For parsing commandline arguments
- ffmpeg - For mp4 to mp3 conversion
- jayathungek - Initial work - jayathungek