muzak2yt

Upload your favorite music albums directly to YouTube !


Licenses
GPL-3.0/GPL-3.0+
Install
pip install muzak2yt==1.0.1

Documentation

muzak2yt

Upload your favorite music albums directly to YouTube !

Program written under Python 3.9

Requirements

The following modules need to be installed with pip :

  • youtube_uploader_selenium==0.1.0
  • oauth2client==4.1.3
  • httplib2==0.19.0
  • fleep==1.0.1
  • mutagen==1.45.1
  • google_api_python_client==1.12.8

To facilitate the process, you can run the command pip install -r requirements.txt

Alternatively, you could install the whole script with the command pip install muzak2yt

In addition, the following conditions need to be fullfiled :

  • You must have ffmpeg installed (and added to your PATH if you're on Windows)
  • You must have Firefox installed, as well as geckodriver (add to your PATH or drag and drop in your Python folder)

Usage

  1. Add an image to your album folder that will be used by ffmpeg to generate the video. The image has to be named "image.png", as well as having even width and height values (640x480 is ok, 641x480 is not)
  2. Run the "muzak2yt.py" file in the same folder as your music album.
  3. Once the video is generated by ffmpeg, it will be uploaded to YouTube. The script will automatically open FireFox, you need to connect to YouTube manually the first time.

The program takes the following arguments :

usage: muzak2yt [options]

Convert to mp4 and upload to YouTube

optional arguments:
  -h, --help   show this help message and exit
  -nu, --noup  Not upload to YouTube, only convert to MP4

Additional Notes

  • If your video titles are messed up by the script, follow this guide : "Title not setting correctly" (The init.py file will be in your site-packages/youtube-uploader-selenium folder (you can run python -c 'import site; print(site.getsitepackages())' to get the location)
  • If you want ffmpeg to overwrite the existing mp4 files, replace the argument "-n" by "-y" in the subprocess.call
  • If you want to modify the way titles and descriptions are generated, edit the following lines :
title = str(audio["album"]).strip('[\']') + " - " +  str(audio["title"]).strip('[\']')
metadata = {
                "title":  title,
                "description": "Album: " + str(audio["album"]).strip('[\']') + "\nArtist(s): " + str(audio["artist"]).strip('[\']').replace("\"", "")
            }