Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ytplay

Search and play songs right from your terminal!

Dependencies

  • youtube-dl
  • ffmpeg (This program currently uses the ffplay utility to play audio)

Installation

  • Get API key for the Youtube API by creating a new project here and then generate credentials
  • Install youtube-dl and ffmpeg
  • [For Windows] Add youtube-dl.exe and ffplay.exe to the path
  • Download the binary from the releases section of this repository
  • [For Linux] Make the binary executable
  • [For Windows] Add the binary to the path to execute from anywhere

Usage

  • List all available flags ytplay -h or ytplay --help
  • Run ytplay -key <your-api-key> (API key needs to be set in order to search for songs from YouTube)
  • Then just search for songs by keyword ytplay search <keyword> (Make sure there are no spaces in the keyword)
  • Ctrl+C is used for pausing/stopping the song
  • A song stopped with ^C can be resumed by typing ytplay -resume

Note

  • The Youtube API has a default quota of 10k units per day
  • Each search request consumes 100 units
  • That means you can search for 100 songs per day and the quota will be reset for the next day

TODO

  • Tests
  • Creating and managing playlists
  • Use a Go audio libary like faiface/beep or oto (remove ffplay dependency)
  • Improve UI by using TUI libs

About

CLI to play songs from the terminal using youtube-dl

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages