owntone-server icon indicating copy to clipboard operation
owntone-server copied to clipboard

feature request: youtube music integration

Open bendschs opened this issue 6 years ago • 3 comments

I would love to see youtube music integration (similar to spotify account). https://music.youtube.com

cheers bendsch

bendschs avatar Jan 09 '19 20:01 bendschs

Do you, or anyone else, know of API's or libraries that this could build on?

Is the concept of Youtube Music the same as with Spotify in that a user has a collection of saved tracks, albums, playlists etc.?

ejurgensen avatar Jan 11 '19 13:01 ejurgensen

Apparently all api availabe at the moment can be found here https://www.youtube.com/intl/en/yt/dev/api-resources/ . Seems like there is no specific api for Youtube Music at this point. Maybe it is too early, it launched in July 2018.

Concept is same as Spotify, you can store music in library an also make it available offline.

cheers bendsch

bendschs avatar Jan 11 '19 14:01 bendschs

This is a way to get OwnTone to play Youtube Music right now. The same method could of course be officially supported, but it would use youtube-dl as a dependency instead of a proper API which might (?) be unwanted.

Prerequisite: Create a named pipe and let OwnTone add it to the library. This pipe will always be used for Youtube Music. $ mkfifo OwnTonePipe

  1. Play the pipe (using OwnTone UI or API)
  2. Play single song: $ youtube-dl -f 140 -o - H9NuWEeODew | ffmpeg -f mp4 -i pipe: -f wav pipe: > OwnTonePipe

or

  1. Play Youtube Music playlist:

$ youtube-dl -f 140 -o - -i RDCLAK5uy_kP2172rQNb3KFXz880xp6M98R_ME5CIKA | ffmpeg -f mp4 -i pipe: -f wav pipe: > OwnTonePipe

It's also possible to populate the metadata pipe using youtube-dl output but it needs developing a metadata encoder.

troed avatar Feb 01 '22 23:02 troed