Giter Club home page Giter Club logo

Comments (11)

sentriz avatar sentriz commented on September 26, 2024

not exactly sure what the behavour you expect is? could rephrase it in terms of transcode settings, incoming request with max bitrate, and expected response?

also i'm confused why the maxBitRate >= audioFile.AudioBitrate() check would be true, since for 24bit 94k FLAC, you'd have some check like 0 >= 1000 for example which is false

from gonic.

jeffgt14 avatar jeffgt14 commented on September 26, 2024

I may be deciphering the code wrong then. I don't know Go much at all so maybe it's something else causing the issue

My expectation is for every file to run through my transcoding command. In DSub, if I have max bitrate set to unlimited, Gonic sends to raw file instead of transcoding. So for FLAC 24/96, they get sent as that instead of transcoding to FLAC 16/44.

If I set max bitrate in DSub to something other than unlimited, then it transcodes correctly for me. My assumption is somehow Gonic is reading the Unlimited client request and just sends the raw file instead of transcoding.

Bitrate isn't really something that is set when transcoding the a Lossless format.

from gonic.

sentriz avatar sentriz commented on September 26, 2024

do you have the DSub transcoding setup in the gonic admin interface?

from gonic.

jeffgt14 avatar jeffgt14 commented on September 26, 2024

Transcoding is setup for "*"

from gonic.

sentriz avatar sentriz commented on September 26, 2024

i added some more logging, could you try again with those and check the logs?

from gonic.

jeffgt14 avatar jeffgt14 commented on September 26, 2024

This is with unlimited bitrate setting in DSub

2023/12/29 16:30:31 starting gonic v0.16.2
2023/12/29 16:30:31 provided config
2023/12/29 16:30:31     cache-path                /cache
2023/12/29 16:30:31     config-path
2023/12/29 16:30:31     db-path                   /data/gonic.db
2023/12/29 16:30:31     exclude-pattern
2023/12/29 16:30:31     expvar                    false
2023/12/29 16:30:31     genre-split
2023/12/29 16:30:31     http-log                  true
2023/12/29 16:30:31     jukebox-enabled           false
2023/12/29 16:30:31     jukebox-mpv-extra-args
2023/12/29 16:30:31     listen-addr               :80
2023/12/29 16:30:31     multi-value-album-artist  multi
2023/12/29 16:30:31     multi-value-artist        multi
2023/12/29 16:30:31     multi-value-genre         multi
2023/12/29 16:30:31     music-path                /Music
2023/12/29 16:30:31     playlists-path            /playlists
2023/12/29 16:30:31     podcast-path              /podcasts
2023/12/29 16:30:31     podcast-purge-age         0
2023/12/29 16:30:31     pprof                     false
2023/12/29 16:30:31     proxy-prefix              /
2023/12/29 16:30:31     scan-at-start-enabled     false
2023/12/29 16:30:31     scan-interval             0
2023/12/29 16:30:31     scan-watcher-enabled      false
2023/12/29 16:30:31     tls-cert
2023/12/29 16:30:31     tls-key
2023/12/29 16:30:31     version                   false
2023/12/29 16:30:31 starting job "http"
2023/12/29 16:30:31 starting job "podcast download"
2023/12/29 16:30:31 starting job "session clean"
2023/12/29 16:30:31 starting job "podcast refresh"
2023/12/29 16:30:43 response  200  GET /getAvatar?u=admin&s=okrgpl48r5c2d9dgigiucu2mf0&t=3a315d0babb1584866e81efebb996c81&v=1.2.0&c=DSub&username=admin
2023/12/29 16:31:03 response  200  GET /home
2023/12/29 16:31:03 response  200  GET /static/style.css?v=0.16.2
2023/12/29 16:31:03 response  200  GET /static/main.js
2023/12/29 16:31:03 response  200  GET /static/gonic.png
2023/12/29 16:31:06 response  200  GET /home
2023/12/29 16:31:06 response  200  GET /static/style.css?v=0.16.2
2023/12/29 16:31:06 response  200  GET /static/main.js
2023/12/29 16:31:06 response  200  GET /static/gonic.png
2023/12/29 16:32:33 response  200  GET /getAlbumList?u=admin&s=okrgpl48r5c2d9dgigiucu2mf0&t=3a315d0babb1584866e81efebb996c81&v=1.2.0&c=DSub&type=newest&size=20&offset=20
2023/12/29 16:32:35 response  200  GET /getCoverArt?u=admin&s=okrgpl48r5c2d9dgigiucu2mf0&t=3a315d0babb1584866e81efebb996c81&v=1.2.0&c=DSub&id=al-6962
2023/12/29 16:32:36 response  200  GET /getMusicDirectory?u=admin&s=okrgpl48r5c2d9dgigiucu2mf0&t=3a315d0babb1584866e81efebb996c81&v=1.2.0&c=DSub&id=al-2309
2023/12/29 16:32:43 response  200  GET /savePlayQueue?u=admin&s=okrgpl48r5c2d9dgigiucu2mf0&t=3a315d0babb1584866e81efebb996c81&v=1.2.0&c=DSub&id=tr-8606&current=tr-8606&position=0
2023/12/29 16:32:43 serving raw file, requested max bitrate 2986k is greater or
equal to 2986k
2023/12/29 16:32:44 response  200  GET /savePlayQueue?u=admin&s=okrgpl48r5c2d9dgigiucu2mf0&t=3a315d0babb1584866e81efebb996c81&v=1.2.0&c=DSub&id=tr-8606&current=tr-8606&position=0
2023/12/29 16:32:49 response  200  GET /stream?u=admin&s=okrgpl48r5c2d9dgigiucu2mf0&t=3a315d0babb1584866e81efebb996c81&v=1.2.0&c=DSub&id=tr-8606&maxBitRate=2986

from gonic.

sentriz avatar sentriz commented on September 26, 2024

it seems dsub is requesting a max bitrate with &maxBitRate=2986

from gonic.

jeffgt14 avatar jeffgt14 commented on September 26, 2024

Yeah it looks like it's reading the original bitrate of the file and requesting that.

If I set max bitrate in DSub to 32kbps, it goes through my transcode command and transcodes to 16/44 FLAC.

2023/12/29 16:36:12 response  200  GET /getMusicDirectory?u=admin&s=okrgpl48r5c2d9dgigiucu2mf0&t=3a315d0babb1584866e81efebb996c81&v=1.2.0&c=DSub&id=al-2306
2023/12/29 16:36:12 response  200  GET /getMusicDirectory?u=admin&s=okrgpl48r5c2d9dgigiucu2mf0&t=3a315d0babb1584866e81efebb996c81&v=1.2.0&c=DSub&id=al-2309
2023/12/29 16:36:13 response  200  GET /savePlayQueue?u=admin&s=okrgpl48r5c2d9dgigiucu2mf0&t=3a315d0babb1584866e81efebb996c81&v=1.2.0&c=DSub&id=tr-8606&current=tr-8606&position=31849
2023/12/29 16:36:15 response  200  GET /savePlayQueue?u=admin&s=okrgpl48r5c2d9dgigiucu2mf0&t=3a315d0babb1584866e81efebb996c81&v=1.2.0&c=DSub&id=tr-8589&current=tr-8589&position=0
2023/12/29 16:36:15 trancoding to "audio/flac" with at bitrate 0k
2023/12/29 16:36:16 response  200  GET /savePlayQueue?u=admin&s=okrgpl48r5c2d9dgigiucu2mf0&t=3a315d0babb1584866e81efebb996c81&v=1.2.0&c=DSub&id=tr-8589&current=tr-8589&position=0
2023/12/29 16:36:18 response  200  GET /stream?u=admin&s=okrgpl48r5c2d9dgigiucu2mf0&t=3a315d0babb1584866e81efebb996c81&v=1.2.0&c=DSub&id=tr-8589&maxBitRate=32

from gonic.

sentriz avatar sentriz commented on September 26, 2024

it looks like gonic is doing the correct thing then. not sure how this could supported without changes to the subsonic spec or something

from gonic.

jeffgt14 avatar jeffgt14 commented on September 26, 2024

I've just never seen this issue in any other server. Could just be how DSub requests the file since when bitrate is set to unlimited, it's requesting a max bitrate equal to the file on the server so it's always going to be >= the audio file bitrate and Gonic sends the raw file.

Not a deal breaker for me as I can just set an arbitrary bitrate in DSub to bypass the command. Thinking I can also change the if maxBitRate >= audioFile.AudioBitrate() to if maxBitRate > audioFile.AudioBitrate() prior to my build and have it work for my needs as well. Not sure if changing >= to just > would impact others though.

from gonic.

sentriz avatar sentriz commented on September 26, 2024

mm i think in general it doesnt makes sense to transcode when the client says unlimited, and maxbit rate is the same as the file. and dropping the equal comparison seems like a workaround

i believe though there is an upcoming @opensubsonic extension to request availible formats

then a client could say &format=flac then gonic will know to transcode regardless of any format. maybe it makes sense to postpone that til then

from gonic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.