Youtube music allows to stream uploaded local music files without subscription. This script monitores set directories and uploads created/downloaded music files in the directories to Youtube music library automatically.
- Install required packages by
pip install -r requirements.txt
- Create authentication file
ytmusic_auth.json
- See https://ytmusicapi.readthedocs.io/en/latest/setup.html#authenticated-requests
- Note the setup command should be called as
YTMusic.setup(filepath='ytmusic_auth.json')
- Open
upload_ytmusic.py
and configure line 11 and 13directories
is a list of directories to be monitoredfill-empty-tag
(boolean) will decide to populate empty music tags (year, title, artist) before uploading, assuming the music file name has a form artist-title
- Create a shortcut to the cmd file
upload_ytmusic.cmd
and paste into the startup folder