百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
P

playx

> 编程语言
开源

从终端搜索并播放任何歌曲

198 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

从终端搜索并播放任何歌曲

playx in action

Philosophy

Play any songs that come in your mind.

Hoping to make it an awesome music assistant


Installation

  • For Arch Linux users, it is available in AUR with the name playx.

  • For others, it can be installed manually.

    Make sure all the dependencies are installed.

    Run the following command in the root directory to install playx.

    bash
    pip install -e .

    Or install using setup.py as:

    bash
    python setup.py install

    This method is the recommended one.


Requirements/Dependencies

  1. Python3.x

  2. pip3

  3. MPV

  • Get MPV (website) from here.

  • Get MPV (github) from here.

  1. Chromium

Note: These dependencies in linux can be installed in other variants.
For arch linux, you can use pacman package manager accordingly. Numpy is used for Markov-Chain based playlist.


Releases

These releases are almost stable.

  • v1.5.2-approximate-void

Features

  • play by query
  • play by youtube url
  • play a youtube playlist
  • play a billboard chart
  • play a spotify playlist
  • play from soundcloud playlist
  • play from JioSaavn playlist
  • play from gaana playlist.
  • play from local playlist
  • play from Youtube Music playlist
  • cache support
  • CLI using mpv
  • auto generate playlist

Usage

For now, the application is in development phase.

…

Example

Play by song name

bash
playx 

Play by youtube link

bash
playx 

Play by soundcloud links

bash
playx https://api.soundcloud.com/tracks/232673157

This plays soundcloud track

Play from youtube playlist

bash
playx 

Play from a Billboard Chart

bash
playx hot-100

Play from spotify playlist

bash
playx https://open.spotify.com/playlist/37i9dQZF1DX5Ozry5U6G0d

This plays the songs from Spotify Summer Party playlist.

Play from soundcloud playlist

bash
playx https://soundcloud.com/devintracy/sets/goodafternoon

This plays the songs from SoundCloud playlist

Play from JioSaavn playlist

bash
playx https://www.jiosaavn.com/featured/magical-amit-trivedi/IGYxX3V4T7w_

This plays songs from the JioSaavn playlist

Play from YouTube Music Playlist

bash
playx 

Play from local playlist

The local playlist should have an extension .playx in order for us to recognize it as a playlist.

bash
playx example.playx

This plays a playlist named example.playx

For a playlist every line is considered an entry. Refer to example.playx.

Auto-Generate Playlist

bash
playx --auto

This will automatically generate a playlist by using the frequency of songs played that has been logged in the log file.

Term-Based Search

bash
playx --rsearch 

This will automatically generate a playlist of cached songs containing the provided terms.


Cache Directory Structure

By default, playx creates a directory in the home as ~/.playx (which is a hidden folder). Structure is like:

bash
.playx
    |- songs/
    |- logs/
    |- playlist/
    |- playxlist/

songs: This stores all the songs logs: This stores the log for user activities of songs that are searched and played with creation date. This will be used for recommendation of songs in future version playlist: This stores all the cached playlists files. playxlist: Stores all the playxlist files.


Having Issues? (We're not perfect!)

First update youtube-dl

youtube-dl is the core through which we fetch stream urls for any song or any YT playlist.
So, update it first

bash
pip install -U youtube-dl

youtube-dl keeps on rolling out updates actively because the YouTube keeps on updating its internals for html. So, the parser/crawler should be updated periodically.

Second try cleaning the broken cache as

bash
playx --clean

Chances are you have a url in the urls.json but the local mp3 might not exist in ~/.playx/songs/. So, cleaning and running the playx might mitigate that.

See The Partial Log

Log is found at logs/partial_log

See Playlist File

Files can be found inside playlist/. Chances are there might be empty links or names.

Selenium Web Driver Issue

Maybe you don't have the chromedriver that's required to crawl.
One example of how we use chromedriver is here.

Not having proper setup of the driver may result in empty playlists, especially related playlist one.

Please Create An Issue In GitHub here


Contributions

Contributions are warmly welcome. Please do go through CONTRIBUTING.


Module-level Dependency Graph

This is generated using pydeps. The codebase is kinda messy, isn't it? :D


TO-DO

  • caching of downloaded songs (if the song exists locally, play it right away else play from youtube)
  • speed up the whole search->download->convert->play process
  • stream/play while downloading the song
  • play all the songs from the cache
  • search lyrics
  • play from youtube playlist
  • play from local playlist (may be a list of song names)
  • play from other playlist (spotify, billboard, etc.)
  • log activity
  • auto generate playlist
  • use Markov Chains to improve auto-playlist
  • local search based on term matching
  • use Factorization Machines to improve auto-playlist
  • use logs to create simple recommendations
  • Add 3rd-party integration like Spotify (using authentication mechanism). [Priority - Low]

Acknowledgements

  • Thanks to Deepjyoti Barman for doing all the major contributions (parallelizing streaming + downloads , playlist, logger)
  • Thanks to Mirza Zulfan for logo for playx. It's neat (and cool)
  • Thanks to Mattwmaster58 for creating packaging structure with setup file
  • A good blog by Deepjyoti about copyright infringement and licensing issues we encountered for playx can be found here.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Pythonaudiolinuxmusicyoutube-search

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言