Skip to main content
Latest PyPI version CircleCI build status Test coverage

Mopidy extension that plays sound from YouTube.

Installation

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

Configuration

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.

Usage

Simply use search for filename in your MPD client or add YouTube URL to playlist prefixed by yt:.

Example video:

yt:http://www.youtube.com/watch?v=Njpw2PVb1c0

Example for playlist:

yt:http://www.youtube.com/playlist?list=PLeCg_YDclAETQHa8VyFUHKC_Ly0HUWUnq

Troubleshooting

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.

Project resources

Credits

Release files for Mopidy-YouTube 3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Mopidy-YouTube 3.1
File Size Uploaded
Mopidy-YouTube-3.1.tar.gz 1.8 MB Details

Release files / Mopidy-YouTube-3.1.tar.gz

Download URL Mopidy-YouTube-3.1.tar.gz
Size 1.8 MB
Tags Source
SHA-256 checksum
How to use checksums
6880cc8086b9df1fe0c6ed8b9f77b37024143b138ea71f904b542dab62b7c3ae
BLAKE2b-256 checksum
How to use checksums
4d615c836897b370795b5dc5e68e797176adee4952a863ceb70579bffb0d6742
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.5

Release history Release notifications | RSS feed

4.0.2

2 release files

4.0.1

2 release files

4.0

2 release files

3.7

2 release files

3.6.1

2 release files

3.6

2 release files

3.5

2 release files

3.4

2 release files

3.3

3 release files

3.2

2 release files

This release

3.1 This release

1 release file

3.0

1 release file

2.0.2

2 release files

2.0.1

2 release files

2.0.0

1 release file

1.0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page