Opened 11 years ago

Closed 10 years ago

#2881 closed defect (fixed)

wavpack: CRC error

Reported by: ami_stuff Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: wavpack
Cc: christophe.gisquet@gmail.com Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: yes

Description

http://ffmpeg.org/trac/ffmpeg/raw-attachment/ticket/2880/test.ogg

C:\>ffmpeg -i test.ogg -ar 111111 -t 5 out.wv
ffmpeg version N-55604-gfaf7c35 Copyright (c) 2000-2013 the FFmpeg developers
  built on Aug 17 2013 02:28:27 with gcc 4.5.0 (GCC) 20100414 (Fedora MinGW 4.5.
0-1.fc14)
  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-pthreads --enable-memalign-hack --enable-runtime-cpudetect --
enable-cross-compile --enable-static --disable-shared --extra-libs='-lws2_32 -lw
inmm -lpthread' --extra-cflags='--static -I/var/www/users/research/ffmpeg/snapsh
ots/build/include' --extra-ldflags='-static -L/var/www/users/research/ffmpeg/sna
pshots/build/lib' --enable-bzlib --enable-zlib --enable-gpl --enable-version3 --
enable-nonfree --enable-libx264 --enable-libspeex --enable-libtheora --enable-li
bvorbis --enable-libfaac --enable-libxvid --enable-libopencore-amrnb --enable-li
bopencore-amrwb --enable-libmp3lame --enable-libfreetype --enable-libvpx --disab
le-decoder=libvpx
  libavutil      52. 42.100 / 52. 42.100
  libavcodec     55. 28.100 / 55. 28.100
  libavformat    55. 13.103 / 55. 13.103
  libavdevice    55.  3.100 / 55.  3.100
  libavfilter     3. 82.100 /  3. 82.100
  libswscale      2.  5.100 /  2.  5.100
  libswresample   0. 17.103 /  0. 17.103
  libpostproc    52.  3.100 / 52.  3.100
Input #0, ogg, from 'test.ogg':
  Duration: 00:00:30.01, start: 0.000000, bitrate: 121 kb/s
    Stream #0:0: Audio: vorbis, 44100 Hz, stereo, fltp, 112 kb/s
    Metadata:
      COMMENT         : Processed by SoX
Output #0, wv, to 'out.wv':
  Metadata:
    encoder         : Lavf55.13.103
    Stream #0:0: Audio: wavpack, 111111 Hz, stereo, fltp, 128 kb/s
    Metadata:
      COMMENT         : Processed by SoX
Stream mapping:
  Stream #0:0 -> #0:0 (vorbis -> wavpack)
Press [q] to stop, [?] for help
size=    2520kB time=00:00:05.49 bitrate=3753.7kbits/s
video:0kB audio:2520kB subtitle:0 global headers:0kB muxing overhead 0.003604%
C:\>ffmpeg -i out.wv -f null -
ffmpeg version N-55604-gfaf7c35 Copyright (c) 2000-2013 the FFmpeg developers
  built on Aug 17 2013 02:28:27 with gcc 4.5.0 (GCC) 20100414 (Fedora MinGW 4.5.
0-1.fc14)
  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-pthreads --enable-memalign-hack --enable-runtime-cpudetect --
enable-cross-compile --enable-static --disable-shared --extra-libs='-lws2_32 -lw
inmm -lpthread' --extra-cflags='--static -I/var/www/users/research/ffmpeg/snapsh
ots/build/include' --extra-ldflags='-static -L/var/www/users/research/ffmpeg/sna
pshots/build/lib' --enable-bzlib --enable-zlib --enable-gpl --enable-version3 --
enable-nonfree --enable-libx264 --enable-libspeex --enable-libtheora --enable-li
bvorbis --enable-libfaac --enable-libxvid --enable-libopencore-amrnb --enable-li
bopencore-amrwb --enable-libmp3lame --enable-libfreetype --enable-libvpx --disab
le-decoder=libvpx
  libavutil      52. 42.100 / 52. 42.100
  libavcodec     55. 28.100 / 55. 28.100
  libavformat    55. 13.103 / 55. 13.103
  libavdevice    55.  3.100 / 55.  3.100
  libavfilter     3. 82.100 /  3. 82.100
  libswscale      2.  5.100 /  2.  5.100
  libswresample   0. 17.103 /  0. 17.103
  libpostproc    52.  3.100 / 52.  3.100
Input #0, wv, from 'out.wv':
  Metadata:
    encoder         : Lavf55.13.103
  Duration: 00:00:05.00, start: 0.000000, bitrate: 4129 kb/s
    Stream #0:0: Audio: wavpack, 111111 Hz, stereo, fltp
Output #0, null, to 'pipe:':
  Metadata:
    encoder         : Lavf55.13.103
    Stream #0:0: Audio: pcm_s16le, 111111 Hz, stereo, s16, 3555 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (wavpack -> pcm_s16le)
Press [q] to stop, [?] for help
[wavpack @ 0x2163440] CRC error
size=N/A time=00:00:04.99 bitrate=N/A
video:0kB audio:2170kB subtitle:0 global headers:0kB muxing overhead -100.000990
%

Change History (10)

comment:1 by Carl Eugen Hoyos, 11 years ago

Keywords: wavpack added
Reproduced by developer: set
Status: newopen
Version: unspecifiedgit-master

comment:2 by ami_stuff, 11 years ago

also:

http://samples.mplayerhq.hu/A-codecs/wavpcm/madbear.wav

C:\>ffmpeg -i madbear.wav -ac 3 out.wv
ffmpeg version N-55644-g68b63a3 Copyright (c) 2000-2013 the FFmpeg developers
  built on Aug 20 2013 02:22:54 with gcc 4.5.0 (GCC) 20100414 (Fedora MinGW 4.5.
0-1.fc14)
  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-pthreads --enable-memalign-hack --enable-runtime-cpudetect --
enable-cross-compile --enable-static --disable-shared --extra-libs='-lws2_32 -lw
inmm -lpthread' --extra-cflags='--static -I/var/www/users/research/ffmpeg/snapsh
ots/build/include' --extra-ldflags='-static -L/var/www/users/research/ffmpeg/sna
pshots/build/lib' --enable-bzlib --enable-zlib --enable-gpl --enable-version3 --
enable-nonfree --enable-libx264 --enable-libspeex --enable-libtheora --enable-li
bvorbis --enable-libfaac --enable-libxvid --enable-libopencore-amrnb --enable-li
bopencore-amrwb --enable-libmp3lame --enable-libfreetype --enable-libvpx --disab
le-decoder=libvpx
  libavutil      52. 42.100 / 52. 42.100
  libavcodec     55. 28.100 / 55. 28.100
  libavformat    55. 13.103 / 55. 13.103
  libavdevice    55.  3.100 / 55.  3.100
  libavfilter     3. 82.100 /  3. 82.100
  libswscale      2.  5.100 /  2.  5.100
  libswresample   0. 17.103 /  0. 17.103
  libpostproc    52.  3.100 / 52.  3.100
Guessed Channel Layout for  Input Stream #0.0 : stereo
Input #0, wav, from 'madbear.wav':
  Metadata:
    encoder         : File created by GoldWave.  GoldWave copyright (C) Chris Cr
aig
  Duration: 00:00:06.48, bitrate: 352 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 11025 Hz, stereo, s16
, 352 kb/s
Output #0, wv, to 'out.wv':
  Metadata:
    encoder         : Lavf55.13.103
    Stream #0:0: Audio: wavpack, 11025 Hz, 2.1, s16p, 128 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le -> wavpack)
Press [q] to stop, [?] for help
size=     226kB time=00:00:08.00 bitrate= 231.5kbits/s
video:0kB audio:226kB subtitle:0 global headers:0kB muxing overhead 0.040191%
C:\>ffmpeg -i out.wv -f null -
ffmpeg version N-55644-g68b63a3 Copyright (c) 2000-2013 the FFmpeg developers
  built on Aug 20 2013 02:22:54 with gcc 4.5.0 (GCC) 20100414 (Fedora MinGW 4.5.
0-1.fc14)
  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-pthreads --enable-memalign-hack --enable-runtime-cpudetect --
enable-cross-compile --enable-static --disable-shared --extra-libs='-lws2_32 -lw
inmm -lpthread' --extra-cflags='--static -I/var/www/users/research/ffmpeg/snapsh
ots/build/include' --extra-ldflags='-static -L/var/www/users/research/ffmpeg/sna
pshots/build/lib' --enable-bzlib --enable-zlib --enable-gpl --enable-version3 --
enable-nonfree --enable-libx264 --enable-libspeex --enable-libtheora --enable-li
bvorbis --enable-libfaac --enable-libxvid --enable-libopencore-amrnb --enable-li
bopencore-amrwb --enable-libmp3lame --enable-libfreetype --enable-libvpx --disab
le-decoder=libvpx
  libavutil      52. 42.100 / 52. 42.100
  libavcodec     55. 28.100 / 55. 28.100
  libavformat    55. 13.103 / 55. 13.103
  libavdevice    55.  3.100 / 55.  3.100
  libavfilter     3. 82.100 /  3. 82.100
  libswscale      2.  5.100 /  2.  5.100
  libswresample   0. 17.103 /  0. 17.103
  libpostproc    52.  3.100 / 52.  3.100
[wavpack @ 0x212e280] CRC error
Input #0, wv, from 'out.wv':
  Metadata:
    encoder         : Lavf55.13.103
  Duration: 00:00:06.48, start: 0.000000, bitrate: 285 kb/s
    Stream #0:0: Audio: wavpack, 11025 Hz, 2.1, s16p
Output #0, null, to 'pipe:':
  Metadata:
    encoder         : Lavf55.13.103
    Stream #0:0: Audio: pcm_s16le, 11025 Hz, 2.1, s16, 529 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (wavpack -> pcm_s16le)
Press [q] to stop, [?] for help
[wavpack @ 0x2125140] CRC error
[wavpack @ 0x216b940] CRC error
[wavpack @ 0x2149420] CRC error
[wavpack @ 0x2149800] CRC error
size=N/A time=00:00:00.00 bitrate=N/A
video:0kB audio:0kB subtitle:0 global headers:0kB muxing overhead -inf%
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters i
f used)

comment:3 by Elon Musk, 11 years ago

Component: undeterminedavcodec

comment:4 by ami_stuff, 10 years ago

Fixed?

comment:5 by Christophe, 10 years ago

Cc: christophe.gisquet@gmail.com added

No crc error on Win64 here. Resampler bug fixed since then?

comment:6 by Carl Eugen Hoyos, 10 years ago

$ ffmpeg -i test.ogg -ar 111111 -t 5 out.wv
ffmpeg version N-65707-g00aa2eb Copyright (c) 2000-2014 the FFmpeg developers
  built on Aug 18 2014 01:37:58 with gcc 4.8 (SUSE Linux)
  configuration: --enable-gpl
  libavutil      54.  4.100 / 54.  4.100
  libavcodec     56.  0.101 / 56.  0.101
  libavformat    56.  1.100 / 56.  1.100
  libavdevice    56.  0.100 / 56.  0.100
  libavfilter     5.  0.100 /  5.  0.100
  libswscale      3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  0.100 / 53.  0.100
Input #0, ogg, from 'test.ogg':
  Duration: 00:00:30.01, start: 0.000000, bitrate: 121 kb/s
    Stream #0:0: Audio: vorbis, 44100 Hz, stereo, fltp, 112 kb/s
    Metadata:
      COMMENT         : Processed by SoX
Output #0, wv, to 'out.wv':
  Metadata:
    encoder         : Lavf56.1.100
    Stream #0:0: Audio: wavpack, 111111 Hz, stereo, fltp, 128 kb/s
    Metadata:
      COMMENT         : Processed by SoX
      encoder         : Lavc56.0.101 wavpack
Stream mapping:
  Stream #0:0 -> #0:0 (vorbis (native) -> wavpack (native))
Press [q] to stop, [?] for help
size=    2520kB time=00:00:05.49 bitrate=3753.7kbits/s    
video:0kB audio:2520kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.003565%
$ ffmpeg -err_detect +crccheck -i out.wv -f null -
ffmpeg version N-65707-g00aa2eb Copyright (c) 2000-2014 the FFmpeg developers
  built on Aug 18 2014 01:37:58 with gcc 4.8 (SUSE Linux)
  configuration: --enable-gpl
  libavutil      54.  4.100 / 54.  4.100
  libavcodec     56.  0.101 / 56.  0.101
  libavformat    56.  1.100 / 56.  1.100
  libavdevice    56.  0.100 / 56.  0.100
  libavfilter     5.  0.100 /  5.  0.100
  libswscale      3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  0.100 / 53.  0.100
Input #0, wv, from 'out.wv':
  Metadata:
    encoder         : Lavf56.1.100
  Duration: 00:00:05.00, start: 0.000000, bitrate: 4129 kb/s
    Stream #0:0: Audio: wavpack, 111111 Hz, stereo, fltp
Output #0, null, to 'pipe:':
  Metadata:
    encoder         : Lavf56.1.100
    Stream #0:0: Audio: pcm_s16le, 111111 Hz, stereo, s16, 3555 kb/s
    Metadata:
      encoder         : Lavc56.0.101 pcm_s16le
Stream mapping:
  Stream #0:0 -> #0:0 (wavpack (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[wavpack @ 0x2cbdaa0] CRC error
size=N/A time=00:00:04.99 bitrate=N/A    
video:0kB audio:2170kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

comment:7 by Christophe, 10 years ago

OK indeed, I missed the "-err_detect +crccheck", so bug still valid.

comment:8 by Christophe, 10 years ago

Analyzed by developer: set
Component: avcodecavformat
Keywords: wvdec added

The issue stems from the last packet being parsed by lavf/wvdec.c:wv_read_packet but never reaching the decoder. The decoded sample misses the samples in that last packet.

Version 0, edited 10 years ago by Christophe (next)

comment:9 by Christophe, 10 years ago

Component: avformatavcodec
Keywords: wvdec removed

comment:10 by Timothy Gu, 10 years ago

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