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

OGG files with implausibly long durations #281

Open
cheesestraws opened this issue Sep 7, 2019 · 3 comments
Open

OGG files with implausibly long durations #281

cheesestraws opened this issue Sep 7, 2019 · 3 comments

Comments

@cheesestraws
Copy link

@cheesestraws cheesestraws commented Sep 7, 2019

Logitech Media Server Version: 7.9.1 - 1522157629 @ Fri Mar 30 12:25:29 CEST 2018
Platform Architecture: x86_64-linux
Audio::Scan: 0.95

The scanner seems to be detecting some OGG files as having implausibly long durations. I'm guessing this might actually be an Audio::Scan bug but

sqlite> select url,secs from tracks where secs>31536000 LIMIT 1; -- tracks longer than 1 year?
file:///mnt/media/home/media/player/Other/B/Berestez/Kahvi%20Collective%20Archive%20Vol%201/Plokcity.ogg|1.84467440715621e+16

FFmpeg has no problem parsing out the right length from this file:

$ ffprobe /mnt/media/home/media/player/Other/B/Berestez/Kahvi\ Collective\ Archive\ Vol\ 1/Plokcity.ogg

...
[ogg @ 0x5602c91d7fc0] 107 bytes of comment header remain
Input #0, ogg, from '/mnt/media/home/media/player/Other/B/Berestez/Kahvi Collective Archive Vol 1/Plokcity.ogg':
  Duration: 00:06:12.40, start: 0.000000, bitrate: 157 kb/s
...

It might be worth noting that all the files that exhibit this behaviour show the 'n bytes of comment header remain' in ffmpeg:

$ sqlite3 library.db "select url from tracks where secs>31536000" | perl -MURI::Escape -e 'while(<>) { s|^file://|"|; s|$|"|; print uri_unescape($_); }' | xargs -n 1 ffprobe 2>&1 | grep comment | wc -l
8

though this may, of course, be a red herring—it seems to be quite common in my random selection of ogg files.

I've dug a bit until I hit Audio::Scan, so I'm guessing this might well be an Audio::Scan bug, but this is the point where my expertise runs out (I know nothing about the internals of audio files), so I thought it'd be worth bringing someone's attention to. As far as I know, the oggs that exhibit this behaviour are freely distributable, so I can send copies of them if useful.

@michaelherger

This comment has been minimized.

Copy link

@michaelherger michaelherger commented Sep 7, 2019

Yes, this sounds like an Audio::Scan issue. First of all you should update LMS to 7.9.2, as we have more recent versions of this library for some platforms. If that doesn't help (or Audio::Scan isn't available for a more recent version than 0.95 for your platform) you might want to compile it yourself using the build script from https://github.com/Logitech/slimserver-vendor/tree/public/7.9/CPAN.

Worst case I'd recommend to head over to https://github.com/andygrundman/Audio-Scan and report the issue there.

@cheesestraws

This comment has been minimized.

Copy link
Author

@cheesestraws cheesestraws commented Sep 7, 2019

Yeah, I've just grabbed the latest Audio::Scan out of CPAN and knocked up a minimal test case and it still does it, so I don't think updating will help yet. I should have done that to start with, really. Looks like not your bug—I'll go and report it on Audio::Scan. Will link the issue here when I do. Sorry for wasting your time :-).

@cheesestraws

This comment has been minimized.

Copy link
Author

@cheesestraws cheesestraws commented Sep 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.