STEAM GROUP
Steam Music SteamMu
STEAM GROUP
Steam Music SteamMu
16,466
IN-GAME
66,414
ONLINE
Founded
January 30, 2014
FYI: Control Music Player via command line/script
I did a bit of research using strings and grep and found out how you can control the music player via command line. There are these commands:

steam://musicplayer/play steam://musicplayer/pause steam://musicplayer/toggleplaypause steam://musicplayer/playprevious steam://musicplayer/playnext steam://musicplayer/togglemute steam://musicplayer/increasevolume steam://musicplayer/decreasevolume steam://musicplayer/toggleplayingrepeatstatus steam://musicplayer/toggleplayingshuffled

E.g. just run this to toggle between play and pause:

steam steam://musicplayer/toggleplaypause

I guess on Windows it would need to be something like this (completely guessed):

"C:\Porgram Files\Steam\steam.exe" steam://musicplayer/toggleplaypause

I use this to assign global hotkeys to control Steam Music.

Also I found out that the current queue is saved as playlist under:
~/.local/share/Steam/music/_database/queue.m3u8
I tried to add a http:// URL to that playlist, but it didn't work.

And the database is stored as SQLite database under:
~/.local/share/Steam/music/_database/musicdatabase_0013.db

So one can use sqlite3[www.sqlite.org] or sqliteman[sqliteman.yarpen.cz] (download[sourceforge.net]) to manipulate the database.
< >
Showing 1-8 of 8 comments
Man, are you some kind of genius developer o something? D:
bloody.albatross Oct 12, 2014 @ 10:03pm 
No that was easy. I knew that you can run some commands with "steam steam://..." because that is what's in the .desktop files that run games under Linux. (E.g. "steam steam://rungameid/620" runs Portal 2.) So I started guessing. I tried several wrong guesses (e.g. "steam://music/play") but finally guessed correctly:

steam://musicplayer/play steam://musicplayer/pause steam://musicplayer/playprevious steam://musicplayer/playnext

But I wanted to have a "toggle play pause" that I can assign to my "toggle play pause" key on my keyboard, so I used the unix tool strings to extract everything that looks like a string from all steam binaries, loaded that in a text editor (gvim) and searched for "playprevious". There I saw next to it all the other commands (except for play and pause, but I already guessed them).

Everyone and their dog (except Microsoft) uses SQLite for storing databases in desktop and mobile applications, so I looked into the steam folder, saw the new music folder and in it that .db file. I opened it using sqliteman and it worked! SQLite is an awesome little open source "database in a file" library. Even Apple and Google use it. I also saw the queue.m3u8 in that folder.
I mean, you suggested 1000 things D: !! :O :MrFoster:
Last edited by Xnaker Eyes ⭐⭐⭐; Oct 12, 2014 @ 10:37pm
© Nov 2, 2014 @ 3:14pm 
Thanks

Eatitup_86 Nov 9, 2014 @ 9:49am 
Hi there Albatross,

I'm trying to whip up a script to allow Binding of Isaac: Rebirth players to use the default Binding of Isaac music.

Have you worked out how to skip to a specific track in a playlist?
Eatitup_86 Nov 12, 2014 @ 1:53pm 
Being able to play one song by itself would work as well. I tried quite a few variations of your above commands but had no luck getting it to play a specific song or track in a playlist.
bloody.albatross Nov 13, 2014 @ 2:24pm 
Originally posted by Eatitup:
Hi there Albatross,

I'm trying to whip up a script to allow Binding of Isaac: Rebirth players to use the default Binding of Isaac music.

Have you worked out how to skip to a specific track in a playlist?


I haven't worked that out, bout I found that string: steamtrack:///%s
Maybe it is somehow possible to play a track using a steamtrack:/// url?
ReBoot Nov 15, 2014 @ 4:07am 
Originally posted by bloody.albatross:
I guess on Windows it would need to be something like this (completely guessed):

"C:\Porgram Files\Steam\steam.exe" steam://musicplayer/toggleplaypause
Nope. Just
steam://musicplayer/toggleplaypause
is enough.
Great find, BTW!
< >
Showing 1-8 of 8 comments
Per page: 1530 50

Date Posted: Oct 12, 2014 @ 9:43pm
Posts: 8