Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to Use Server-Specified Transcoding Format and Bitrate #317

Open
sudoape opened this issue Sep 10, 2024 · 8 comments
Open

Allow to Use Server-Specified Transcoding Format and Bitrate #317

sudoape opened this issue Sep 10, 2024 · 8 comments
Labels
enhancement New feature or request implemented This feature/bug is implemented

Comments

@sudoape
Copy link

sudoape commented Sep 10, 2024

Currently the app forces mp3 only transcoding. In Navidrome I have set a specific transcode format and bitrate for the Amperfy player, but it is always overwritten by the app settings with no way of preferring it.
It would be nice to have the option to get max bitrate and streaming format from the server values.

@BLeeEZ BLeeEZ added the enhancement New feature or request label Sep 11, 2024
@BLeeEZ
Copy link
Owner

BLeeEZ commented Sep 11, 2024

What needs to be changed to support this? Omit the transcoding attribute from the URL?

@sudoape
Copy link
Author

sudoape commented Sep 28, 2024

If you omit the format attribute in /rest/stream then Navidrome will use the format set in DefaultDownsamplingFormat configuration or the one set in the Amperfy Player from the UI.

@amandasystems
Copy link

Aha, so there's no way of selecting a different codec for transcoding than mp3? The drop-down list suggests there may be other formats but it only shows mp3 and raw for me, which had me confused since I have other transcoding formats configured in Navidrome. Leaving this comment here for anyone else who may be similarly confused!

@BLeeEZ
Copy link
Owner

BLeeEZ commented Dec 10, 2024

I am currently revisiting this feature. Two points:

  1. How can I identify the MIME type of the received file if the server is deciding which transcoding codec should be used. I need to specify the received MIME type in the database to configure the player correct.
  2. If I can't get the actual used transcoding codec (MIME type) which hardcoded codecs should I offer to the user? (mp3, raw, ALAC?, FLAC?)

@amandasystems
Copy link

For me at least, the correct MIME type is set in the header of the response to the stream endpoint. This is for ogg opus. For mp3 I get audio/mpeg.

$ curl 'https://[redacted]/rest/stream?u=amanda[redacted] -I -s 
server: nginx/1.26.2
date: Wed, 11 Dec 2024 09:25:42 GMT
content-type: audio/ogg
content-length: 13680581
accept-ranges: none
permissions-policy: autoplay=(), camera=(), microphone=(), usb=()
referrer-policy: same-origin
...
x-content-duration: 367.87
x-content-type-options: nosniff
x-frame-options: DENY

@BLeeEZ
Copy link
Owner

BLeeEZ commented Dec 11, 2024

@amandasystems thank you. I found the counterpart in the Apple network session. I will rework the download manager to support that and I will add an option to let the server side which codec should be user.

@amandasystems
Copy link

n i c e, thanks!

@BLeeEZ
Copy link
Owner

BLeeEZ commented Dec 15, 2024

Done in c40d262 and 18f5e2c.

@BLeeEZ BLeeEZ added the implemented This feature/bug is implemented label Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request implemented This feature/bug is implemented
Projects
None yet
Development

No branches or pull requests

3 participants