Opened 5 years ago

Closed 3 years ago

Last modified 3 weeks ago

#625 closed enhancement (fixed)

support 2/3/5bit IMA ADPCM

Reported by: ami_stuff Owned by:
Priority: wish Component: avcodec
Version: git-master Keywords: adpcm roundup
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

(issue 1598)

C:\>ffmpeg -i IMAADPCM_2bits.wav
ffmpeg version N-34318-g8475ec1, Copyright (c) 2000-2011 the FFmpeg developers
  built on Oct 31 2011 17:50:05 with gcc 4.6.1
  configuration: --enable-gpl --enable-version3 --enable-runtime-cpudetect --ena
ble-avisynth --enable-bzlib --enable-frei0r --enable-libopencore-amrnb --enable-
libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame --ena
ble-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --en
able-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib

  libavutil    51. 22. 0 / 51. 22. 0
  libavcodec   53. 26. 0 / 53. 26. 0
  libavformat  53. 18. 0 / 53. 18. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 45. 3 /  2. 45. 3
  libswscale    2.  1. 0 /  2.  1. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[adpcm_ima_wav @ 020A90C0] Only 4-bit ADPCM IMA WAV files are supported
[wav @ 020A2320] parser not found for codec adpcm_ima_wav, packets or times may
be invalid.
[adpcm_ima_wav @ 020A90C0] Only 4-bit ADPCM IMA WAV files are supported
    Last message repeated 26 times
[wav @ 020A2320] Could not find codec parameters (Audio: adpcm_ima_wav ([17][0][
0][0] / 0x0011), 44100 Hz, 2 channels, 352 kb/s)
IMAADPCM_2bits.wav: could not find codec parameters

Attachments (11)

IMAADPCM_2bits.wav (107.7 KB) - added by ami_stuff 5 years ago.
IMAADPCM_3bits.wav (161.5 KB) - added by ami_stuff 5 years ago.
IMAADPCM_5bits.wav (269.1 KB) - added by ami_stuff 5 years ago.
adpcm.jpg (162.7 KB) - added by ami_stuff 3 years ago.
mono.rar (1.5 MB) - added by ami_stuff 3 years ago.
2bit_mono.wav (324.4 KB) - added by ami_stuff 3 years ago.
3bit_mono.wav (486.5 KB) - added by ami_stuff 3 years ago.
5bit_mono.wav (810.6 KB) - added by ami_stuff 3 years ago.
out_IMAADPCM_2bits.wav (858.1 KB) - added by ami_stuff 3 weeks ago.
out_IMAADPCM_3bits.wav (858.1 KB) - added by ami_stuff 3 weeks ago.
out_IMAADPCM_2bits.2.wav (858.1 KB) - added by ami_stuff 3 weeks ago.

Change History (39)

Changed 5 years ago by ami_stuff

Changed 5 years ago by ami_stuff

Changed 5 years ago by ami_stuff

comment:1 Changed 5 years ago by cehoyos

  • Component changed from undetermined to avcodec
  • Priority changed from normal to wish
  • Reproduced by developer set
  • Status changed from new to open
  • Version changed from unspecified to git-master

comment:2 Changed 5 years ago by cehoyos

  • Keywords adpcm added

comment:3 Changed 4 years ago by cehoyos

  • Keywords roundup added

comment:4 follow-up: Changed 4 years ago by richardpl

What created such files?

comment:5 in reply to: ↑ 4 Changed 4 years ago by ami_stuff

comment:6 Changed 3 years ago by ami_stuff

more info (see attached jpg)

Changed 3 years ago by ami_stuff

comment:7 Changed 3 years ago by richardpl

Useless, i need specification so I can know what tables are used for non 4-bit cases. And I'm not going to hunt for big applications that can encode/decode such files. So something small as dll that does actual decoding or even better specification is required.

comment:11 follow-up: Changed 3 years ago by richardpl

The last one is most useful. Could you also upload mono files (created with same tool)?

Changed 3 years ago by ami_stuff

comment:12 in reply to: ↑ 11 Changed 3 years ago by ami_stuff

Replying to richardpl:

Could you also upload mono files (created with same tool)?

Attached.

comment:13 follow-up: Changed 3 years ago by richardpl

I can't accept rar. Please use somthing more sane like xz/zip-7/gz/bzip

comment:14 in reply to: ↑ 13 Changed 3 years ago by ami_stuff

Replying to richardpl:

I can't accept rar. Please use somthing more sane like xz/zip-7/gz/bzip

I'm not sure what does it mean? You don't like rar archive or what? UnRAR is available for linux and AFAICT p7zip decompress it as well.

Version 1, edited 3 years ago by ami_stuff (previous) (next) (diff)

comment:15 Changed 3 years ago by richardpl

I do not have it installed and do not want to install it, because it is not free.

Changed 3 years ago by ami_stuff

Changed 3 years ago by ami_stuff

Changed 3 years ago by ami_stuff

comment:16 Changed 3 years ago by richardpl

the stereo samples are really strange - layout does not match 4bit case.

comment:17 follow-up: Changed 3 years ago by richardpl

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

Mono files plays fine, for stereo only 2bit and others appears to be incorrectly encoded.

comment:18 in reply to: ↑ 17 Changed 3 weeks ago by ami_stuff

Replying to richardpl:

Mono files plays fine, for stereo only 2bit and others appears to be incorrectly encoded.

attached stereo 3/5bit files plays fine in Cool Edit Pro, would be nice to support this as well ;)

Changed 3 weeks ago by ami_stuff

Changed 3 weeks ago by ami_stuff

comment:19 Changed 3 weeks ago by ami_stuff

attached decoding output from (2bit/3bit):

http://www.fmjsoft.com/awavestudio.html

in case it will help in anything

at least with this software there is no noise in 3bit mode

Last edited 3 weeks ago by ami_stuff (previous) (diff)

comment:20 Changed 3 weeks ago by richardpl

But output is incorrect...

Changed 3 weeks ago by ami_stuff

comment:21 Changed 3 weeks ago by ami_stuff

Yes, but the same happens with mono files, so there is a bug in decoder (it supports 100% correctly only 4-bit mode) - at least it proves that 3bit stereo sample could be decoded not only by cool edit/audition.

here is the mono output:

https://www.datafilehost.com/d/4b69a339

I can upload 36kb dvi plugin from cool edit if you want to investigate this issue.

comment:22 Changed 3 weeks ago by ami_stuff

here is the output in 7z, shouldn't do too many things at once

https://www.datafilehost.com/d/5bfb0a59

Last edited 3 weeks ago by ami_stuff (previous) (diff)

comment:23 Changed 3 weeks ago by richardpl

Not interested, I already lost too much time on this, who knows how cool edit/audition stores samples into bitstream.

comment:24 Changed 3 weeks ago by richardpl

You could check if rockbox decodes stereo 3bit and 5bit files OK.

comment:25 Changed 3 weeks ago by ami_stuff

There is a mention of IMA 3bit here, but I don't know how to test it:

https://fossies.org/dox/oss-v4.2-build2011-src-gpl/ossplay_8h_source.html (AFMT_MS_IMA_ADPCM_3BITS)

Here is Cool Edit manual (DVI/IMA ADPCM):

http://dmt.zjlsedu.org/longresty/301/040/050/L000000000122370.pdf

and I found also this:

https://www.powerdeveloper.org/blog/grzegorz%20kraszewski/did-i-write-something-about-adpcm

Last edited 3 weeks ago by ami_stuff (previous) (diff)

comment:26 Changed 3 weeks ago by ami_stuff

Vox Studio can converrt 3bit stereo sample as well (IMAADPCM_3bits.wav), unfortunately no source code of conversion dll.

http://www.xentec.be/download/download.html

"Download the documentation which describes the calling syntax for the file conversion DLL built into Vox Studio since version 3.0. This also contains a program example. This is for experienced programmers only."

http://www.xentec.be/download/vcdlldoc.zip

It can also save 3bit IMA ADPCM, but only mono AFAICT.

Last edited 3 weeks ago by ami_stuff (previous) (diff)

comment:27 Changed 3 weeks ago by richardpl

Fixed already in master.

comment:28 Changed 3 weeks ago by ami_stuff

thx :)

Note: See TracTickets for help on using tickets.