csgoMP - a Linux compatible music player / soundboard for cs:go
Download version 0.1.2 (2019-11-12)
Download version 0.1.1 (2019-10-09)
- Added option to set starting position when searching youtube with +
Older versions at the bottom of page
- Updated detection of ffmpeg version
csgoMP (Music Player) is a python program which lets you load up a few audio files and will convert them to the correct format to be played over the csgo comms system. You can then play music or sound effects to your friends in game. It is similar to the HLDJ and SLAM programs for Windows (but more limited in functionality at the moment). When you highlight a file on the list it will be converted and copied to your Counter-Strike Global Offensive directory. When you hold down the assigned key in game it will play the sound / music over comms to your teammates. Sound files can be added from the local file system or from youtube and other video streaming sites that are supported by youtube-dl. It is written for Linux but could probably be easily modified to work on Mac OS X. csgoMP doesn't modify game files in any way or run any code in the background, it just converts the files and creates the configuration file. The source engine does all the actual music playing.
- Python 3
- PyGObject (tested with 3.34) - python3-gobject package?
- python-xlib (tested with 0.25) - python3-xlib package?
- ffmpeg (tested with 4.2.1)
- youtube-dl latest for adding songs from youtube
- Extract the archive and run csgomp.py
$ tar zxvf csgoMP-0.1.2.tar.gz
$ cd csgoMP-0.1.2
To search full songs from the command line (or your run shortcut)
$ csgomp.py mission impossible theme
$ csgomp.py bee gees stayin alive
$ csgomp.py mario death sound
To search from command line with a starting position just add a time prefixed with +
$ csgomp.py mission impossible theme +0:07 # 7 seconds in
$ csgomp.py sound of silence +20 # 20 seconds in (It's a bit sad that Disturbed comes up as the first hit, but it's a nice cover)
$ csgomp.py ez for ence +1:22 # 1 minute 22 seconds in
If you add a link to the csgomp.py script to your path it will be easier to run from your run shortcut.
When upgrading from a previous version you may have to delete your config.ini file.
Check the preferences. If your steam library is at ~/.local/share/Steam/SteamApps and ffmpeg is /usr/bin/ffmpeg then it should work OK already.
Add some audio files (video files with audio tracks should work too)
Click "Write csgo cfg" to save the required config file to your csgo directory
In game, bring up the console and run "exec csgomp" without the quotes. This will set up the keybinding, currently ' (single quote), and some aliases that are needed to play the audio files. It will also set up the / (forward slash) keybinding for toggling continuous playback.
On the main window of csgoMP, select the music file you want to hear in game and it will be converted and made ready for use (usually takes 2-3 seconds for a 3 minute mp3)
Connect to a server or start a game with bots, hold down your ' button (or press /) and you should hear your chosen audio file (so will anyone else on the server)
Only one audio file can be active at any one time. If you want to change the current audio file just go back to the csgoMP main window and select it. When using continuous playback you will have to press / again to toggle it off when the end of the song is reached otherwise you will continue to transmit silence. Even if the round ends you will still need to press the toggle off button again otherwise you will be transmitting the music file every time you try to use normal voice comms.
Any filetype which has an audio track and is supported by your installation of ffmpeg should work. That includes video files as well as audio files. If you open a video file then the audio track will (hopefully) be extracted.
My mic doesn't work anymore
If music is getting played every time you try to use your mic then you either forgot to toggle music playback off again when the file finished playing, or the game didn't register that you let go of the push to play button for some reason. Just press the toggle button again or the push to play button again and it will reset back to normal mic input for comms.
If you want to report any bugs, suggest new features, or just need help getting it running then send an email to firstname.lastname@example.org.
This initial release is missing a few features. Some things that will be added in the future
- Cleanup code/UI
- Add option to choose in game keybindings (at the moment hardcoded as ' and / for playing and keypad numbers for switching tracks)
- Add support for OS X
- Add support for other games. It should work with TF2, Insurgency and some other source games
- Add options to assign audio tracks an alias so you can switch song from the in game console. Watch a cfg file for current track request?
- Search youtube from csgo console and download first hit
csgoMP is free but donations are always welcome :)
|Donate using PayPal
Trade offer link
Download version 0.1.0 (2019-10-02)
Download version 0.0.9 (2019-03-04)
- Updated to use Python 3.
- Option to lower volume on YouTube files
- Fix bug where duplicates would be added to the list
- Check version of ffmpeg to determine options required
Download version 0.0.8 (2018-11-10)
- You can now search for a song by passing it as a command line option. Put a link to csgomp.py somewhere in your path and you can run (for example) "csgomp.py mission impossible theme" to search youtube for the mission impossible theme and set it as the active song by using your run shortcut/hotkey. Notifications will let you know when the song is ready to play or if there was a problem. csgoMP must have already been set up before using command line search so that it knows where to find youtube-dl and where your csgo directory is.
Download version 0.0.7
- Added option to remove files from the list by right clicking them.
- Added some warnings for missing settings and command failures.
Download version 0.0.6
- Added start of hotkey support for changing tracks. This requires the python-xlib module.
- At the moment the hotkeys are just hardcoded as keypad 0 - 9 corresponding to the first 10 tracks on the list. Sorry if you are using your numpad for something else already. Warning: don't change the track while you are already playing another track, it might crash csgo.
Download version 0.0.5
- Added scrollbars to the audio file list
- Try to restore the window size on startup
Download version 0.0.4
- Fixed bug when adding a local file without setting a start and end position
Download version 0.0.3
- Fixed downloading music from youtube bug
- Added options to set aliases for the music files
- Added option when adding a local file to set start position and duration to cut a selection from music files
Download version 0.0.2
- Fixed conversion of mp3 files with images in metadata
- Added functions to cache converted music files instead of encoding everytime
- Added download from youtube option
Initial release 0.0.1
- Added bind to toggle continuous playback so you don't have to hold the push to play button