Comments (11)
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.
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.
do you have the DSub transcoding setup in the gonic admin interface?
from gonic.
Transcoding is setup for "*"
from gonic.
i added some more logging, could you try again with those and check the logs?
from gonic.
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¤t=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¤t=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.
it seems dsub is requesting a max bitrate with &maxBitRate=2986
from gonic.
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¤t=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¤t=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¤t=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.
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.
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.
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)
- Distribute static binaries HOT 2
- Question: What happens to the db if I correct the metadata on my collection HOT 1
- Canβt see playlists. Difference from Subsonic API? HOT 1
- Does Gonic support the ability to scan music from 2 different drives in a single docker instance? HOT 1
- songs not being downloaded in dsub after upgrade 15.2β16.4 HOT 3
- feat: Support for composer tag
- Playlist sharing across users
- Could not read tags HOT 4
- gonic db created with world-readable permissions HOT 1
- `artists`, `albumartists`, and `genres` with picard HOT 11
- Request: better playlist portability
- Feature: Album download
- Quality of life improvements to podcasts
- Missing getNowPlaying endpoint in API HOT 1
- Question are podcasts included in item counts? HOT 3
- Unable to create playlist as non-admin user, error code 50: you aren't allowed update that user's playlist HOT 1
- Feature: Sync track star / unstar with last.fm / listenbrainz HOT 2
- General support HOT 6
- checking playlist directory: path does not exist, please provide one HOT 3
- Ignore @eaDir directories HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gonic.