All of this has been merged back into the original Mopidy-YTMusic. YAY! This is now archived and not worth anyone's time.
Mopidy extension for playing music from YouTube Music
Forked from Mopidy-YTMusic by Tomas Ravinskas.
Install by running:
python3 -m pip install Mopidy-YoutubeMusic
Before starting Mopidy, you need to enable Mopidy-YoutubeMusic in your Mopidy configuration file:
[youtubemusic] enabled = true
By default Mopidy-YoutubeMusic will connect to YouTube Music as a guest account. This
has limited options. If you would like to connect to YouTube Music with your
account (free or premium) you'll need to generate an auth.json
file and configure
Mopidy-YoutubeMusic to use it.
To create an auth.json file run mopidy youtubemusic setup
and follow instructions
in the terminal. When you're done it will tell you what config options (e.g. auth = /path/to/auth.json
)
you need to add to your Mopidy configuration file.
Authenticated users have access to their listening history, likes, playlists and uploaded music. Premium users have access to high quality audio streams and other premium content.
Other configuration options are as follows:
auto_playlist_refresh
- time (in minutes) to refresh the Auto playlists. Default: 60. Set to 0 to disable auto playlists.youtube_player_refresh
- time (in minutes) to refresh the Youtube player url (used for decoding the signature). Default: 15playlist_item_limit
- Number of items to grab from playlists. This is not exact. Default: 100subscribed_artist_limit
- Number of subscriptions to list. Default: 100. Set to 0 to disable subscription list.enable_history
- Show Recently Played playlist. Default: yesenable_liked_songs
- Show Liked Songs playlist. Default: yesenable_mood_genre
- Show Mood & Genre playlists from YouTube Music's Explore directory. Default: yesenable_scrobbling
- Mark tracks as played on YouTube Music after listening. Default: yesstream_preference
- Comma separated list of itags in the order of preference you want for stream. Default: "141, 251, 140, 250, 249"
Information on YouTube Music streams:
itag | Codec | Sample Rate | Bit Rate |
---|---|---|---|
141 [*] | AAC | 44.1kHz | ~260kbps |
251 | Opus | 48kHz | ~150kbps |
140 | AAC | 44.1kHz | ~132kbps |
250 | Opus | 48kHz | ~80kbps |
249 | Opus | 48kHz | ~64kbps |
[*] | Available to premium accounts only. |
- Install poetry <https://python-poetry.org/docs/#installation>
- Run
poetry build
to create the build tarball - The
dist/Mopidy-YoutubeMusic-x.x.x.tar.gz
file is what you'll use to install. - With pip:
python3 -m pip install dist/Mopidy-YoutubeMusic-x.x.x.tar.gz
to install or reinstall over an existing version. - Do configuration stuff if you haven't already.
- Original author: Tomas Ravinskas
- Current maintainer: Dave Maez
- Contributors