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
song duration #14
Comments
I'm all up for it! The main reason I did not do it earlier is that I found a lot of software doesn't write the duration ID3 value and I didn't want to slow down indexing by having to peek at the audio data . |
i am sorry! haven't yet had time to finish this, i'll try to PR tomorrow |
No worries! I haven't deployed a build with search on my own 'production' server yet, did you get a chance to test it? |
Sorry, this is going to take a lot more, I ingenuously thought that the duration was present on the files metadata but turns out it is not, you have to calculate it from the bitrate and the file size. |
Yeah, I'm afraid this will have to be implemented per audio format :c |
yeah, mp3 for example if it's VBR, from what i have read you have to calculate each frame duration using it's bitrate and size. |
Hard to make a call without performance measurements. I think this is a good plan B if measuring duration is very slow compared to querying the DB for an existing entry (with the drawback of potentially leaving a bad duration in the DB if the file is ever updated). |
Ok, so flac is easy and fast jxs@16ae131 I am going to look into mp3 today, if you want i can PR with this, else i will submit when mp3 is done :) |
I would welcome a PR with just FLAC, baby steps! |
This has been in for a while for mp3 and FLAC. |
is there a reason for songs not having them? if not I can submit a PR in the next couple days adding them to the formats that support them (from what i see both
id3
andmetaflac
have support=cheers :)
The text was updated successfully, but these errors were encountered: