Opened 13 years ago

Closed 12 years ago

#738 closed defect (remind)

Incorrect duration detected on VBR MP3s

Reported by: codon1@… Owned by: mans@…
Priority: normal Component: libavcodec
Version: unspecified Severity: minor
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: Analyzed by developer:

Description

Hello.

I have discovered that the duration detected by ffmpeg -i (and also mplayer) is incorrect for VBR MP3s. This is because the decoder is not looking at the Xing or Info VBR headers. Other decoders use these headers to determine the total number of frames in the stream without having to parse the entire stream. The duration is then computed as :

duration = total_frames * frame_size / sample_rate.

Attached you will find a patch that reports the correct duration for VBR mp3s.

Thanks and best regards.

Attachments (2)

vbr.diff (3.2 KB) - added by codon1@… 13 years ago.
patch for VBR durations
vbr.2.diff (3.3 KB) - added by codon1@… 13 years ago.
[PATCH] VBR durations

Download all attachments as: .zip

Change History (7)

Changed 13 years ago by codon1@…

patch for VBR durations

comment:1 Changed 13 years ago by codon1@…

Changed 13 years ago by codon1@…

[PATCH] VBR durations

comment:2 Changed 13 years ago by codon1@…

  • attachments.isobsolete changed from 0 to 1

comment:3 Changed 13 years ago by compn

  • Resolution set to duplicate
  • Status changed from new to closed

someone look at bug 738
for the vbr mp3 patch.

* This bug has been marked as a duplicate of bug 465 *

comment:4 Changed 13 years ago by compn

  • Resolution duplicate deleted
  • Status changed from closed to reopened

oops, ffmpeg is not mplayer... how silly of me.
apologies.

comment:5 Changed 12 years ago by compn

  • Resolution set to remind
  • Status changed from reopened to closed

ffmpeg bugs moved to ffmpeg roundup tracker

https://roundup.mplayerhq.hu/roundup/ffmpeg/issue158

Note: See TracTickets for help on using tickets.