Opened 13 years ago

Closed 9 years ago

#703 closed defect (fixed)

mp3 in wav - wrong duration

Reported by: ami_stuff Owned by:
Priority: minor Component: undetermined
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

File uploaded to incoming.

I think the problem is that ffmpeg reports bitrate 27 kb/s instead of 56 kb/s
(which is correct - winamp reports it), so as a result the reported duration
is two times longer than it should be.

C:\>ffmpeg -i WAVE_MPEG_Layer-3.wav
ffmpeg version N-35295-gb55dd10, Copyright (c) 2000-2011 the FFmpeg developers
  built on Nov 30 2011 00:52:52 with gcc 4.6.2
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-ru
ntime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libope
ncore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --en
able-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger -
-enable-libspeex --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwben
c --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-
libxvid --enable-zlib
  libavutil    51. 29. 1 / 51. 29. 1
  libavcodec   53. 39. 1 / 53. 39. 1
  libavformat  53. 22. 0 / 53. 22. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 50. 0 /  2. 50. 0
  libswscale    2.  1. 0 /  2.  1. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[wav @ 020B2320] max_analyze_duration 5000000 reached at 5015510
Input #0, wav, from 'WAVE_MPEG_Layer-3.wav':
  Duration: 00:05:47.79, bitrate: 27 kb/s
    Stream #0:0: Audio: mp3 (U[0][0][0] / 0x0055), 22050 Hz, stereo, s16, 56 kb/
s
At least one output file must be specified

Change History (4)

comment:1 by Carl Eugen Hoyos, 13 years ago

Priority: normalminor
Reproduced by developer: set
Status: newopen
Version: unspecifiedgit-master

comment:2 by Michael Niedermayer, 12 years ago

the file contains a fact chunk claiming 7668864 samples.
and a sample rate of 22050, these result in 5.79 minutes duration.
Maybe the file is truncated ?

in reply to:  2 comment:3 by ami_stuff, 12 years ago

Replying to michael:

the file contains a fact chunk claiming 7668864 samples.
and a sample rate of 22050, these result in 5.79 minutes duration.
Maybe the file is truncated ?

No, the file is complete, but maybe encoder I've used to create the file was buggy and created file with incorrect fack chunk (on the other hand VLC seems to report correct duration, so maybe it ignores fact chunk and calculates duration from bitrate?).

Last edited 12 years ago by ami_stuff (previous) (diff)

comment:4 by Michael Niedermayer, 9 years ago

Resolution: fixed
Status: openclosed
Note: See TracTickets for help on using tickets.