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)
A telegram user and chat info extractor with pyrogram python module

Made with Python3 (C) @FayasNoushad Copyright permission under MIT License License - https://github.com/FayasNoushad/Telegram-Info/blob/main/LICENSE

Fayas Noushad 8 Dec 22, 2021
Utilizing the freqtrade high-frequency cryptocurrency trading framework to build and optimize trading strategies. The bot runs nonstop on a Rasberry Pi.

Freqtrade Strategy Repository Please test all scripts and dry run them before using them in live mode Contact me on discord if you have any questions!

Michael Fourie 90 Jan 01, 2023
This is a Python package to create a snowflake identifier similar to Discord's or Twitter's.

snowflake2 Based on falcondai and fenhl's Python snowflake tool, but with documentation and simliarities to Discord. Installation instructions Install

Learnloot 2 Mar 19, 2022
an OSU! bot sdk based on IRC

osu-bot-sdk an OSU! bot sdk based on IRC Start! The following is an example of event triggering import osu_irc_sdk from osu_irc_sdk import models bot

chinosk 2 Dec 16, 2021
Library to manage your own custom RPC on your desktop

Info I don't recommend novices setting this up yourself. It requires Redis, a server to host the API on, and a bit of understanding of Windows & Pytho

Isaac K 1 Apr 16, 2022
A quick-and-dirty script to scrape the daily menu of Leipzig University Mensa and send it to a telegram channel.

Feed me Mensa UL A quick-and-dirty script to scrape the daily menu of Leipzig University Mensa and send it to a telegram channel. For food and cat lov

3 Apr 08, 2022
Throttle and debounce add-on for Pyrogram

pyrothrottle Throttle and debounce add-on for Pyrogram Quickstart implementation on decorators from pyrogram import Client, filters from pyrogram.type

7 Oct 01, 2022
Bot developed in python, 100% open-source, compatible with Windows and Linux.

Bombcrypto Bot [Family JOW] Bot desenvolvido em python, 100% do código é aberto, para aqueles que tenham conhecimento validarem que não existe nenhum

Renato Maia 71 Dec 20, 2022
A custom Discord Rich Presence to display when you're studying so you're stupid friends won't disturb you when you're studying.

Studying RPC Description A custom Discord Rich Presence to display when you're studying so you're stupid friends won't disturb you when you're studyin

John Edmerson Pizarra 4 Nov 19, 2022
This repository is used to provide data to zzhack,

This repository is used to provide data to zzhack, but you don't have to care about anything, just write your thinking down, and you can see your thinking is rendered in zzhack perfectly

5 Apr 29, 2022
A bot to view Garfield comics directly from Discord and get updates of the comics automatically

Garfield-Bot A bot to view Garfield comics directly from Discord and get updates of the comics automatically. Instructions to use the bot: Invite the

Raghav Sharma 3 Feb 13, 2022
Telegram bot to stream videos in telegram Voice Chat for both groups and channels

Telegram bot to stream videos in telegram Voice Chat for both groups and channels. Supports live steams, YouTube videos and telegram media. Supports scheduling streams, recording and many more.

Akki ThePro 2 Sep 11, 2022
Chatbot with python code!

Chatbot Python Chatbot with python! How to Run Installation requirements. pip install -r requirements.txt Sample Chatbot The required files must be d

Mohammad Dori 3 Jul 15, 2022
Discord py bot that plays magic the gathering.

Klunker Discord py bot that can play magic the gathering Bug Hunter Hello Bug Hunters. To help out with production of this bot, we need help catching

Aiden Castillo 0 Apr 25, 2022
A Telegram Message Manager Bot by @AbirHasan2005

Messages-Manager-Bot A Telegram Message Manager Bot by @AbirHasan2005. This Bot can delete specific type of messages from Group. I specially use for @

Abir Hasan 32 Nov 12, 2022
Access Undenied parses AWS AccessDenied CloudTrail events, explains the reasons for them, and offers actionable remediation steps. Open-sourced by Ermetic.

Access Undenied on AWS Access Undenied parses AWS AccessDenied CloudTrail events, explains the reasons for them, and offers actionable fixes. Access U

Ermetic 204 Jan 02, 2023
Python library for Spurwing API to schedule appointments, manage calendars and custom integrations.

Spurwing API Python Library Lightweight Python library for Spurwing's API. Spurwing's API makes it easy to add robust scheduling and booking to your a

Spurwing 1 Jul 14, 2021
Public release of Telepathy, an OSINT toolkit for investigating Telegram groups. Enhanced features and improvements will be added over time.

Telepathy Welcome to Telepathy, an OSINT toolkit for scraping Telegram data to help investigate shady goings on. Currently, the tool is limited to scr

Jordan Wildon 484 Jan 01, 2023
A Anything goes Discord bot written in python and uses the wrapper Discord.py

GerardTheWizard A Anything goes Discord bot written in python and uses the wrapper Discord.py What can he do? Allow users to level up through typing,

1 May 05, 2022
Automatically compile an AWS Service Control Policy that ONLY allows AWS services that are compliant with your preferred compliance frameworks.

aws-allowlister Automatically compile an AWS Service Control Policy that ONLY allows AWS services that are compliant with your preferred compliance fr

Salesforce 189 Dec 08, 2022