Shared links
Open ytmd:// links for tracks, playlists, and channels
YTMDesktop2 registers the ytmd:// protocol so you can open YouTube Music content in the app from the browser address bar, chat, or the tray.
Install a release build (or register the protocol in development) so the OS hands ytmd:// URLs to YTMDesktop2.
From a music.youtube.com URL
Replace https:// with ytmd:// and press Enter:
| Browser URL | Open in app |
|---|---|
https://music.youtube.com/watch?v=VIDEO_ID | ytmd://music.youtube.com/watch?v=VIDEO_ID |
https://music.youtube.com/playlist?list=PLAYLIST_ID | ytmd://music.youtube.com/playlist?list=PLAYLIST_ID |
https://music.youtube.com/channel/UC… | ytmd://music.youtube.com/channel/UC… |
https://music.youtube.com/@Handle | ytmd://music.youtube.com/@Handle |
From youtube.com / youtu.be
Same trick — swap https:// → ytmd://:
| Browser URL | Open in app |
|---|---|
https://www.youtube.com/watch?v=VIDEO_ID | ytmd://www.youtube.com/watch?v=VIDEO_ID |
https://youtu.be/VIDEO_ID | ytmd://youtu.be/VIDEO_ID |
https://www.youtube.com/playlist?list=PLAYLIST_ID | ytmd://www.youtube.com/playlist?list=PLAYLIST_ID |
https://www.youtube.com/@Handle | ytmd://www.youtube.com/@Handle |
Also works for m.youtube.com, /shorts/…, and /embed/… (treated as watch).
Optional playlist context on a watch link (&list=…) is kept for real playlists/albums. Radio / mix ids (RD…, RDAMVM…) are stripped — attaching those makes YouTube Music show “Radio is starting…” without playing the track.
Compact links
Shorter forms work the same way (also used when you copy a share link from the tray):
| Kind | Format |
|---|---|
| Track | ytmd://watch/<videoId> |
| Track + playlist | ytmd://watch/<videoId>/<playlistId> |
| Playlist page | ytmd://playlist/<playlistId> |
| Play playlist now | ytmd://playlist/<playlistId>/play |
| Channel by id | ytmd://channel/UC… |
| Channel by handle | ytmd://channel/@Handle |
/play on a playlist link starts playback immediately and skips the confirmation dialog.
What happens when a link opens
Under Settings → Player → Shared links → When opening a shared link:
| Option | Behavior |
|---|---|
| Ask first (default) | Confirm dialog before acting |
| Play immediately | Skip the dialog and run the default action |
Ask first — dialog choices
| Link type | Actions |
|---|---|
| Track | Play now, Add to queue, or Cancel |
| Playlist | Play playlist, Add to queue, Open playlist, or Cancel |
| Channel | Open channel or Cancel |
Closing the dialog (or Cancel) shows a short toast so the app does not look like it ignored the link. Successful play / queue / open also toast.
With Play immediately, tracks start playing; playlists and channels open their page (use …/play on a playlist URL if you want instant playlist playback).
Tray — copy share link
In the tray view, use the share / copy control on the current track to put a compact ytmd://watch/… link on the clipboard (includes a non-radio list= from the music page when available).
Replace share links in YouTube Music
Under Settings → Player → Shared links → Replace share links with ytmd:// (on by default), the YouTube Music share dialog (input#share-url) is rewritten to a compact ytmd:// link before you hit Copy — so the clipboard gets an app deep link instead of music.youtube.com.
Turn it off to keep the original https share URLs.
Browser userscript
Prefer opening the app from a music.youtube.com / youtube.com tab without rewriting the address bar? Use the browser userscript — soft-opens ytmd:// on load/navigate (optional Tampermonkey menu toggle; no click interception).
Tips
- Second-instance and cold-start argv links are queued and handled after YouTube Music is ready.
- Invalid or unsupported paths are ignored (for example album
/browse/…is not mapped yet). - Handles that arrive percent-encoded (
%40Name) are decoded the same as@Name.