Opened 12 years ago

Closed 12 years ago

#1777 closed defect (fixed)

Wrong duration for a wavpack sample

Reported by: Alexander Kojevnikov Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: wavpack
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: yes

Description

Summary of the bug:

ffmpeg shows a (very) wrong duration for a wavpack sample.

How to reproduce:

I uploaded the sample to the FTP server as wavpack_bad_duration.wv

% ./ffmpeg -v 9 -loglevel 99 -i wavpack_bad_duration.wv
ffmpeg version N-44494-ge3a1eb9 Copyright (c) 2000-2012 the FFmpeg developers
  built on Sep 15 2012 18:34:49 with gcc 4.2.1 (GCC) 20070831 patched [FreeBSD]
  configuration: 
  libavutil      51. 73.100 / 51. 73.100
  libavcodec     54. 56.100 / 54. 56.100
  libavformat    54. 27.100 / 54. 27.100
  libavdevice    54.  2.100 / 54.  2.100
  libavfilter     3. 16.104 /  3. 16.104
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 15.100 /  0. 15.100
[wv @ 0x8040be400] Format wv probed with size=2048 and score=100
[wv @ 0x8040be400] File position before avformat_find_stream_info() is 32
[wv @ 0x8040be400] All info found
[wv @ 0x8040be400] File position after avformat_find_stream_info() is 26268
Input #0, wv, from '/data/tmp/wavpack_bad_duration.wv':
  Duration: 27:03:11.54, start: 0.000000, bitrate: 0 kb/s
    Stream #0:0, 1, 1/44100: Audio: wavpack, 44100 Hz, stereo, s32
At least one output file must be specified
[AVIOContext @ 0x8041310c0] Statistics: 65696 bytes read, 3 seeks

wvunpack show the correct duration:

% wvunpack -ss wavpack_bad_duration.wv

 WVUNPACK  Hybrid Lossless Audio Decompressor  FreeBSD Version 4.60.1
 Copyright (c) 1998 - 2009 Conifer Software.  All Rights Reserved.


file name:         wavpack_bad_duration.wv
file size:         3122132 bytes
source:            32-bit ints at 44100 Hz
channels:          2 (stereo)
duration:          0:00:30.28
modalities:        lossless
compression:       70.77%
ave bitrate:       825 kbps
encoder version:   4
file wrapper:      none (raw audio)

Change History (6)

comment:1 by Carl Eugen Hoyos, 12 years ago

Keywords: wavpack added
Reproduced by developer: set
Status: newopen

comment:2 by Elon Musk, 12 years ago

Where is the link?

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

Replying to richardpl:

Where is the link?

It's on upload.ffmpeg.org, let me know if you don't have access to the ftp server, I can email the sample.

comment:4 by Elon Musk, 12 years ago

If sample is so small upload it here.

comment:6 by Elon Musk, 12 years ago

Analyzed by developer: set
Component: avcodecavformat
Resolution: fixed
Status: openclosed

Fixed, now it is reported as N/A. The only way to find duration is to seek&parse to the end of the file.

Note: See TracTickets for help on using tickets.