All Projects → alexdelorenzo → Chromecast_mpris

alexdelorenzo / Chromecast_mpris

Licence: agpl-3.0
📺 Control Chromecasts from Linux and D-Bus

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects

Projects that are alternatives of or similar to Chromecast mpris

cast control
📺 Control Chromecasts from Linux and D-Bus
Stars: ✭ 443 (+7.26%)
Mutual labels:  chromecast, media, gnome, playback, media-player, linux-desktop
DownloadRedditImages
Easily download all the images from any subreddit (also select sort_type if you want hot/top/new/controversial, and also sort_time day/week/month/year/all). Randomly select downloaded images and set as wallpaper, updating every 30 mins (or whenever you want duh)!
Stars: ✭ 66 (-84.02%)
Mutual labels:  gnome, linux-desktop
react-native-vlc-media-player
React native media player for video streaming and playing. Supports RTSP, RTMP and other protocols supported by VLC player
Stars: ✭ 221 (-46.49%)
Mutual labels:  media, media-player
Gnome Layout Manager
A bash script that batch installs and tweaks GNOME extensions as well as GTK/Shell themes. There are currently three options available: Unity, Windows and macOS.
Stars: ✭ 383 (-7.26%)
Mutual labels:  linux-desktop, gnome
TonUINO
Alternative TonUINO Firmware
Stars: ✭ 112 (-72.88%)
Mutual labels:  media, media-player
bigscreen-player
Simplified media playback for bigscreen devices
Stars: ✭ 62 (-84.99%)
Mutual labels:  playback, media-player
QPrompt
Personal teleprompter software for all video creators. Built with ease of use, productivity, control accuracy, and smooth performance in mind.
Stars: ✭ 168 (-59.32%)
Mutual labels:  media, linux-desktop
Plotinus
A searchable command palette in every modern GTK+ application
Stars: ✭ 805 (+94.92%)
Mutual labels:  linux-desktop, gnome
playercast
Cast to media player and control playback remotely.
Stars: ✭ 46 (-88.86%)
Mutual labels:  media, media-player
nautilus-right-click-new-file
Add a right click context menu in Nautilus to add new documents for Linux desktop.
Stars: ✭ 23 (-94.43%)
Mutual labels:  gnome, linux-desktop
Boston-Icons
Boston is an exclusive icon theme inspired by functionalist design and a touch of early computer icons. The project is focused on elemental properties, basic shapes, a reduced color palette and visual hierarchy.
Stars: ✭ 106 (-74.33%)
Mutual labels:  gnome, linux-desktop
Vimix Icon Theme
vimix-icon-theme
Stars: ✭ 255 (-38.26%)
Mutual labels:  linux-desktop, gnome
dart vlc
🎞 Flutter audio / video playback, broadcast & recording library for Windows & Linux.
Stars: ✭ 439 (+6.3%)
Mutual labels:  chromecast, playback
pw3270
3270 Emulator for gtk
Stars: ✭ 38 (-90.8%)
Mutual labels:  gnome, linux-desktop
Argos
Create GNOME Shell extensions in seconds
Stars: ✭ 1,251 (+202.91%)
Mutual labels:  linux-desktop, gnome
Rise-Media-Player
One media player for everything you own or stream; whether it's music or videos, online or offline Rise Media Player does it all. And it's beautiful and native with the latest version of WinUI.
Stars: ✭ 600 (+45.28%)
Mutual labels:  media, media-player
Libvlc Go
Go bindings for libVLC and high-level media player interface
Stars: ✭ 188 (-54.48%)
Mutual labels:  media, media-player
Python Mpv
Python interface to the awesome mpv media player
Stars: ✭ 245 (-40.68%)
Mutual labels:  media, media-player
iptv-m3u-player
项目iptv-m3u-maker衍生项目,利用已分析出的数据进行播放的桌面端app
Stars: ✭ 73 (-82.32%)
Mutual labels:  media, media-player
Pi-OpenCast
📺 Transform your Raspberry Pi into an awesome streaming device.
Stars: ✭ 29 (-92.98%)
Mutual labels:  chromecast, media-player

📺 Control Chromecasts from Linux

chromecast_mpris allows you to view and control media playback on casting devices from the Linux desktop.

Integrations

chromecast_mpris controls Chromecasts and casting devices via MPRIS media player controls.

MPRIS is the standard media player interface on Linux desktops.

MPRIS integration is enabled by default in Plasma Desktop, and, along with GNOME's volume control widget, there are widgets for GNOME, too. playerctl provides a CLI for controlling media players through MPRIS.

Check out ▶️mpris_server if you want to integrate MPRIS support into your media player.

Screenshots

Controlling a Chromecast via Plasma Desktop's Media Player widget:

Features

  • [x] Control music and video playback
  • [x] Control app playback
  • [x] View playback information in real-time
  • [x] Display thumbnail and title
  • [x] Display playback position and media length
  • [x] Seek forward and backward
  • [x] Play, pause, and stop playback
  • [x] Volume up and down
  • [x] Play next and previous
  • [x] Quit casted app
  • [x] Open media from D-Bus
  • [x] Play YouTube videos
  • [ ] Playlist integration

Installation

Requirements

Installing PyGObject

On Debian-derived distributions like Ubuntu, install python3-gi with apt. On Arch, you'll want to install python-gobject, or install chromecast_mpris directly from the AUR. On macOS, install pygobject3 via brew.

Use pip to install PyGObject>=3.34.0 if there are no installation candidates available in your vendor's package repositories.

PyPI

$ python3 -m pip install chromecast_mpris

You'll get a chromecast_mpris executable added to your $PATH.

GitHub

Check out the releases page on GitHub for stable releases.

If you'd like to use the development branch, clone the repository.

Once you have a source copy, run python3 -m pip install -r requirements.txt, followed by python3 setup.py install.

You'll get a chromecast_mpris executable added to your $PATH.

AUR

If you're on Arch, you can install chromecast_mpris directly from the AUR.

$ yay -S chromecast_mpris

Upgrades

Stable releases are uploaded to PyPI. You can upgrade your chromecast_mpris installation like so:

$ python3 -m pip --upgrade chromecast_mpris

See the releases page on GitHub.

Usage

You'll need to make sure that your computer is on the same network as your devices, and that you're able to make connections to them.

It also helps to know the names of the devices in advance.

Launch

Installing the package via PyPI, GitHub or the AUR will add chromecast_mpris to your pip executables path:

$ which chromecast_mpris 
~/.local/bin/chromecast_mpris

If you have your pip executables path added to your shell's $PATH, you can launch chromecast_mpris like so:

$ chromecast_mpris

You can also launch chromecast_mpris via its Python module. This can be useful if your $PATH doesn't point to your pip executables.

$ python3 -m chromecast_mpris

Help

$ chromecast_mpris --help
Usage: chromecast_mpris [OPTIONS]

  Control casting devices via Linux media controls and desktops.

  This daemon connects your casting device directly to the D-Bus media
  player interface.

Options:
  -n, --name TEXT         Connect to a device via its name, otherwise control
                          the first device found.

  -h, --host TEXT         Connect to a device via its hostname or IP address,
                          otherwise control the first device found.

  -u, --uuid TEXT         Connect to a device via its UUID, otherwise control
                          the first device found

  -w, --wait FLOAT        Seconds to wait between trying to make initial
                          successful connections to a device.

  -r, --retry-wait FLOAT  Seconds to wait between reconnection attempts if a
                          successful connection is interrupted.  [default:
                          5.0]

  -i, --icon              Use a lighter icon instead of the dark icon. The
                          lighter icon goes well with dark themes.  [default:
                          False]

  -l, --log-level TEXT    Set the debugging log level.  [default: WARN]
  --help                  Show this message and exit.

Connect to a device

Connect to a device named "My Device" and run chromecast_mpris in the background.

$ chromecast_mpris --name "My Device" &
[1] 1234

After launching chromecast_mpris, you can use any MPRIS client to interact with it. MPRIS support is built in directly to Plasma Desktop and GNOME 3, and you can use playerctl on the command-line.

Retry until a Chromecast is found

You can use the -w/--wait flag to specify a waiting period in seconds before chromecast_mpris will try to find a casting device again if one is not found initially.

For example, if you want to wait 60 seconds between scans for devices, you can run the following:

$ export SECONDS=60
$ chromecast_mpris --wait $SECONDS

This is useful if you'd like to start chromecast_mpris at login, and there is a chance that your device isn't on, or you're on a different network.

Open a URI on a Chromecast

Get the D-Bus name for your device using playerctl.

$ playerctl --list-all
My_Device

Use the D-Bus name to issue commands to it.

$ export URL="http://ccmixter.org/content/gmz/gmz_-_Parametaphoriquement.mp3"
$ playerctl --player My_Device open "$URL"

This will play a song on your device.

Open a YouTube video

You can cast YouTube videos the same way you can cast a generic URI.

$ export VIDEO="https://www.youtube.com/watch?v=I4nkgJdVZFA"
$ playerctl --player My_Device open "$VIDEO"

Support

Want to support this project and other open-source projects like it?

Buy Me A Coffee

License

See LICENSE. Message me if you'd like to use this project with a different license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].