Output YouTube Music Destkop App track information for consumption in OBS.
Open Broadcaster Software (OBS) streaming helper for YouTube Music Desktop.
Listens to the Playback interface of YTMD and outputs formatted track information and album art files which can be consumed by OBS.
Handy for streaming currently played song from YTMD and doesn’t require configuration unless you want to customize the output.
Before using the script, you should make sure the YTMD remote control API is enabled. See the official docs for more details (Settings -> Integrations -> Remote Control). Also, make sure your firewall is configured properly by allowing access to Node.js and YTMD if they ask for it (this will vary based on the OS but most likely it will happen).
If you have prior Node.js experience, this should be no problem. If you don’t, I tried to make things as easy as possible :
install.bat file (Windows) or install.sh file (Linux / macOS). You should be able to do that by double-clicking it.ytmd_output.bat file (Windows) or ytmd_output.sh file (Linux / macOS). You should be able to do that by double-clicking it.Steps 1 - 4 only have to be done once. After that, simply execute the relevant ytmd_output file and let it run while YTMD and your streaming application are open.
To add the current track info, add a new Text (GDI+) source. Check the “Read from file” box and choose the “Current_Track.txt” file generated by this program.
To add the album art, add a new Image source and select the Current_Album_Art.png file generated by this program.
Open the config.json file in a text editor in order to change settings. Here are all the available settings.
Note: You can also look at the config.schema.json which contains the JSON schema for config.json. The config.json file will be validated against the schema before the script starts and any errors will be listed.
albumArtFilePathThe file path where to write the text file containing the album art.
You can specify an absolute path in order to write it to a folder different from the script’s location.
Note: An additional file corresponding to this filename followed by “.tmp” will also be written to the folder. This is required in order to resize the image.
Default: Current_Album_Art.png
albumArtHeightThe height of the album art to output in pixels.
Default: 500
Note: When the track played is a YouTube video, the cover art won’t be square, but it will be resized to fit within the maximum given width and height.
albumArtWidthThe width of the album art to output in pixels.
Default: 500
Note: When the track played is a YouTube video, the cover art won’t be square, but it will be resized to fit within the maximum given width and height.
outputPatternThe pattern to use when writing the current track information. You can both use symbols that will be replaced by the track information and plain text that will be left as-is. Example: Track: %title% by %author% would output Track: Never Gonna Give You Up by Rick Astley.
You can also provide an array of strings, in which case each pattern will be written in a different file (you would then need to provide an array of filenames in the trackFilePath option). Example: ["File 1: %author%", "File 2: %title% (%album%)"]
Valid symbols : %title%, %author%, %album%. Use \n to insert a line break.
Default: %author%\n%title%\n%album%
Note: When the track played is a YouTube video, the album will be empty.
pollIntervalMsThe interval between each request the script will make to the YTMD Remote API in milliseconds.
Default: 1000
trackFilePathThe file path where to write the text file containing the track information.
You can specify an absolute path in order to write it to a folder different from the script’s location.
Example: ["track1.txt", "track2.txt"]
Default: Current_Track.txt
ytmdRemoteUrlFull URL to the YTMD Remote API.
Default: http://localhost:9863/query
Special thanks to YTMD for the awesome application and easy to use API!
For Google Play Music Desktop Player: https://github.com/Notuom/gpmdp-output