-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any Desire to Support Audio Files? #152
Comments
Thank you very much for your interest in Macast. Macast has a built-in MPV to play media files. It simply passes the file links from DLNA client to MPV to play. So you can check whether your files can be played normally by simply using MPV. Add: If you are playing audio files, there is no playback control page, so you need to control the volume or playback progress from the DLNA client. If you find that a version of MPV or an MPV compiled by yourself can play those audio files, you can put this file in the renderer plugin folder (fullpath: $HOME/Library/Application\ Support/Macast/renderer/custom_mpv.py) Restart Macast, and then select the # Copyright (c) 2021 by xfangfang. All Rights Reserved.
#
# MPV Demo Renderer
#
# Macast Metadata
# <macast.title>Custom MPV Renderer</macast.title>
# <macast.renderer>CustomMPVRenderer</macast.renderer>
# <macast.platform>darwin,win32,linux</macast.platform>
# <macast.version>0.1</macast.version>
# <macast.host_version>0.7</macast.host_version>
# <macast.author>xfangfang</macast.author>
# <macast.desc>A custom mpv renderer</macast.desc>
import gettext
import macast
from macast_renderer.mpv import MPVRenderer
# Change 'mpv' to your custom MPV
MPV_PATH = 'mpv'
class CustomMPVRenderer(MPVRenderer):
def __init__(self):
super(CustomMPVRenderer, self).__init__(gettext.gettext, MPV_PATH)
if __name__ == '__main__':
macast.gui(renderer=CustomMPVRenderer()) |
Thank you for your very prompt reply. mpv (installed via Homebrew prior to macast) does play an audio file I selected from my collection, so I put custom_mpv.py in the renderer plugin folder and selected it from the menu. However, as before, when selecting music from the UPnP control point/media server on the other computer, macast says File error: Unrecognized file format. |
Maybe some audio formats cannot be transmitted through http file stream, so errors will occur when playing through url links. You can try to select "Copy Url Link" from the menu of the macast when casting a file, and then play the link using the local mpv to test. |
New feature
There doesn't appear to be a UPnP/DLNA renderer that runs on Apple Silicon that supports playback of audio files, particularly those I'm most interested in, high resolution files. (These would be PCM and DSD files in formats such as WAV, FLAC, AIFF, ALAC, DSF, etc.) Macast runs beautifully on my M1 MacBook but doesn't recognize these audio file formats.
Additional context
This is purely a selfish request since I'm interested in streaming audio to an M1 Mac via UPnP/DLNA/OpenHome and macast at least currently seems to be the only renderer that works on Apple Silicon. Its small resource footprint and unobtrusiveness are attractive as well - I always like something that Just Works.
Since working with such file formats isn't something macast does now and I haven't seen a big demand from anyone except me, I would of course understand if it's not something you'd prefer to take on, But I thought I would raise the issue in case it's something you might be interested in doing.
The text was updated successfully, but these errors were encountered: