sentriz / gonic

music streaming server / free-software subsonic server API implementation
ircs://irc.libera.chat/#gonic
GNU General Public License v3.0
1.62k stars 115 forks source link

Request: Parse `format` param in `stream` request for per-request transcoding #507

Open gabeklavans opened 6 months ago

gabeklavans commented 6 months ago

Right now, the format param is only used to detect the raw key, in which case it will just serve the raw file.

https://github.com/sentriz/gonic/blob/259be0edde4c77d9e015a43a7dd9256c9e14f31c/server/ctrlsubsonic/handlers_raw.go#L191

However, it would be nice (and I believe in-spec) if this param could also be used to request the specific stream be transcoded into one of the available formats, such as mp3 or opus.

sentriz commented 6 months ago

i would love for this to be possible, but we need some extension to the spec for clients to list the availible formats. eg gonic might have opus, opus_rg, or later on some custom format the the user created. and clients can't know what the options are

gabeklavans commented 6 months ago

Good point. This would probably be a sensible addition to OpenSubsonic. I might open a discussion there.

sentriz commented 6 months ago

nice thank you. also releated is #244