GNU General Public License v3.0

项目介绍

iamdb/hifi.rs 是一个托管在 GitHub 上的开源项目,主要使用 Rust 编写,采用 GNU General Public License v3.0 许可证,目前获得 132 个 Star、10 次 Fork。

仓库全名
iamdb/hifi.rs
开源许可证
GNU General Public License v3.0
Star 数
132
Fork 数
10
未关闭 Issue
21

README 摘要

hifi.rs A terminal-based (tui), high resolution audio player backed by Qobuz Powered by Qobuz. Requires a paid subscription. This does not allow you to listen for free. Qobuz only supports Linux through the browser and has no officially supported API. There are ways of accessing Qobuz in Linux outside of the browser through third-party applications like Squeezelite and Roon. These apps are great, but I wanted…

完整内容见 GitHub 原始 README 或本页 。

常见问题

hifi.rs 用什么语言开发?

主要使用 Rust 编写,采用 GNU General Public License v3.0 许可证,目前有 132 个 Star。

hifi.rs 可以免费商用吗?

仓库标注的许可证为 GNU General Public License v3.0,商用前请先阅读仓库 LICENSE 文件确认授权范围。

如何获取 hifi.rs 的源码?

可以直接克隆仓库:git clone https://github.com/iamdb/hifi.rs.git,默认分支为 main;安装与运行步骤见仓库 README。

hifi.rs 最近还在维护吗?

仓库最近一次更新为 2024年7月22日,当前有 21 个未关闭 Issue;Star 数为 132,可作为社区活跃度的参考。

关于

a high resolution Qobuz streamer built in Rust

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

简要分析

热度分
160
价值分
81
活跃状态
活跃

README

hifi.rs

A terminal-based (tui), high resolution audio player backed by Qobuz

Powered by Qobuz. Requires a paid subscription. This does not allow you to listen for free.

Qobuz only supports Linux through the browser and has no officially supported API. There are ways of accessing Qobuz in Linux outside of the browser through third-party applications like Squeezelite and Roon. These apps are great, but I wanted something simpler that just focused on being able to quickly find and play an album inside the console.

TUI Screenshot

Player Features

  • Low resource usage
  • GStreamer-backed player, SQLite database
  • High resolution audio: Supports up to 24bit/192Khz (max quality Qobuz offers)
  • MPRIS support (control via playerctl or other D-Bus client)
  • Gapless playback
  • Resume last session
  • Optional Web UI with WebSocket API

In addition to the player, there is a Spotify to Qobuz playlist sync tool and an incomplete Rust library for the Qobuz API.

Requirements

  • GStreamer v1.18+ (comes with most/all current Linux and MacOS versions)
  • Just (optional, useful for building and development)

Installation

Download Release

Download the tar.gz file for your supported OS from the releases page, extract the file and execute hifi-rs or copy it to the your $PATH.

Build from source

To make building Linux versions from source simpler, there is a Dockerfile.x86_64 and Dockerfile.aarch64 to compile the project for Linux x86 and arm64 into a container. After building the image, the file can be extracted to the local disk.

Run just docker-build-linux <x86_64 or aarch64> to automate this.

On MacOS, Debian, Arch and Fedora, just build-player should make a reasonable effort to install the necessary dependencies needed to build the app and then build it.

Get started

Run hifi-rs --help or hifi-rs <subcommand> --help to see all available options.

To get started:

hifi-rs config username # enter username at prompt
hifi-rs config password # enter password at prompt
hifi-rs config default-quality <quality> # mp3, cd, hifi96 or hifi192

# play from the command line
hifi-rs play --url <Qobuz Album, Playlist or Track URL>

# open player
hifi-rs open

# open player with web ui
hifi-rs --web open

TUI Controls

The TUI has full mouse support.

Keyboard Shortcuts

Command Key(s)
Now Playing 1
My Playlists 2
Search 3
Enter URL 3
Cycle elements tab
Play/Pause space
Next track N
Previous track P
Jump forward l
Jump backward h
Quit ctrl + c
Move up in list up arrow
Move down in list down arrow
Select item in list enter
Dismiss popup esc

Web UI and WebSocket API

"WebUI Desktop Screenshot"

The player can start an embedded web interface along with a websocket API. As this is a potential attack vector, the server is disabled by default and must be started with the --web argument. It also listens on 0.0.0.0:9888 by default, but an inteface can be specified with the --interface argument.

Go to http://<ip>:9888 to view the UI. The WebSocket API can be found at ws://<ip>:9888/ws.

There is no security on the WebSocket API, however it will reject any messages that cannot be parsed into a player action and it only interacts with the player. There is no reading or writing to the file system by the serve. All files are served from within the binary.

For any new clients, the server will send a stream of messages that bootstrap the active state of the player.

API Controls

To control the player through the WebSocket API, send it a message with the required action.

Example payloads:

Play:

{ "play": null }

Pause:

{ "pause": null }

Skip To Track:

{ "skipTo": { "num": "<track index>"} }

For more options, see the Action enum.

评论

暂无评论