Skip to content

michaels4208/shairport-view-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shairport View RS

shairport-view-rs produces a set of executables for displaying audio metadata generated by the shairport-sync project.

This project aims to create a simple and efficient display of streamed audio metadata that can run smoothly on low-power machines like Raspberry Pi boards.

Contains:

  • shairport_view_cli: Prints metadata to stdout
  • shairport_view_gui: Displays metadata in an FLTK window

Both tools will read metadata from a pipe if the pipe's path is specified as a command line argument. Otherwise, they will read from stdin.

How to use this code:

Compiling:

Install Rust, then use its cargo build --release or cargo run --release commands. By default, both executables will be built. You can use --bin to only compile/run one

On some systems, you may need to run the following command to get the FLTK crate to work (I had to on my Raspbian OS install):

sudo apt-get install libx11-dev libxext-dev libxft-dev libxinerama-dev libxcursor-dev libxrender-dev libxfixes-dev libpango1.0-dev libgl1-mesa-dev libglu1-mesa-dev

Running:

Use cargo run --release or run an executable previously built in target/release/

You will need to specify the source FIFO path as a command line argument. /tmp/shairport-sync-metadata is the default path used by shairport-sync when built and run with metadata features.

Development:

If you don't have access to a running install of shairport-sync, you can still try out shairport-view-rs with the included metadata_gen_demo Bash script. This script will create a FIFO and write some fake metadata to it. This is especially handy for development on Mac OS, where shairport-sync won't run due to Macs already having AirPlay features.

Future Improvements:

  • The GUI is primitive and could use sprucing up
    • Addition of Album metadata(?) and icons indicating track, album, and artist. Maybe make album metadata toggleable.
    • Replace grey background with most common album color, or gradient from top color to bottom color, or maybe a blown up and blurred version of the art
    • Make track and artist text y position change based on window size
    • Handle text overflow. Maybe reposition and wrap? Or crop / crop and scroll?
  • It looks like there is metadata from shairport-sync for song progress. I'm not sure how to decode it but it could possibly be used for a song progress bar.

About

Rust GUI and CLI viewer for metadata produced by shairport-sync

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages