[FFmpeg-devel] dvi_adpcm (0x0011) audio conversion problems

kent.elyue at gmail.com kent.elyue
Sun Jul 29 17:44:10 CEST 2007


Hello.

I'm using win2k and I am trying to convert some avi files from the game Zork Nemesis into a different format so the game can be played on newer OS's. Converting the video portion is easy enough and can be done various ways. The problem is that these particular avi's have audio tracks that are encoded in dvi_adpcm (0x0011) Intel Corporation format (as reported by Gspot).

The version of FFmpeg I am using is this:  version SVN-r7260, libavutil version: 49.1.0, libavcodec version: 51.26.0, libavformat version: 51.6.0, built on Dec  8 2006 17:40:35, gcc: 4.0.3

ffmpeg has this to say regarding the audio track
Stream #0.1: Audio: adpcm_ima_wav, 22050 Hz, stereo, 352 kb/s
During an attempt to use ffmpeg to reencode the avi (from DUCK Trumotion video and ADPCM audio to mpeg4 and mp3) the following type of error is reported 100's of times over:

[adpcm_ima_wav @ 0090DD60]ERROR: step_index = 255
[adpcm_ima_wav @ 0090DD60]unused byte should be null but is 255!!
[adpcm_ima_wav @ 0090DD60]ERROR: step_index = 165
[adpcm_ima_wav @ 0090DD60]unused byte should be null but is 146!!
[adpcm_ima_wav @ 0090DD60]ERROR: step_index = 167
[adpcm_ima_wav @ 0090DD60]unused byte should be null but is 168!!
[adpcm_ima_wav @ 0090DD60]ERROR: step_index = 143
[adpcm_ima_wav @ 0090DD60]unused byte should be null but is 167!!
...and so on
The video stream converts perfectly. The audio results in sheer static screech.

Gspot reports that the bitrate is "353 kb/s (176/ch, stereo)" and that the rendering attempt succeeded and the file should play fine, but in fact it doesn't. I would suspect that the file itself is faulty, except that 1) the file is the intro.avi from the Zork Nemesis game, 2) there are dozens of these type of files used in the game, and 3) the game including the full-sound avi's play fine in DOS and Windows95. 

FWIW, I can strip the audio stream from the avi using AviMuxGui, and the stripped stream is in raw data format (audio.raw). The info I can get (from AVIMux_GUI v1.17.5) regarding the audio stream is this:

audio stream: 1 (Stream 1)
  bitrate                  :          352,800 Bit/s
  size of stream (strh)    :            4,048 units ? 1024 bytes
  size of stream (index)   :        4,145,152 bytes
  number of chunks         :            1,410
  format-tag               :           0x0011
  sampling rate            :           22,050
  channels                 :                2
  suggested buffer size    :           11,264

However, I have yet to find anything (Win OS) that can properly open, convert, or play the audio stream or the original avi. It seems as though decoding support for Nemesis was built right into the exe. The best I have been able to find is a Linux Shell archive.  ftp://ftp.cwi.nl/pub/audio/adpcm.shar 

I have done extensive reasearch into this, googling for hours, reading various forums, etc, but cannot find a solution as of yet. I have discovered explicit details regarding the codec here (about halfway down the page):
http://www.saettler.com/RIFFNEW/RIFFNEW.htm   

Can anyone help, please?

-kent



More information about the ffmpeg-devel mailing list