th-ch / youtube-music

YouTube Music Desktop App bundled with custom plugins (and built-in ad blocker / downloader)
https://th-ch.github.io/youtube-music/
MIT License
8.07k stars 479 forks source link

Discussing DLNA #696

Open dgalli1 opened 2 years ago

dgalli1 commented 2 years ago

I thought about somehow implementing a DLNA target for this app. Means it should be possible to play audio from the youtube-music app. To some random music player.

I did a POC of how we could do the DLNA stuff here: https://github.com/dgalli1/poc-dlna-node

But im kinda lost when it comes to getting the media stream from youtube.

Especially while making sure that stuff like SponsorBlock still works.

Currently, i think it would be the best way to just record the complete output audio of the app and make a file stream out of the output.

This would then be accessible on URL like http://localhost:8756/stream.mp3

The client wouldn't control anything, but it would at least play sounds.

What do you think about this approach, or do you got a better idea on how to implement this?

gittyupper commented 2 years ago

pulseaudio-dlna works on linux. Would that be viable?