Skip to content
forked from xfangfang/Macast

A crossplatform menu bar application using mpv as DLNA AVTransport Media Renderer.

Notifications You must be signed in to change notification settings

ryumiyax/Macast

 
 

Repository files navigation

Macast

Chinese README

demo A menu bar application using mpv as DLNA AVTransport Media Renderer.

Currently supported platform 🖥 :

  • MacOS
  • Gnome (test with ubuntu20.04)
  • KDE (test with kubuntu21.04)
  • Other Linux under xorg (test with Raspberry Pi OS)
  • Windows (beta)

For details of GUI support, please refer to: https://pystray.readthedocs.io/en/latest/usage.html#selecting-a-backend

Install

  • MacOS

Download link: Macast_v*_darwin.zip

  • Windows

Download link: Macast_v*_windows_debug.zip

  • Linux

wget https://github.com/xfangfang/Macast/archive/main.zip
unzip main.zip
cd Macast-main
pip3 install pystray cherrypy lxml requests
python3 Macast.py
# if there is something wrong, try this:
export PYSTRAY_BACKEND=gtk && python3 Macast.py

Tips:

  1. Make sure you have mpv installed:
# install mpv in ubuntu
sudo apt install mpv
  1. Make sure you can use gi:
$ python3
Python 3.7.10 (default, Jun  3 2021, 17:51:26)
Type "help", "copyright", "credits" or "license" for more information.
>>> import gi
>>>

if there is something wrong, try: sudo apt-get install python3-gi

if you use conda, check this https://stackoverflow.com/a/40303128

Usage

After opening this app, a small icon will appear in the menu bar, and you can push video from a local DLNA client.

⚠️ In MacOS The "~/Library/Application\ Support/Macast" directory will be created to save the configuration information of the application

Development upder MacOS

1. download mpv

wget https://laboratory.stolendata.net/~djinn/mpv_osx/mpv-latest.tar.gz
mkdir -p bin && tar --strip-components 2 -C bin -xzvf mpv-latest.tar.gz mpv.app/Contents/MacOS

2. debug

pip install -r requirements.txt
python Macast.py

⚠️ MPV starts slowly the first time you run Macast.py, it needs to wait for a while

3. package

pip install py2app
pip install setuptools==44.0.0 # try this if you cannot run Macast.app
python setup.py py2app
cp -R bin dist/Macast.app/Contents/Resources/
open dist

⚠️ After packing, you can find the compiled content in the dist directory

Relevant links

UPnP™ Device Architecture 1.1

python-upnp-ssdp-example

pystray

About

A crossplatform menu bar application using mpv as DLNA AVTransport Media Renderer.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%