Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#1660 closed defect (fixed)

alaw: ffplay displays wrong current duration

Reported by: ami_stuff Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: alaw aif
Cc: michael Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no


ffplay displays wrong current duration for alaw (and ulaw) in aiff

C:\>ffmpeg -i alaw.aif out.wav
ffmpeg version N-43678-gceb8773 Copyright (c) 2000-2012 the FFmpeg developers
  built on Aug 18 2012 02:22:03 with gcc 4.5.0 (GCC) 20100414 (Fedora MinGW 4.5.
  configuration: --prefix=/var/www/users/research/ffmpeg/snapshots/build --arch=
x86 --target-os=mingw32 --cross-prefix=i686-pc-mingw32- --cc='ccache i686-pc-min
gw32-gcc' --enable-w32threads --enable-memalign-hack --enable-runtime-cpudetect
--enable-cross-compile --enable-static --disable-shared --extra-libs='-lws2_32 -
lwinmm -lpthread' --extra-cflags='--static -I/var/www/users/research/ffmpeg/snap
shots/build/include' --extra-ldflags='-static -L/var/www/users/research/ffmpeg/s
napshots/build/lib' --enable-bzlib --enable-zlib --enable-gpl --enable-version3
--enable-nonfree --enable-libx264 --enable-libspeex --enable-libtheora --enable-
libvorbis --enable-libfaac --enable-libxvid --enable-libopencore-amrnb --enable-
libopencore-amrwb --enable-libmp3lame --enable-libvpx --disable-decoder=libvpx
  libavutil      51. 70.100 / 51. 70.100
  libavcodec     54. 53.100 / 54. 53.100
  libavformat    54. 25.100 / 54. 25.100
  libavdevice    54.  2.100 / 54.  2.100
  libavfilter     3. 10.100 /  3. 10.100
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
[aiff @ 0x1eace20] max_analyze_duration 5000000 reached at 5015510
Guessed Channel Layout for  Input Stream #0.0 : stereo
Input #0, aiff, from 'alaw.aif':
  Duration: 00:00:12.61, start: 0.000000, bitrate: 705 kb/s
    Stream #0:0: Audio: pcm_alaw (alaw / 0x77616C61), 44100 Hz, stereo, s16, 705
Output #0, wav, to 'out.wav':
    encoder         : Lavf54.25.100
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16
, 1411 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_alaw -> pcm_s16le)
Press [q] to stop, [?] for help
size=    2173kB time=00:00:06.32 bitrate=2815.4kbits/s
video:0kB audio:2173kB subtitle:0 global headers:0kB muxing overhead 0.002067%

Attachments (1)

alaw.aif (1.1 MB) - added by ami_stuff 8 years ago.

Download all attachments as: .zip

Change History (9)

Changed 8 years ago by ami_stuff

comment:1 Changed 8 years ago by cehoyos

  • Keywords alaw aiff added
  • Reproduced by developer set
  • Status changed from new to open
  • Version changed from unspecified to git-master

comment:2 follow-up: Changed 8 years ago by michael

With what was the alaw.aif file generated ?

comment:3 in reply to: ↑ 2 Changed 8 years ago by ami_stuff

Replying to michael:

With what was the alaw.aif file generated ?

QuickTime?, but attached file looks a bit strange because it sontains QDM2's extradata, anyway here is another file with the same problem (wrong current duration) generated by QT:

comment:4 Changed 8 years ago by michael

Fixed the second file, the first looks odd, can you confirm/verify this really was generated by QT and isnt truncated or something ?

comment:5 Changed 8 years ago by michael

  • Cc michael added

comment:6 Changed 8 years ago by ami_stuff

I'm not sure anymore if I used QT directly or maybe some frontend with QT-codecs support, but I have tested "aiffdec: try #2 to fix bps" patch with old ffmpeg snapshot and duration of the file matches now the real conversion duration/time, so looks like this issue is fixed?

(btw. maybe you could look at ticket #204 as well? thanks)

comment:7 Changed 8 years ago by michael

  • Resolution set to fixed
  • Status changed from open to closed

Seems my 2nd fix fixed the first file too :)

comment:8 Changed 8 years ago by cehoyos

  • Component changed from undetermined to avformat
  • Keywords aif added; aiff removed
Note: See TracTickets for help on using tickets.