[App Sharing] Macast —— 一个跨平台的DLNA投屏接收器
Tofloor
poster avatar
zanyrain
deepin
2021-08-23 02:26
Author

使用 Macast

软件介绍

Macast是一个跨平台的 菜单栏\状态栏 应用,用户可以使用电脑接收发送自手机的视频、图片和音乐。支持主流视频音乐软件和其他任何符合DLNA协议的投屏软件.

项目地址:https://gitee.com/xfangfang/Macast https://github.com/xfangfang/Macast

视频介绍:https://www.bilibili.com/video/BV1Cg411j76F

使用方法

启动应用后会在通知栏显示一个图标,在支持DLNA投屏的软件(如哔哩哔哩、央视频)中选择视频进行投屏,就能播放了。

效果演示

Reply Favorite View the author
All Replies
zanyrain
deepin
2021-08-23 02:28
#1

自己构建的deb二进制包如下:

https://wwa.lanzoui.com/b0b3x0pjc
密码:6zl5

在 Docker 环境下使用 debian:buster-slim 镜像为基础构建

你可以使用下列命令复现整个构建过程

apt update
apt install -y python3 python3-pip python3-gi libgtk-3-dev git mpv gettext lsb-release
cd /root
git clone https://github.com/xfangfang/Macast
cd Macast
pip3 install --upgrade pip
pip3 install -r requirements/common.txt
pip3 install pyinstaller
msgfmt -o i18n/zh_CN/LC_MESSAGES/macast.mo i18n/zh_CN/LC_MESSAGES/macast.po
pyinstaller --noconfirm -F -w --additional-hooks-dir=. --add-data=".version:." --add-data="macast/xml/*:macast/xml"  --add-data="i18n/zh_CN/LC_MESSAGES/*.mo:i18n/zh_CN/LC_MESSAGES" --add-data="assets/*:assets" Macast.py
export VERSION=`cat .version`
mkdir -p dist/DEBIAN
mkdir -p dist/usr/bin
mkdir -p dist/usr/share/applications
mkdir -p dist/usr/share/icons
echo -e "Package: Macast\nVersion: ${VERSION}\nArchitecture: amd64\nMaintainer: xfangfang\nDescription: DLNA Media Renderer\nDepends: mpv" > dist/DEBIAN/control
echo -e "[Desktop Entry]\nName=Macast\nComment=DLNA Media Renderer\nExec=env PYSTRAY_BACKEND=gtk /usr/bin/macast\nIcon=/usr/share/icons/Macast.png\nTerminal=false\nType=Application\nCategories=Video" > dist/usr/share/applications/macast.desktop
mv dist/Macast dist/usr/bin/macast
cp assets/icon.png dist/usr/share/icons/Macast.png
dpkg -b dist /tmp/Macast-v${VERSION}-$(lsb_release -cs).deb

 

Reply View the author
好聚好散
deepin
2021-08-23 03:46
#2

非常好用

Reply View the author
neko
deepin
Ecological co-builder
2021-08-23 04:12
#3

收藏!终于有个在linux下还不错的投屏软件了

Reply View the author
jiutian123
deepin
2021-08-23 05:04
#4

sz@nsz:~$ macast

[5424] Error loading Python lib '/tmp/_MEIwHNn8m/libpython3.8.so.1.0': dlopen: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /tmp/_MEIwHNn8m/libpython3.8.so.1.0)

 

Reply View the author
zanyrain
deepin
2021-08-23 05:29
#5
jiutian123

sz@nsz:~$ macast

[5424] Error loading Python lib '/tmp/_MEIwHNn8m/libpython3.8.so.1.0': dlopen: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /tmp/_MEIwHNn8m/libpython3.8.so.1.0)

 

用我下面构建那个或者自行构建,用它官方的就会这样

Reply View the author
jiutian123
deepin
2021-08-23 05:51
#6

macast

/tmp/_MEIG2GzWi/gi/overrides/Gdk.py:461: Warning: g_value_set_boxed: assertion 'G_VALUE_HOLDS_BOXED (value)' failed

Traceback (most recent call last):

  File "Macast.py", line 14, in

  File "", line 983, in _find_and_load

  File "", line 967, in _find_and_load_unlocked

  File "", line 677, in _load_unlocked

  File "PyInstaller/loader/pyimod03_importers.py", line 546, in exec_module

  File "macast/__init__.py", line 8, in

  File "", line 983, in _find_and_load

  File "", line 967, in _find_and_load_unlocked

  File "", line 677, in _load_unlocked

  File "PyInstaller/loader/pyimod03_importers.py", line 546, in exec_module

  File "macast/gui.py", line 15, in

  File "", line 983, in _find_and_load

  File "", line 967, in _find_and_load_unlocked

  File "", line 677, in _load_unlocked

  File "PyInstaller/loader/pyimod03_importers.py", line 546, in exec_module

  File "pystray/__init__.py", line 48, in

  File "pystray/__init__.py", line 40, in backend

  File "importlib/__init__.py", line 127, in import_module

  File "", line 1006, in _gcd_import

  File "", line 983, in _find_and_load

  File "", line 967, in _find_and_load_unlocked

  File "", line 677, in _load_unlocked

  File "PyInstaller/loader/pyimod03_importers.py", line 546, in exec_module

  File "pystray/_appindicator.py", line 22, in

  File "gi/__init__.py", line 129, in require_version

ValueError: Namespace AppIndicator3 not available

[11566] Failed to execute script 'Macast' due to unhandled exception!

百度云盘版错误提示, UOS家庭版B6版本

 

上一楼是gitee0.5版本错误提示

 

Reply View the author
q77190858
deepin
2021-08-23 05:59
#7

不错支持一下

Reply View the author
zanyrain
deepin
2021-08-23 08:52
#8
jiutian123

macast

/tmp/_MEIG2GzWi/gi/overrides/Gdk.py:461: Warning: g_value_set_boxed: assertion 'G_VALUE_HOLDS_BOXED (value)' failed

Traceback (most recent call last):

  File "Macast.py", line 14, in

  File "", line 983, in _find_and_load

  File "", line 967, in _find_and_load_unlocked

  File "", line 677, in _load_unlocked

  File "PyInstaller/loader/pyimod03_importers.py", line 546, in exec_module

  File "macast/__init__.py", line 8, in

  File "", line 983, in _find_and_load

  File "", line 967, in _find_and_load_unlocked

  File "", line 677, in _load_unlocked

  File "PyInstaller/loader/pyimod03_importers.py", line 546, in exec_module

  File "macast/gui.py", line 15, in

  File "", line 983, in _find_and_load

  File "", line 967, in _find_and_load_unlocked

  File "", line 677, in _load_unlocked

  File "PyInstaller/loader/pyimod03_importers.py", line 546, in exec_module

  File "pystray/__init__.py", line 48, in

  File "pystray/__init__.py", line 40, in backend

  File "importlib/__init__.py", line 127, in import_module

  File "", line 1006, in _gcd_import

  File "", line 983, in _find_and_load

  File "", line 967, in _find_and_load_unlocked

  File "", line 677, in _load_unlocked

  File "PyInstaller/loader/pyimod03_importers.py", line 546, in exec_module

  File "pystray/_appindicator.py", line 22, in

  File "gi/__init__.py", line 129, in require_version

ValueError: Namespace AppIndicator3 not available

[11566] Failed to execute script 'Macast' due to unhandled exception!

百度云盘版错误提示, UOS家庭版B6版本

 

上一楼是gitee0.5版本错误提示

 

参考 https://pystray.readthedocs.io/en/latest/usage.html#selecting-a-backend

添加环境变量

export PYSTRAY_BACKEND=gtk

试一下,按说打的那个包的时候我已经写死了呀,不该出问题的
Reply View the author
jiutian123
deepin
2021-08-23 22:35
#9

@ Maicss出手打包个 uos版

Reply View the author
jiutian123
deepin
2021-08-23 22:37
#10
zanyrain

参考 https://pystray.readthedocs.io/en/latest/usage.html#selecting-a-backend

添加环境变量

export PYSTRAY_BACKEND=gtk

试一下,按说打的那个包的时候我已经写死了呀,不该出问题的

后面发现可以投屏,虽然有错误提示,是英文

Reply View the author
jiutian123
deepin
2021-08-24 18:27
#11
zanyrain

用我下面构建那个或者自行构建,用它官方的就会这样

git clone https://github.com/xfangfang/Macast     这个怎么换 gitee?
Reply View the author
zanyrain
deepin
2021-08-24 19:31
#12
jiutian123
git clone https://github.com/xfangfang/Macast     这个怎么换 gitee?

作者有gitee https://gitee.com/xfangfang/Macast

Reply View the author
海天鹰
deepin
2021-08-25 00:53
#13

人家已经编译好了:

https://gitee.com/xfangfang/Macast/releases

Reply View the author
zanyrain
deepin
2021-08-25 00:59
#14
海天鹰

人家已经编译好了:

https://gitee.com/xfangfang/Macast/releases

你那里glibc不会报错吗?

Reply View the author
海天鹰
deepin
2021-08-25 07:22
#15
zanyrain

你那里glibc不会报错吗?

好吧,我试的优麒麟

Reply View the author
海天鹰
deepin
2021-08-25 07:30
#16
zanyrain

自己构建的deb二进制包如下:

https://wwa.lanzoui.com/b0b3x0pjc
密码:6zl5

在 Docker 环境下使用 debian:buster-slim 镜像为基础构建

你可以使用下列命令复现整个构建过程

apt update
apt install -y python3 python3-pip python3-gi libgtk-3-dev git mpv gettext lsb-release
cd /root
git clone https://github.com/xfangfang/Macast
cd Macast
pip3 install --upgrade pip
pip3 install -r requirements/common.txt
pip3 install pyinstaller
msgfmt -o i18n/zh_CN/LC_MESSAGES/macast.mo i18n/zh_CN/LC_MESSAGES/macast.po
pyinstaller --noconfirm -F -w --additional-hooks-dir=. --add-data=".version:." --add-data="macast/xml/*:macast/xml"  --add-data="i18n/zh_CN/LC_MESSAGES/*.mo:i18n/zh_CN/LC_MESSAGES" --add-data="assets/*:assets" Macast.py
export VERSION=`cat .version`
mkdir -p dist/DEBIAN
mkdir -p dist/usr/bin
mkdir -p dist/usr/share/applications
mkdir -p dist/usr/share/icons
echo -e "Package: Macast\nVersion: ${VERSION}\nArchitecture: amd64\nMaintainer: xfangfang\nDescription: DLNA Media Renderer\nDepends: mpv" > dist/DEBIAN/control
echo -e "[Desktop Entry]\nName=Macast\nComment=DLNA Media Renderer\nExec=env PYSTRAY_BACKEND=gtk /usr/bin/macast\nIcon=/usr/share/icons/Macast.png\nTerminal=false\nType=Application\nCategories=Video" > dist/usr/share/applications/macast.desktop
mv dist/Macast dist/usr/bin/macast
cp assets/icon.png dist/usr/share/icons/Macast.png
dpkg -b dist /tmp/Macast-v${VERSION}-$(lsb_release -cs).deb

 

托盘菜单,复制视频地址,怎么没有了?

Reply View the author
whoami
deepin
2021-09-13 20:22
#17

好用

Reply View the author
tikkhun
deepin
2023-07-16 21:14
#18

请问 macast 在 deepin 一直报 ssdp 启动错误,我查了 是 minidlna 导致的错误,但是 minidlna 已经被我卸载了 macast还是启动不了,有大神帮忙看一下有什么服务需要关么?

Reply View the author