Giter VIP home page Giter VIP logo

macast's Introduction

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

macast's People

Contributors

xfangfang avatar haifeng97 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.