[gpodder-devel] Wrong length again

  • From: nikosapi at gmail.com (nikosapi)
  • Date: Mon, 6 Aug 2007 22:59:41 -0400

On August 6, 2007 15:01:17 Thomas Perl wrote:
> Hello, G?tz!
>
> On Mon, 2007-08-06 at 20:30 +0200, G?tz Waschk wrote:
> > On 8/6/07, Thomas Perl <thp at perli.net> wrote:
> > > On Sun, 2007-08-05 at 15:02 +0200, G?tz Waschk wrote:
> > > > the episodes of the Cory Doctorow podcast
> > > > (http://feeds.feedburner.com/doctorow_podcast) get the wrong length
> > > > set if copied with gpodder. For instance the current episode The
> >
> > (http://www.archive.org/download/Cory_Doctorow_Podcast_91/Cory_Doctorow_P
> >odcast_91_The_Hacker_Crackdown_Part_006.mp3)
> >
> > > > gets a length of 29:55, that's the value I get from mplayer
> > > > -identify: ID_LENGTH=1795.00
> > > > The true length according to audacious is 31:07.
> > >
> > > Is this the true length indeed or only "according to" audacious? What
> > > kind of MP3 codec/library is audacious using? It's kind of hard, as it
> > > seems there is no "perfect" library to detect file lengths, I thought
> > > mplayer would be the best idea, but it seems like mplayer fails when
> > > other codecs don't and vice versa.
> >
> > Hi,
> >
> > the length according to mplayer is too short, you miss the last part
> > of this audio file, while audacious can play the whole. Audacious is
> > based on the mad library for decoding MP3.
> >
> >From what I see from your previous posts, the problems with length
>
> detection have previously been because of enhanced AAC files. Does libmad
> always provide the correct length for MP3 files? If so, maybe using libmad
> for MP3 files and mplayer for everything else would fix your problem?
>
>
> Thanks,
> thomas
>
>

Ok, here's the promissed patch :)

If mplayer is available, it will use it for all media files. If the file is an 
mp3 and pymad is installed it will get the length reported by pymad and 
compare it to the length from mplayer and use the longer of the two (this 
works great btw). And of course, worst case eyed3 is still available if all 
else fails.

Oh and btw, about Cory Doctorow's podcasts. The mp3s are borked, all the media 
players I tried them with gave different play times. Pymad gets close to the 
right time but is off by ~10sec. Email Cory and tell him to use a better mp3 
encoder (he still reads all his emails right?).

Enjoy,

nick

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gpodder-r362-file-length.patch
Type: text/x-diff
Size: 2378 bytes
Desc: not available
URL: 
<https://lists.berlios.de/pipermail/gpodder-devel/attachments/20070806/55506961/attachment.patch>

Other related posts: