Package: jakym
Just Another Konsole YouTube-MusicOverviewMy motivation for creating JAKYM came from my wish to create an application, that I could use to play music comfortably from the command line. I often play games and listen to music simultaneously, but using either Spotify or playing music in a browser takes a lot of resources from both my CPU and RAM.I spent a lot of time looking through numerous CLI based music players, but they either require setting up a bunch of things, or required premium features to function; sometimes they didn't work at all, even after tinkering for hours.Hence, instead of tearing my eyes out looking for a solution, I thought that I could code it myself.So I present to you JAKYM, or "Just Another Konsole YouTube-Music": a command-line Youtube music player, written in Python with both Spotify and Youtube playlist support, easy on both memory and CPU resources.UsageUsing Command Line OptionsRun it by using jakym commandjakym.You can also specify arguments to easily play a playlist or song. The available options can be seen viajakym -hUsejakym -s "link"orjakym -y "link"to instanly start up by queuing a playlist without having to use the command window.You can also usejakym -p "song 1" "song 2" "song 3"to queue up multiple songs.To instantly queue a saved jakym playlist runjakym -l playlistpath playlistname.This will launch into jakym command window.Using Jakym Command WindowThe program opens up into the jakym command window.Usecommandsto view all available commands.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.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 typeexit.CommandsTypespotifyto play music using spotify playlistTypeyoutubeto play music using youtube playlistUsermto remove the last queued song from the playlist.Typeshuffleto shuffle your queue.Useloadto load a playlist andsaveto save your playlist. Include the trailing slash in path i.e. specify path asC:\Users\Lex\Music\or/home/lex/Projects/jakym/.Useplay,pause,next,backto control the playback.Userepeat all,repeat songandrepeat offto control song repetition.Useseekwith an integer like 10 or -10 to control the current song.InstallationFor Arch Linux users, jakym is available in the AUR. Simply use your favourate helper to get it.To Update jakym simply runpip install --upgrade jakymInstalling ffmpegffmpeg is required for this program to work correctly. Install ffmpeg by following these steps:On Linux -https://www.tecmint.com/install-ffmpeg-in-linux/On Windows -https://www.wikihow.com/Install-FFmpeg-on-WindowsInstalling simpleaudiosimpleaudio is an optional pydub dependency, however it is essential for proper working of jakym as the playback depends on simpleaudio.On LinuxInstall Dependencies bysudo apt-get install -y python3-dev libasound2-devInstall with:pip install simpleaudioOn WindowsDownload the .whl file of simpleaudio fromhereOnce downloaded, it can be installed using the following command :pip install package_name.whlInstalling jakymInstall by using pypi :-pip install jakymRun using jakym commandjakymViolla jakym is now installed!Enjoy jakymHow It WorksThe program starts and runs two threads, one to input music into the playlist and the other to iterate over the playlist, download the corresponding music and play it.The yt-dlp 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 types exit.Version historyVersionImprovements0.4.1Switched Backend From youtube-dl to yt-dlp for faster downloads0.4.0Playback controls, Bug fixes0.3.3Better temporary file management, Playlist management support0.3.2Fixed heavy CPU usage while Idling, Added command line arguments, Fixed colour issues on Windows0.3.1Bug fixes and Shuffle0.3Added Youtube Playlist support, Improved Readme0.2Added Spotify playlist support, Bug fixes0.1.1Improved documentation, Command line integration0.1Initial releaseCopyrightCopyright (c) 2021Mayank JhaLicense -GNU GPL v3