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 mass creator for Discord's new channel threads.

discord-thread-flooder A mass creator for Discord's new channel threads. (obv created by https://github.com/imvast) Warning: this may lag ur pc if u h

Vast 6 Nov 04, 2022
A Simple Telegram Bot By @AsmSafone to Download Files From Mega.nz and Upload It to Telegram

MegaDL-Bot A Simple Telegram Bot By @AsmSafone to Download Files From Mega.nz and Upload It to Telegram Features No Login Required All Mega.nz File Li

SAF ONE 92 Dec 02, 2022
Event-driven-model-serving - Unified API of Apache Kafka and Google PubSub

event-driven-model-serving Unified API of Apache Kafka and Google PubSub 1. Proj

Danny Toeun Kim 4 Sep 23, 2022
A simple telegram bot to help you to remove forward tag from post from any messages . Maded in python3 using @Pyrogram . Developed by @Kunal-Diwan

Frwd-Tag-Remover Telegram Bot to Remove forward tag from any Post . If you need any more modes in repo or If you find out any bugs, mention in @Develo

Kunal Diwan 2 Oct 14, 2022
Plugin for Sentry which allows sending notification via Telegram messenger.

Sentry Telegram Plugin for Sentry which allows sending notification via Telegram messenger. Presented plugin tested with Sentry from 8.9 to 9.1.1. DIS

Shmele 208 Dec 30, 2022
An analysis of the efficiency of the COVID-19 vaccine

VaccineEfficiency 💉 An analysis of the efficiency of the COVID-19 vaccine 3 Methods 1️⃣ Compare country's vaccination data to number of day- to-day c

Stephanie Younes 1 Dec 10, 2021
A bot for the [email protected] Discord server.

KittyBot - a sentient Discord bot! Key Notes An open-source, community-powered bot for the [email 

Ollie 11 Dec 06, 2022
Coronavirus whatsapp chatbot to give real time info on covid

Covy Developed a coronavirus whatsapp chatbot which gives case counts in a particular district, city, state or country. It also predicts future cases

Devinco (Rachit) 0 Oct 03, 2021
Python Script to download hundreds of images from 'Google Images'. It is a ready-to-run code!

Google Images Download Python Script for 'searching' and 'downloading' hundreds of Google images to the local hard disk! Documentation Documentation H

Hardik Vasa 8.2k Jan 05, 2023
SmsSender v3.0.0 - the script is designed to send free SMS to any number and with any text.

SmsSender v3.0.0 - скрипт предназначен для бесплатной отправки SMS на любой номер и с любым текстом. Возможны небольшие баги, в скором времени исправл

Андрей Сергеев 20 Dec 03, 2021
Infinity: a Twitter retweet bot that can be used by anyone

INSTAMATE Requires Firefox Instapy Python3 How To Use? Fork the repository Add your credentials in the bot.py file Save commits Clone your fork cd int

unofficialdxnny 3 Jun 23, 2022
A site devoted to celebrating to matching books with readers and readers with books. Inspired by the Readers' Advisory process in library science, Literati, and Stitch Fix.

Welcome to Readers' Advisory Greetings, fellow book enthusiasts! Visit Readers' Advisory! Menu Technologies Key Features Database Schema Front End Rou

jane martin 6 Dec 12, 2021
Discord.py-Bot-Template - Discord Bot Template with Python 3.x

Discord Bot Template with Python 3.x This is a template for creating a custom Di

Keagan Landfried 3 Jul 17, 2022
Repository to access information of stocks in Bombay Stock Exchange.

BSE Repository to access information of stocks in Bombay Stock Exchange. The code in this repository uses BSE API and conclusions made using the code

1 Nov 13, 2021
Whatsapp-bot - Whatsapp chatbot build with python and twilio

Whatsapp-bot This is a Whatsapp Chatbot that responds with quotes, reply owners

arinzejustinng 1 Jan 14, 2022
Web3 Ethereum DeFi toolkit for smart contracts, Uniswap and PancakeSwap trades, Ethereum JSON-RPC utilities, wallets and automated test suites.

Web3 Ethereum Defi This project contains common Ethereum smart contracts and utilities, for trading, wallets,automated test suites and backend integra

Trading Strategy 222 Jan 04, 2023
Pls give vaccine.

Pls Give Vaccine A script to spam yourself with vaccine notifications. Explore the docs » View Demo · Report Bug · Request Feature Table of Contents A

Rohan Mukherjee 3 Oct 27, 2021
A discord bot with information and template tracking for pxls.space.

pyCharity A discord bot with information and template tracking for pxls.space. Inspired by Mikarific's Charity bot. Try out the beta version on your s

1 Dec 03, 2021
Develop and deploy applications with the Ionburst Cloud Python SDK.

Ionburst SDK for Python The Ionburst SDK for Python enables developers to easily integrate with Ionburst Cloud, building in ultra-secure and private o

Ionburst Cloud 3 Mar 06, 2022
This Code is Property of Rehyann Saini. Feel Free to use this Project.

Email-Spammer Rehyann Saini in Collabration With Fe13 Productions This is an easy to use Dev Friendly Email spammer... #Important Things to know..! St

Rehyann Saini 1 Jan 14, 2022