Opened 17 years ago

Closed 17 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: no Analyzed by developer: no

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@… 17 years ago.
patch for VBR durations
vbr.2.diff (3.3 KB ) - added by codon1@… 17 years ago.
[PATCH] VBR durations

Download all attachments as: .zip

Change History (7)

by codon1@…, 17 years ago

Attachment: vbr.diff added

patch for VBR durations

comment:1 by codon1@…, 17 years ago

by codon1@…, 17 years ago

Attachment: vbr.2.diff added

[PATCH] VBR durations

comment:2 by codon1@…, 17 years ago

attachments.isobsolete: 01

comment:3 by compn, 17 years ago

Resolution: duplicate
Status: newclosed

someone look at bug 738
for the vbr mp3 patch.

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

comment:4 by compn, 17 years ago

Resolution: duplicate
Status: closedreopened

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

comment:5 by compn, 17 years ago

Resolution: remind
Status: reopenedclosed

ffmpeg bugs moved to ffmpeg roundup tracker

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

Note: See TracTickets for help on using tickets.