Opened 3 years ago

Closed 2 years ago

#2893 closed defect (fixed)

Decoding some old Vorbis encodes fails

Reported by: Case Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: ogg vorbis
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary of the bug:
FFmpeg decoding fails with certain Ogg Vorbis files. The file has some granulepos problems as reported by ogginfo tool, but even after fixing them with revorb (a stream rewriting program) the decoding still fails. Official oggdec tool has no problems with the sample before or after the stream rewrite.

How to reproduce:
I uploaded a sample file with name vorbis_fails_to_decode.ogg to the FTP server.

% ffmpeg -v 9 -loglevel 99 -i vorbis_fails_to_decode.ogg out.wav
ffmpeg version N-55727-gdd1d29b Copyright (c) 2000-2013 the FFmpeg developers
  built on Aug 23 2013 14:50:42 with gcc 4.8.0 (GCC)
  configuration: --arch=x86_64 --target-os=mingw32 --cross-prefix=/home/jmh/ffmpeg/sandbox/mingw-w64-x86_64/bin/x86_64-w64-mingw32- --pkg-config=pkg-config --en
able-gpl --enable-libsoxr --enable-libx264 --enable-avisynth --enable-libxvid --enable-libmp3lame --enable-version3 --enable-zlib --enable-librtmp --enable-libv
orbis --enable-libtheora --enable-libspeex --enable-libopenjpeg --enable-gnutls --enable-libgsm --enable-libfreetype --enable-fontconfig --enable-libass --enabl
e-libutvideo --enable-libopus --disable-w32threads --enable-frei0r --enable-filter=frei0r --enable-libvo-aacenc --enable-bzlib --enable-libxavs --extra-cflags=-
DPTW32_STATIC_LIB --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libschroedinger --enable-libbluray --enable-libvpx --en
able-libilbc --enable-static --disable-shared --enable-nonfree --enable-libfdk-aac --enable-runtime-cpudetect
  libavutil      52. 42.100 / 52. 42.100
  libavcodec     55. 29.100 / 55. 29.100
  libavformat    55. 14.102 / 55. 14.102
  libavdevice    55.  3.100 / 55.  3.100
  libavfilter     3. 82.102 /  3. 82.102
  libswscale      2.  5.100 /  2.  5.100
  libswresample   0. 17.103 /  0. 17.103
  libpostproc    52.  3.100 / 52.  3.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'.
Reading option '-i' ... matched as input file with argument 'vorbis_fails_to_decode.ogg'.
Reading option 'out.wav' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 9.
Successfully parsed a group of options.
Parsing a group of options: input file vorbis_fails_to_decode.ogg.
Successfully parsed a group of options.
Opening an input file: vorbis_fails_to_decode.ogg.
[ogg @ 0000000003cd40a0] Format ogg probed with size=2048 and score=100
[ogg @ 0000000003cd40a0] File position before avformat_find_stream_info() is 7980
[vorbis @ 0000000003cd4900]  Invalid code lengths while generating vlcs.
[vorbis @ 0000000003cd4900]  Vorbis setup header packet corrupt (codebooks).
[vorbis @ 0000000003cd4900] Setup header corrupt.
[vorbis @ 0000000003cd4900]  Invalid code lengths while generating vlcs.
[vorbis @ 0000000003cd4900]  Vorbis setup header packet corrupt (codebooks).
[vorbis @ 0000000003cd4900] Setup header corrupt.
[ogg @ 0000000003cd40a0] All info found
[ogg @ 0000000003cd40a0] File position after avformat_find_stream_info() is 7980
Guessed Channel Layout for  Input Stream #0.0 : stereo
Input #0, ogg, from 'vorbis_fails_to_decode.ogg':
  Duration: 00:03:31.42, start: 0.000000, bitrate: 102 kb/s
    Stream #0:0, 1, 1/44100: Audio: vorbis, 44100 Hz, stereo, fltp, 96 kb/s
    Metadata:
      TITLE           : Lady
      ARTIST          : After School Blue
      ALBUM           : The 4th Single Album - BLUE
      DATE            : 2011
      COMMENT         : kor
      track           : 2
Successfully opened the file.
Parsing a group of options: output file out.wav.
Successfully parsed a group of options.
Opening an output file: out.wav.
Successfully opened the file.
detected 8 logical cores
[graph 0 input from stream 0:0 @ 0000000003cd34e0] Setting 'time_base' to value '1/44100'
[graph 0 input from stream 0:0 @ 0000000003cd34e0] Setting 'sample_rate' to value '44100'
[graph 0 input from stream 0:0 @ 0000000003cd34e0] Setting 'sample_fmt' to value 'fltp'
[graph 0 input from stream 0:0 @ 0000000003cd34e0] Setting 'channel_layout' to value '0x3'
[graph 0 input from stream 0:0 @ 0000000003cd34e0] tb:1/44100 samplefmt:fltp samplerate:44100 chlayout:0x3
[audio format for output stream 0:0 @ 0000000002148940] Setting 'sample_fmts' to value 's16'
[audio format for output stream 0:0 @ 0000000002148940] auto-inserting filter 'auto-inserted resampler 0' between the filter 'Parsed_anull_0' and the filter 'au
dio format for output stream 0:0'
[AVFilterGraph @ 0000000002146500] query_formats: 4 queried, 6 merged, 3 already done, 0 delayed
[auto-inserted resampler 0 @ 0000000002148d80] ch:2 chl:stereo fmt:fltp r:44100Hz -> ch:2 chl:stereo fmt:s16 r:44100Hz
[vorbis @ 0000000003cd4900]  Invalid code lengths while generating vlcs.
[vorbis @ 0000000003cd4900]  Vorbis setup header packet corrupt (codebooks).
[vorbis @ 0000000003cd4900] Setup header corrupt.
Output #0, wav, to 'out.wav':
    Stream #0:0, 0, 1/90000: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
    Metadata:
      TITLE           : Lady
      ARTIST          : After School Blue
      ALBUM           : The 4th Single Album - BLUE
      DATE            : 2011
      COMMENT         : kor
      track           : 2
Stream mapping:
  Stream #0:0 -> #0:0 (vorbis -> pcm_s16le)
Error while opening decoder for input stream #0:0 : Invalid data found when processing input
[AVIOContext @ 000000000214ee60] Statistics: 0 seeks, 0 writeouts
[AVIOContext @ 0000000002146a20] Statistics: 130843 bytes read, 3 seeks

Change History (3)

comment:1 Changed 3 years ago by cehoyos

  • Component changed from undetermined to avcodec
  • Keywords decoding removed
  • Priority changed from normal to wish
  • Reproduced by developer set
  • Status changed from new to open
  • Type changed from defect to enhancement

comment:2 Changed 3 years ago by dbuitenh

  • Priority changed from wish to normal
  • Type changed from enhancement to defect

Sorry, this is a defect. It fails with valid ogg vorbis files.

comment:3 Changed 2 years ago by michael

  • Resolution set to fixed
  • Status changed from open to closed
Note: See TracTickets for help on using tickets.