Skip Menu |

This queue is for tickets about the Audio-File CPAN distribution.

Report information
The Basics
Id: 80245
Status: new
Priority: 0/
Queue: Audio-File

People
Owner: Nobody in particular
Requestors: rrt [...] sc3d.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.11
Fixed in: (no value)



Subject: File duration sometimes doubled for MP3s
For a couple of MP3 files I have (recordings I made myself), Audio::File reports twice the actual duration if I run: my $info = Audio::File->new($file); my $length = concise(duration($info->audio_properties->length())); There's no particular distinguishing feature I can see: one of the files is mono and one stereo, both recorded at 44.1kHz. soxi reports the correct durations: Input File : 'The Infanta's Birthday.mp3' Channels : 1 Sample Rate : 44100 Precision : 16-bit Duration : 00:42:27.38 = 112339546 samples = 191054 CDDA sectors File Size : 25.6M Bit Rate : 80.4k Sample Encoding: MPEG audio (layer I, II or III) Comments : Title=Oscar Wilde / The Infanta's Birthday Artist=Reuben Thomas Year=2008 Input File : 'The Quest of Iranon.mp3' Channels : 2 Sample Rate : 44100 Precision : 16-bit Duration : 00:18:40.03 = 49393147 samples = 84002 CDDA sectors File Size : 15.0M Bit Rate : 107k Sample Encoding: MPEG audio (layer I, II or III) Comments : Title=H. P. Lovecraft / The Quest of Iranon Artist=Reuben Thomas Year=2007 whereas File::Audio reports 5120s for the first and 2142s for the second.
From: rrt [...] sc3d.org
On Wed Oct 17 09:20:43 2012, rrt wrote: Show quoted text
> For a couple of MP3 files I have (recordings I made myself),
Audio::File Show quoted text
> reports twice the actual duration if I run: > > my $info = Audio::File->new($file); > my $length = concise(duration($info->audio_properties- >length()));
That second line uses Time::Duration; for my actual tests I didn't use that (in case the problem was in Time::Duration); I just reported the raw seconds value returned from Audio::File.