Mopidy extension that plays sound from YouTube.
Install from PyPI by running:
python3 -m pip install Mopidy-Youtube
Install from github by running:
python3 -m pip install https://github.com/natumbri/mopidy-youtube/archive/develop.zip
Make sure you already have the GStreamer plugins, especially the "bad" collection of plugins. For example, on Debian/Ubuntu you can install it by running:
sudo apt-get install gstreamer1.0-plugins-bad
Before starting Mopidy, you must add configuration for Mopidy-YouTube to your Mopidy configuration file:
[youtube] enabled = true
If you want modipy-youtube to use the YouTube API, before starting Mopidy, you must add your Google API key to your Mopidy configuration file and set api_enabled = true:
[youtube] youtube_api_key = <api key you got from Google> api_enabled = true
Other configuration options are:
[youtube] threads_max = 16 search_results = 15 playlist_max_videos = 20
If you want mopidy-youtube to autoplay related videos, set autoplay_enabled = true:
[youtube] autoplay_enabled = true
If autoplay is enabled, other options are:
strict_autoplay = [true/false] max_autoplay_length = [maximum length of track in seconds or None] max_degrees_of_separation = [defaults to 3]
If the option strict_autoplay is set, the current tracklist is ignored and the most related video automatically played afterwards.
Simply use search for filename in your MPD client or add YouTube URL to
playlist prefixed by
Example for playlist:
If the extension is slow, try setting lower values for threads_max, search_results and playlist_max_videos.
If resolving of URIs stops working, always try to update the youtube-dl library first.