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

Incorrect file duration #3

Open
drigato opened this issue Jul 18, 2013 · 8 comments · May be fixed by #7
Open

Incorrect file duration #3

drigato opened this issue Jul 18, 2013 · 8 comments · May be fixed by #7

Comments

@drigato
Copy link

drigato commented Jul 18, 2013

We have an mp3 that silan analyzes the duration to be 173311.111837 which is incorrect. When the file is uploaded via the Airtime interface mutagen tells us the file's length is 290.8212244897959

We have a ticket in Airtime Jira with more information. The mp3 is attached to that ticket:
http://dev.sourcefabric.org/browse/CC-5271

@x42
Copy link
Owner

x42 commented Aug 4, 2013

This is most likley an issue wit the ffmpeg or libav version that you are using.

I cannot reproduce either of the bugs:

# ./silan --format json /tmp/Casser\ La\ Voix-160kbps.mp3 
{ "sound":[ [ 0.724218, 287.422426 ]], "file duration":290.821202, "sample rate":44100}

# ./silan --format json /tmp/15-Billy\ Paul\ \ Let\ \ Em\ In.mp3
{ "sound":[ [ 0.332948, 209.772540 ]], "file duration":214.595896, "sample rate":44100}

# ./silan --version
silan version 0.3.2

linked against ffmpeg 1.2.1.

can you try to reproduce it with the binaries from
http://robin.linuxaudio.org/tmp/silan-i386-linux-gnu-v0.3.1-9-g817ff4c.tgz
http://robin.linuxaudio.org/tmp/silan-x86_64-linux-gnu-v0.3.1-9-g817ff4c.tgz
which are statically linked against ffmpeg-1.2.1.

@drigato
Copy link
Author

drigato commented Aug 14, 2013

I think you're right. It worked with the binary you linked. Thanks Robin

@x42 x42 closed this as completed Dec 17, 2013
@asantoni
Copy link

Hi Robin,

There's been a regression and the latter track reports an incorrect length on Ubuntu 14.04:
https://dev.sourcefabric.org/secure/attachment/15164/Casser%20La%20Voix-160kbps.mp3

$ silan Casser\ La\ Voix-160kbps.mp3 -f json
{ "sound":[ [ 0.362313, 143.727143 ]], "file duration":290.821202, "sample rate":44100}

I've noticed that for a lot of tracks (say like 25% of my MP3 collection), silan gets a value that's just a few seconds short of half the actual file length.

Any ideas?

Thanks,
Albert

@x42
Copy link
Owner

x42 commented Jan 27, 2015

fixed in 185f1de.

(it was an issue with interleaved vs planar channel mapping, I prepared for the new ffmpeg audio-decode API but never completed the job there. It is/was not a problem with ffmpeg/libavcodec.53 or older).

Statically linked binaries (ffmpeg-2.2):
http://robin.linuxaudio.org/tmp/silan-i386-linux-gnu-v0.3.2-4-gea0f418.tgz
http://robin.linuxaudio.org/tmp/silan-x86_64-linux-gnu-v0.3.2-4-gea0f418.tgz

@asantoni
Copy link

The new version checks out on my side, thanks for the quick response and bugfix, Robin!

@asantoni
Copy link

Hi Robin,

I've found another track that has a similar problem, except this time silan overestimates the track length.
Here's the sample file, and silan says the length is 5:37 but it's actually supposed to be 3:55.
https://dev.sourcefabric.org/secure/attachment/23028/incorrect.mp3

You can reproduce this with the latest build you posted above (0.3.2-4-gea0f418).

The upstream ticket in Airtime is here: https://dev.sourcefabric.org/browse/CC-6138

Thanks!
Albert

@x42
Copy link
Owner

x42 commented Oct 19, 2015

Just a quick heads-up. I won't be able to look into this soon. but I'll re-open the ticket as reminder.

@x42 x42 reopened this Oct 19, 2015
@hairmare
Copy link

hairmare commented Feb 15, 2017

Could this be ok at 5d9a8e0?

It looks like my CentOS build against that commit does not exhibit the issue while the Debian packages do show the behaviour. Though, I'm not sure what exactly they build against.

Debian 8/jessie:

apt-get update
apt-get install -y silan curl

silan -b -f JSON  '/Music/Big Bad Voodoo Daddy/Big Bad Voodoo Daddy/03 King Of Swing.mp3'
{ "sound":[ [ 0.132812, 148.441587 ]], "file duration":298.631837, "sample rate":44100}

CentOS 7.3:

yum -y install epel-release
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
curl -o /etc/yum.repos.d/home:radiorabe:audio.repo \
     http://download.opensuse.org/repositories/home:/radiorabe:/audio/CentOS_7/home:radiorabe:audio.repo

yum install -y silan

silan -b -f JSON  '/Music/Big Bad Voodoo Daddy/Big Bad Voodoo Daddy/03 King Of Swing.mp3' 
{ "sound":[ [ 0.235918, 296.999116 ]], "file duration":298.606780, "sample rate":44100}

The thing is, not all the files exhibit this behaviour. The example from Albert still has the issue regarding it's total length on Debian but I am not sure if those are the same issue.

curl -o /tmp/incorrect.mp3 https://dev.sourcefabric.org/secure/attachment/23028/incorrect.mp3

silan -b -f JSON /tmp/incorrect.mp3

Debian:

{ "sound":[ [ 0.012358, 337.902880 ]], "file duration":337.902880, "sample rate":44100}

CentOS:

{ "sound":[ [ 0.012358, 235.520000 ]], "file duration":235.520000, "sample rate":44100}

In my private collection the behaviour does not seem to be consistent, some files work others don't. I have yet to find a libre track that I can share that exhibits the problem.

Just a heads up, on Debian 9 testing (stretch) I am getting a pretty segfault, I'll open an issue with a proper core dump when I get one done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants
@x42 @hairmare @asantoni @drigato and others