Crates.io | hidamari |
lib.rs | hidamari |
version | 0.1.0 |
source | src |
created_at | 2020-08-19 13:05:22.406364 |
updated_at | 2020-08-19 13:05:22.406364 |
description | HIDAMARI mdp controler |
homepage | https://github.com/zuntan/hidamari |
repository | https://github.com/zuntan/hidamari |
max_upload_size | |
id | 278193 |
size | 6,090,532 |
HIDAMARI is a controller for MPD ( music player daemon ).
You can control MPD from your PC or Futurephone browser.
You can easily select songs from the library, manipulate the playlist and play/stop the songs.
Also, the visual animations will make you feel good while playing.
Japanese document is here
It is under development.
It is under development.
Install the following
By using the FIFO output of mpd, make the following settings in /etc/mpd.conf and restart mpd.
audio_output {
type "fifo"
name "my_fifo"
path "/tmp/mpd.fifo"
format "44100:16:2"
}
$ systemctl restart mpd.service
[Unit]
Description=BluezALSA proxy
Requires=bluetooth.service
After=bluetooth.service
[Service]
Type=simple
User=root
ExecStart=/usr/bin/bluealsa -p a2dp-source -p a2dp-sink
$ systemctl daemon-reload
$ systemctl restart bluealsa.service
$ apt-get install libasound2-dev libflac-dev libflac8 libogg-dev libogg0
$ apt-get install libdbus-1-dev libdbus-1-3 libsystemd-dev libsystemd0 liblz4-dev liblz4-1 liblzma-dev liblzma5 libgcrypt20-dev libgcrypt20 libgpg-error-dev libgpg-error0
$ cd /usr/lib/x86_64-linux-gnu
or
$ cd /usr/lib/arm-linux-gnueabihf
$ ln -s libFLAC.so libflac.so
$ git clone https://github.com/zuntan/hidamari.git
$ cd hidamari
$ cargo build --release
$ usermod -G bluetooth -a <<User>>
Check hidamari.conf. See below for the values in hidamari.conf.
Execution.
$ cargo run --release
As a prerequisite, you should be able to compile with Debian as described above.
Install a toolchain. For example, install ~/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.
$ cd ~
$ wget https://dl.armbian.com/_toolchains/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.xz
$ tar xvJf gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.xz
$ vi ~/.profile
export PATH="$HOME/.cargo/bin:$HOME/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin:$PATH"
$ cat <EOT > /etc/apt/sources.list.d/raspbian.list
deb [arch=armhf] http://archive.raspbian.org/raspbian jessie main contrib non-free
EOT
$ wget https://archive.raspbian.org/raspbian.public.key -O - | apt-key add -
$ dpkg --add-architecture armhf
$ dpkg --print-foreign-architectures
$ apt-get update
$ apt-get install libasound2-dev:armhf libflac-dev:armhf libflac8:armhf libogg-dev:armhf libogg0:armhf
$ apt-get install libdbus-1-dev:armhf libdbus-1-3:armhf libsystemd-dev:armhf libsystemd0:armhf liblz4-dev:armhf liblz4-1:armhf liblzma-dev:armhf liblzma5:armhf libgcrypt20-dev:armhf libgcrypt20:armhf libgpg-error-dev:armhf libgpg-error0:armhf
$ cd /usr/lib/arm-linux-gnueabihf
$ ln -s libFLAC.so libflac.so
$ export PKG_CONFIG_armv7_unknown_linux_gnueabihf=1
$ export PKG_CONFIG_PATH_armv7_unknown_linux_gnueabihf=/lib/arm-linux-gnueabihf/pkgconfig
$ cargo build --release --target armv7-unknown-linux-gnueabihf
$ file target/armv7-unknown-linux-gnueabihf/release/hidamari
target/armv7-unknown-linux-gnueabihf/release/hidamari: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, with debug_info, not stripped
#
# The format of this file is TOML.
#
config_dyn = "hidamari_dyn.conf"
bind_addr = "0.0.0.0:18080"
mpd_addr = "127.0.0.1:6600"
mpd_httpd_url = "http://127.0.0.1:8080"
self_url_for_mpd = ""
mpd_protolog = false
mpd_fifo = "/tmp/mpd.fifo"
mpd_fifo_fftmode = 0
contents_dir = ""
albumart_upnp = false
albumart_localdir = "/var/lib/mpd/music"
- config_dyn : file path
- Specify the file path for hidamari_dyn.conf.
- bind_addr : ipaddr
- Specify the port on which HIDAMARI listens for HTTP services.
- mpd_addr : ipaddr
- Specify the service listen port of MPD from HIDAMARI's point of view.
- mpd_httpd_url : URI
- Specifies the listen port for the HTTP stream service in MPD as seen by HIDAMARI. This will be used for stream proxies. If you don't need it, set it to "".
- self_url_for_mpd : ipaddr
- Specify the HIDAMARI alsa stream protocol to be presented to MPD. If this value is "", then http://127.0.0.1:<<bind_addr's port value>> will be used. This is the URL prefix for the HIDAMARI HTTP service from MPD's point of view.
- mpd_protolog : true/false
- This switch is used to log the execution of MPD commands.
- mpd_fifo : File path
- Specifies the path to the MPD FIFO pipe.
- mpd_fifo_fftmode : 0 - 5
- Specifies the mode of FFT processing. Normally 0. (Buffer size: 4096, buffer slide size: 2048, frequency resolution: 1/2 oct )
- Changing the value changes the buffer size, buffer slide size and frequency resolution of the FFT process. The higher the number, the worse the accuracy is, and the lower the load is.
- contents_dir : File path.
- The directory path to the directory where hidamari html, javascript, etc. are stored. If this value is "", the current path /_contents is referenced.
- albumart_upnp : true/false
- If the database of MPD is upnp, set this to true.
- albumart_localdir : File path
- When albumart is acquired, albumart is acquired from the music files under the specified directory.
todo.
todo.