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)
My homeserver setup. Everything managed securely using Portainer.

homeserver-traefik-portainer Features: access all services with free TLS from letsencrypt using your own domain running a side project is super simple

Tomasz Wójcik 44 Jan 03, 2023
"zpool iostats" for humans; find the slow parts of your ZFS pool

Getting the gist of zfs statistics vpool-demo.mp4 The ZFS command "zpool iostat" provides a histogram listing of how often it takes to do things in pa

Chad 57 Oct 24, 2022
Luna Rush Auto Clicker Bot

Luna Rush Auto Clicker Bot Se o aplicativo lhe ajudar de alguma forma, uma doação para ajudar a pagar a conta de luz sempre é bem vinda ;) Wallet Smar

Walter Discher Cechinel 29 Dec 20, 2022
PepeSniper is an open-source Discord Nitro auto claimer/redeemer made in python.

PepeSniper is an open-source Discord Nitro auto claimer made in python. It sure as hell is not the fastest sniper out there but it gets the job done in a timely and stable manner. It also supports ho

Unknown User 1 Dec 22, 2021
Twitch Linux Typer

Twitch Linux Typer The most cursed Twitch chat bot Listens to twitch chat, and then types it handles hotkeys and button presses via the ^ char, eg ctr

Robin Universe 4 Jun 27, 2022
A discord bot to assist you when playing phasmophobia.

phasbot A discord bot to assist you when playing phasmophobia. Add phasbot to your server here! Bot Commands ?help - shows commands ?info [ghost name]

1 Dec 22, 2021
A basic Ubisoft API wrapper created in python.

UbisoftAPI A basic Ubisoft API wrapper created in python. I will be updating this with more endpoints as time goes on. Please note that this is my fir

Ethan 2 Oct 31, 2021
This is a simple program that uses Python and pyTwitchAPI to retrieve the list of users in a streamer's chat and then checks each one of these users to see if they follow the broadcaster or not

This is a simple program that uses Python and pyTwitchAPI to retrieve the list of users in a streamer's chat and then checks each one of these users to see if they follow the broadcaster or not

RwinShow 57 Dec 18, 2022
This bot is created by AJTimePyro and It accepts direct downloading url & then return file as telegram file.

URL Uploader Bot This is the source code of URL Uploader Bot. And the developer of this bot is AJTimePyro, His Telegram Channel & Group. You can use t

Abhijeet 23 Nov 13, 2022
Pure Python implementation of the Windows API method IDvdInfo2::GetDiscID.

pydvdid-m Pure Python implementation of the Windows API method IDvdInfo2::GetDiscID. This is a modification of sjwood's pydvdid. The Windows API metho

4 Nov 22, 2022
GitHub action to deploy serverless functions to YandexCloud

YandexCloud serverless function deploy action Deploy new serverless function version (including function creation if it does not exist). Inputs yc_acc

Много Лосося 4 Apr 10, 2022
Cord Python API Client

Cord Python API Client The data programming platform for AI 💻 Features Minimal low-level Python client that allows you to interact with Cord's API Su

Cord 52 Nov 25, 2022
A Telegram UserBot to Play Radio in Voice Chats. This is also the source code of the userbot which is being used for playing Radio in @AsmSafone Channel.

Telegram Radio Player UserBot A Telegram UserBot to Play Radio in Channel or Group Voice Chats. This is also the source code of the userbot which is b

SAF ONE 44 Nov 12, 2022
This is a music bot for discord written in python

this is a music bot for discord written in python, it is designed for educational use ONLY, I do not take any responsibility for uses outside of educational use

5 Dec 24, 2021
A simple Python API wrapper for Cloudflare Stream's API.

python-cloudflare-stream A basic Python API wrapper for working with Cloudflare Stream. Arbington.com started off using Cloudflare Stream. We used the

Arbington 3 Sep 08, 2022
Telegram bot to download almost all from Instagram

Instagram Manager Bot The most advanced Instagram Downloader Bot. Please fork this repository don't import code Made with Python3 (C) @subinps Copyrig

SUBIN 300 Dec 30, 2022
Compulsory join Telegram Bot

mussjoin About Compulsory join Telegram Bot this Telegram Bot Application can be added users to Telegram Channel or Group compulsorily. in addition wh

Hamed Mohammadvand 4 Dec 03, 2021
This tool helps users selecting items from the Gwennen gambling trade (based on prices of the uniques).

Gwennen Gambler This small program will check each item in the Gwennen shop (item gamble) according and show small stats according to poe.ninja. Shoul

9 Apr 10, 2022
❝𝐓𝐡𝐞 𝐌𝐨𝐬𝐭 𝐏𝐨𝐰𝐞𝐫𝐟𝐮𝐥𝐥 𝐆𝐫𝐨𝐮𝐩 𝐌𝐚𝐧𝐚𝐠𝐞𝐦𝐞𝐧𝐭 𝐁𝐨𝐭❞

❝𝐓𝐡𝐞 𝐌𝐨𝐬𝐭 𝐏𝐨𝐰𝐞𝐫𝐟𝐮𝐥𝐥 𝐆𝐫𝐨𝐮𝐩 𝐌𝐚𝐧𝐚𝐠𝐞𝐦𝐞𝐧𝐭 𝐁𝐨𝐭❞

Abdisamad Omar Mohamed 5 Jun 24, 2022
Roblox-Account-Gen - A simple account generator not using paid solving services

Roblox Account Generator Star this if it helped to spread awareness! No 2captcha

x 1 Feb 17, 2022