Skip to main content

Upload your favorite music albums directly to YouTube !

Project description

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

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("\"", "")
            }

Project details


Download files

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

Source Distribution

muzak2yt-1.0.2.tar.gz (3.6 kB view hashes)

Uploaded Source

Built Distribution

muzak2yt-1.0.2-py3-none-any.whl (15.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page