lms icon indicating copy to clipboard operation
lms copied to clipboard

DSub shows incorrect long track time

Open abdulocracy opened this issue 5 years ago • 17 comments

I'm using the latest Docker image, and when streaming to DSub over Subsonic API, the lengths are properly shown in the album list, but upon playback are incorrect and often insanely long (58 minutes for ~6 minute track).

abdulocracy avatar Jan 28 '20 07:01 abdulocracy

Analyzing the DSub streamed files shows incorrect bitrates, all of my files are V0 mp3. ffmpeg -i file shows lower than actual bitrate and states Estimating duration from bitrate, this may be inaccurate, perhaps it has to do with this.

abdulocracy avatar Jan 28 '20 08:01 abdulocracy

Hi, Thanks for reporting this. Do you use transcoding?

epoupon avatar Jan 28 '20 09:01 epoupon

No, I don't use transcoding.

abdulocracy avatar Jan 28 '20 09:01 abdulocracy

Do you get the issue with another subsonic server?

epoupon avatar Jan 28 '20 09:01 epoupon

Airsonic doesn't have the issue.

abdulocracy avatar Jan 28 '20 14:01 abdulocracy

I do not reproduce the issue. I used ffmpeg with libmp3lame to create a v0 mp3 file. What I observe is that DSub is unable to scroll in the file as long as it is not completely downloaded (showing -:-- as duration). Once the download is complete replaying the song will show the correct duration and scrolling is enabled.

Edit: Android 8, DSub up to date with Google Play)

epoupon avatar Jan 29 '20 16:01 epoupon

I am experiencing this issue with a lot of the tracks I have, I can send samples by email if you so wish.

I believe it may have to do with the fact that, despite having transcoding disabled, all tracks I stream to DSub get reencoded as mp3 and ffmpeg displays the length calculation warning with only the streamed files, not originals. I am supposing they are reencoded since the encoder tag is LAME on all originals but Lavf on streamed files.

abdulocracy avatar Jan 31 '20 19:01 abdulocracy

Ok, it would be really helpful to have a sample!

epoupon avatar Jan 31 '20 22:01 epoupon

My address is public on my profile, if you could email me I could provide you with samples. :)

abdulocracy avatar Feb 01 '20 10:02 abdulocracy

Ok indeed I confirm the bug. TagLib incorrectly guesses the song duration, and that's what we report (using the Subsonic API but also to the web player)

epoupon avatar Feb 01 '20 13:02 epoupon

Also, you might realize that the bitrates and encoder tags are different in the two, but I have transcoding disabled?

abdulocracy avatar Feb 01 '20 13:02 abdulocracy

The problem is that we send the wrong duration, and DSub then uses this wrong information to display the track duration. Not sure about the file you sent. Maybe it is someway broken, I will investigate

epoupon avatar Feb 01 '20 13:02 epoupon

I have noticed all DSub-streamed files appear with the same issue, different encoder and bitrate, and the server logs that it is transcoding, so I assume they are transcoded.

abdulocracy avatar Feb 01 '20 13:02 abdulocracy

Should I report this as a seperate bug on the tracker?

abdulocracy avatar Feb 01 '20 13:02 abdulocracy

No, this is actually the same root cause: TagLib is wrong on duration/bitrate

epoupon avatar Feb 01 '20 14:02 epoupon

I see, thanks! :)

abdulocracy avatar Feb 01 '20 14:02 abdulocracy

Unfortunately still not fixed in the newest taglib 1.12 (even scanning in accurate mode)

epoupon avatar Sep 22 '21 09:09 epoupon

Still not fixed in taglib 1.13 (even scanning in accurate mode)

epoupon avatar Apr 04 '23 21:04 epoupon

I think we should just make a issue at taglib, like we did for #359

epoupon avatar Dec 17 '23 17:12 epoupon