JAKYM, Just Another Konsole YouTube-Music. A command line based Youtube music player written in Python with spotify and youtube playlist support

Overview

Just Another Konsole YouTube-Music

Downloads

Overview

I wanted to create this application so that I could use the command line to play music easily. I often play games and listen to music simultaneously but using either Spotify or playing music in a browser takes much-needed resources from my CPU and RAM.

I have spent a lot of time looking through numerous CLI based music players. But they either required setting up lots of things, needed premium features to function or sometimes flat out didn't work even after tinkering with them for hours. Hence I thought that instead of looking for a solution, I should code it myself.

So I present to you JAKYM, Just Another Konsole YouTube-Music.

Screenshot

Usage

  • Run the program by using jakym command jakym or alternatively call it as a python module python -m jakym
  • This will open up the jakym command window.
  • Type spotify to play music using spotify playlist
  • Type youtube to play music using youtube playlist
  • Enter a songname in command window to search for song or just enter its youtube link to play directly from a link.
  • Jakym will queue the song once you type it and allow you to add the next song.
  • Type shuffle to shuffle your queue
  • The queue operates independent of the command window and plays the song on a separate thread.
  • To exit the command window and hence the application simply type exit.

Installation

To Update jakym simply run pip install --upgrade jakym

Installing ffmpeg

ffmpeg is required for this program to work correctly. Install ffmpeg by following these steps :-

Installing simpleaudio

simpleaudio is an optional pydub dependency, however as it is essential for proper working of jakym. Not installing simpleaudio gives major issues on both Linux and Windows.

On Linux

  • Install Dependencies by sudo apt-get install -y python3-dev libasound2-dev
  • Install with: pip install simpleaudio

On Windows

  • Download the .whl file of simpleaudio from here
  • Once downloaded, it can be installed using the following command : pip install package_name.whl

Installing jakym

  • Install by using pypi :-pip install jakym

  • Run using jakym command jakym or call it as a python module python -m jakym

Violla jakym is now installed!

Enjoy jakym

How It Works

  • The program starts and runs two threads, one to input music into the playlist and the other to iterate over the playlist and download the corresponding music and play it.
  • The youtube-dl library does most of the heavy lifting of both parsing links and downloading them into a suitable file format.
  • The pydub and simpleaudio libraries provide cross-platform audio playback without any issues but setting up simpleaudio on windows and Linux take a different approach.
  • The program runs until user specifically types exit.

Version history

Version Improvements
0.3.1 Bug fixes and Shuffle
0.3 Added Youtube Playlist support, Improved Readme
0.2 Added Spotify playlist support, Bug fixes
0.1.1 Improved documentation, Command line integration
0.1 Initial release

Copyright

Copyright (c) 2021 Mayank Jha

License - GNU GPL v3

Comments
  • How to properly exit?

    How to properly exit?

    I currently using ctrl-c to exit the application. I have to press it twice for some reason (maybe something to do with the threads). Is there a better way to exit?

    question 
    opened by lodenrogue 5
  • Simple and very useful!

    Simple and very useful!

    I was having some problems with spotify, and I was about to search for replacement players that doesn't require premium account, this program is perfect, I can play youtube songs and spotify songs! and through the command line!

    • I would suggest adding the ability to play a playlist with a single command, without the need to run the program then type spotify then type the playlist link, this will be very useful
    • adding skipping songs and looping playlist.

    if you accept PR I would be happy to try to contribute!

    enhancement 
    opened by mohad12211 3
  • errors with the playlist feauture

    errors with the playlist feauture

    Hi I have installed JAKYM with yay from AUR on a arch64 machine. While trying to play a playlist this happens: jakym -y https://www.youtube.com/playlist?list=PLz4zPQvMRasSJ6c6HXjm3qRSs2shSlqHg - by Lex Pinging Youtube Processing Song: 1/5 Traceback (most recent call last): File "/home/jirido/.local/bin/jakym", line 8, in sys.exit(main()) File "/home/jirido/.local/lib/python3.9/site-packages/jakym/main.py", line 190, in main playyoutube(args.y) File "/home/jirido/.local/lib/python3.9/site-packages/jakym/main.py", line 25, in playyoutube tempytplaylist,beg=downloader.ytplaylistparser(link,beg) File "/home/jirido/.local/lib/python3.9/site-packages/jakym/downloader.py", line 56, in ytplaylistparser for song in meta['entries']: UnboundLocalError: local variable 'meta' referenced before assignment

    If I try from within almost the same happens. ––––––––––––––––––––––––––––––––––––– - by Lex youtube Enter Playlist: https://www.youtube.com/playlist?list=PLz4zPQvMRasSJ6c6HXjm3qRSs2shSlqHg Pinging Youtube Processing Song: 1/5 Exception in thread Thread-2: Traceback (most recent call last): File "/usr/lib/python3.9/threading.py", line 973, in _bootstrap_inner self.run() File "/usr/lib/python3.9/threading.py", line 910, in run self._target(*self._args, **self._kwargs) File "/home/jirido/.local/lib/python3.9/site-packages/jakym/main.py", line 136, in queue playyoutube(ytplaylist) File "/home/jirido/.local/lib/python3.9/site-packages/jakym/main.py", line 25, in playyoutube tempytplaylist,beg=downloader.ytplaylistparser(link,beg) File "/home/jirido/.local/lib/python3.9/site-packages/jakym/downloader.py", line 56, in ytplaylistparser for song in meta['entries']: UnboundLocalError: local variable 'meta' referenced before assignment File "/usr/lib/python3.9/threading.py", line 910, in run self._target(*self._args, **self._kwargs) File "/home/jirido/.local/lib/python3.9/site-packages/jakym/main.py", line 136, in queue playyoutube(ytplaylist) File "/home/jirido/.local/lib/python3.9/site-packages/jakym/main.py", line 25, in playyoutube tempytplaylist,beg=downloader.ytplaylistparser(link,beg) File "/home/jirido/.local/lib/python3.9/site-packages/jakym/downloader.py", line 56, in ytplaylistparser for song in meta['entries']: UnboundLocalError: local variable 'meta' referenced before assignment

    Something strange also happens when trying to find a song. $ jakym bumblebee Downloading bumblebee song WARNING: Unable to download webpage: HTTP Error 429: Too Many Requests

    then it succeeds.

    If i try to play one song it works but maybe related to the playlist problem it also tells me: - by Lex https://www.youtube.com/watch?v=TJ8ws2dqqFg Downloading https://www.youtube.com/watch?v=TJ8ws2dqqFg song WARNING: Unable to download webpage: HTTP Error 429: Too Many Requests

    And if I search for a song - by Lex hooker Downloading hooker song WARNING: Unable to download webpage: HTTP Error 429: Too Many Requests ERROR: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. Error downloading hooker song

    but then it manages anyway.. Done Downloading Currently Playing : Lex and jack (music video Do I do something wrong or am I missing some dependency?

    opened by Jirido 2
  • "the command 'pip' is not found... " in ubuntu 20.04

    When I type pip install simpleaudio or pip --version "the command 'pip' is not found... " Maybe why I never run python 2. Could you cover it in readme for new users that have this problem? Any workaround would be good too. Thank you for the create this!

    question 
    opened by developer-sp 1
  • make downloads an actual Temp directory

    make downloads an actual Temp directory

    currently downloads is created wherever the program is called from, this leads to sometimes issues like no proper cleanup in case of exception and also proves to be difficult to manage.

    opened by themayankjha 0
  • Control via MQTT

    Control via MQTT

    Hey, I've been using JAKYM to play music around the farm via a USB FM transmitter.

    To make it convenient to control from a phone, I threw together a simple Python wrapper to control it with a MQTT dashboard instead of having to SSH into the server.

    https://github.com/evranch/jakym_mqtt

    Wondering if you'd be interested in MQTT functionality in the main program, if so I could probably add it fairly easily and send you a PR.

    opened by evranch 2
  • [suggestion] change the volume and output device

    [suggestion] change the volume and output device

    (I'm not sure but I think these features improve QOL :D)

    Volume

    Adjust the music's volume. (not per session maybe put it in config file)

    Output Device Changer

    Some users might have more than 1 output device (or virtual devices) it'll be great to be able to change output device.

    opened by Monmcgt 1
Releases(0.4.1)
  • 0.4.1(Jun 28, 2022)

    Changelog:

    • Switched backend to yt-dlp to fix #16 as youtube-dl had slow downloads

    update using pip install --upgrade jakym

    check README for more.

    Thank you for using JAKYM :)

    Source code(tar.gz)
    Source code(zip)
  • 0.4.0(Jul 1, 2021)

    Changelog:

    • Playback controls #9
    • Bug Fixes

    Jakym now has playback controls!

    • Use play , pause, next, back to control the playback.
    • Use repeat all, repeat song and repeat offto control song repetition.
    • Use seek with an integer like 10 or -10 to control the current song.

    update using pip install --upgrade jakym

    check README for more.

    Thank you for using JAKYM :)

    Source code(tar.gz)
    Source code(zip)
  • v0.3.3(Jun 21, 2021)

    Changelog:

    • Better temporary file management #12
    • Playlist management support #2

    two new options save and load allow for saving and loading playlists. jakym -l command line argument.

    update using pip install --upgrade jakym

    check README for more.

    Thank you for using JAKYM :)

    Source code(tar.gz)
    Source code(zip)
TwitchAccountMaker - Twitch Account Maker with python

Twitch Account Creator A Twitch Account Creator, Requires Capmonster.cloud Verif

vanis / 1800 0 Jan 20, 2022
Super simple anti-spam Discord bot

AutoAntiRaidBot Super simple anti-spam Discord bot. Will automatically kick any member with an account made under 1 day ago, and will ban any member w

Kainoa Kanter 6 Jun 27, 2022
Discord bot to administer IITD Study Servers (unofficial)

IITD-Bot Discord bot to administer IITD'20 Acad Server Commands hello to check if bot is online ?help to display this message ?set kerberos to set y

Aditya Singh 47 Dec 19, 2022
Python 3 tools for interacting with Notion API

NotionDB Python 3 tools for interacting with Notion API: API client Relational database wrapper Installation pip install notiondb API client from noti

Viet Hoang 14 Nov 24, 2022
Just another Shiny and Greninja-ash killing preventor for Myuu

Myuu-Anti-Shiny-Discord-Bot Why I made it? Since, I was legit fed up of NebbyBot's lag (not criticising it), I decided to make my own but in python an

5 Nov 12, 2022
Lambda-function - Python codes that allow notification of changes made to some services using the AWS Lambda Function

AWS Lambda Function This repository contains python codes that allow notificatio

Elif Apaydın 3 Feb 11, 2022
Kanata Bot - a modular bot running on python3 with anime theme and have a lot features

Kanata Bot Kanata Bot is a modular bot running on python3 with anime theme and have a lot features. Easiest Way To Deploy On Heroku This Bot is Create

Rikka-Chan 2 Jan 16, 2022
A calculator telegram bot.

Calculator-Bot A calculator telegram bot. Made with Python3 (C) @FayasNoushad Copyright permission under MIT License License - https://github.com/Fay

Fayas Noushad 33 Nov 30, 2022
A code that can make an account bump your discord server 24/7!

BumpCord A code that can make an account bump your discord server 24/7! The main.py is the main file. keep_alive.py prevents your repl from going to s

Phantom 28 Aug 20, 2022
Written in Python, freezed into stand-alone executable with PyInstaller. This app will make sure you stay in New World without getting kicked for inactivity.

New World - AFK Written in Python, freezed into stand-alone executable with PyInstaller. This app will make sure you stay in New World without getting

Rodney 5 Oct 31, 2021
Código para trabalho com o dataset Wine em Python

Um perceptron multicamadas (MLP) é uma rede neural artificial feedforward que gera um conjunto de saídas a partir de um conjunto de entradas. Um MLP é

Hemili Beatriz 1 Jan 08, 2022
TypeRig is a Python library aimed at simplifying the current FontLab API

TypeRig TypeRig is a Python library aimed at simplifying the current FontLab API while offering some additional functionality that is heavily biased t

Vassil Kateliev 41 Nov 02, 2022
ANKIT-OS/STYLISH-TEXT is a special repository. Its Is A Telegram Bot Which Can Translate Your Text Into 100+ Language

🔥 ᴳᴼᴼᴳᴸᴱ⁻ᵀᴿᴬᴺᔆᴸᴬᵀᴱᴿ 🔥 The owner would not be responsible for any kind of bans due to the bot. • ⚡ INSTALLING ⚡ • • 🛠️ Lᴀɴɢᴜᴀɢᴇs Aɴᴅ Tᴏᴏʟs 🔰 • If

ANKIT KUMAR 1 Dec 23, 2021
Clubhouse API written in Python. Standalone client included. For reference and education purposes only.

clubhouse-py is originally developed for the sake of interoperability. Standalone client is also created with very basic features, including but not limited to the audio-chat

1.7k Jan 05, 2023
Anchor Protocol Script that can save you from being liquidated!

Why My day job requires a fairly good amount of automation from time to time. Besides, I do like computers to work on what I cannot while I'm sleeping

126 Oct 16, 2022
A powerfull SMS Bomber for Bangladesh . NO limite .Unlimited SMS Spaming

RedBomberBD A powerfull SMS Bomber for Bangladesh . NO limite .Unlimited SMS Spaming Installation Install my-tool on termux by using thoes commands pk

Abdullah Al Redwan 3 Feb 16, 2022
Python Client for MLflow Tracking Server

Python Client for MLflow Python client for MLflow REST API. Features: Unlike MLflow Tracking client all REST API methods are exposed to user. All clas

MTS 35 Dec 23, 2022
Python wrapper for eBay API

python-ebay - Python Wrapper for eBay API This project intends to create a simple python wrapper around eBay APIs. Development and Download Sites The

Roopesh 99 Nov 16, 2022
A python discord client interaction emulator for the DC29 badge code channel

dc29-discord-signalbot A python discord client interaction emulator for the DC29 badge code channel Prep Open Developer mode Open the developer mode f

8 Aug 23, 2021
A suite of utilities for AWS Lambda Functions that makes tracing with AWS X-Ray, structured logging and creating custom metrics asynchronously easier

A suite of utilities for AWS Lambda Functions that makes tracing with AWS X-Ray, structured logging and creating custom metrics asynchronously easier

Amazon Web Services - Labs 1.9k Jan 07, 2023