jim4067 / play-song

Play songs in current directory or specified directory.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PLAY-SONG

Description

play-song is a cli app that plays mp3 and m4a songs from the current directory or a specified directory. For uninterrupted music playback on the terminal.

Tech stack 💻

This is a rust project and I am using the following crates.

  • rodeo for decoding and playing the mp3 files.
  • redlux for decoding and playing the m4a files.
  • id3 for reading the mp3 files' metadata.
  • mp4ameta for reading the m4a files' metadata.
  • walkdir for traversing the file system and finding mp3 and m4a files.
  • clap for parsing command line arguments.

Source data 📝

I used local files on my computer

What I learned?

  • Traversing the Linux file system.
  • what Id3 metadata for music files is and how to read it.

Going forward?

  • I'll take a deeper dive into the world of Linux and audio and get to better understand how ALSA, pulseaudio and the clients sound producers all work together.
  • I'll learn how to write audio decoders for media file and learn how different audio file formats store media data.
  • I'll learn how to add playback controls to the player, use async rust features to prevent the blocking behaviour encountered when only working with one thread.

Future Improvements

  • Instead of reading file extensions to determine the type of file, I could use the file metadata.
  • Use the rust native path type instead of a String for file paths.

Project setup

Download the compiled binary package from the releases page.

Jimmy ©2021

About

Play songs in current directory or specified directory.


Languages

Language:Rust 100.0%