Opened 12 years ago
Closed 12 years ago
#2064 closed enhancement (fixed)
Support ADPCM_MS in unknown container
Reported by: | Dennis | Owned by: | |
---|---|---|---|
Priority: | wish | Component: | avformat |
Version: | git-master | Keywords: | adpcm_ms |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
Summary of the bug:
FFmpeg does not recognize ADPCM_MS audio file when audio header is not present.
How to reproduce:
ffmpeg -i radio-orig.wav ffmpeg version N-48065-g6375318 Copyright (c) 2000-2012 the FFmpeg developers built on Dec 21 2012 09:13:20 with gcc 4.7.2 (GCC) configuration: --enable-static --arch=x86_64 --target-os=mingw32 --cross-prefi x=/home/rdp/dev/ffmpeg-windows-build-helpers/sandbox/mingw-w64-x86_64/bin/x86_64 -w64-mingw32- --pkg-config=pkg-config --enable-gpl --enable-libx264 --enable-avi synth --enable-libxvid --enable-libmp3lame --enable-version3 --enable-zlib --ena ble-librtmp --enable-libvorbis --enable-libtheora --enable-libspeex --enable-lib openjpeg --enable-gnutls --enable-libgsm --enable-libfreetype --enable-fontconfi g --enable-libass --enable-libutvideo --enable-libopus --disable-w32threads --en able-frei0r --enable-filter=frei0r --enable-libvo-aacenc --enable-bzlib --enable -libxavs --extra-cflags=-DPTW32_STATIC_LIB --enable-libopencore-amrnb --enable-l ibopencore-amrwb --enable-libvo-amrwbenc --enable-libschroedinger --enable-libbl uray --enable-libvpx --enable-runtime-cpudetect libavutil 52. 12.100 / 52. 12.100 libavcodec 54. 81.100 / 54. 81.100 libavformat 54. 49.102 / 54. 49.102 libavdevice 54. 3.102 / 54. 3.102 libavfilter 3. 29.100 / 3. 29.100 libswscale 2. 1.103 / 2. 1.103 libswresample 0. 17.102 / 0. 17.102 libpostproc 52. 2.100 / 52. 2.100 radio-orig.wav: Invalid data found when processing input ffmpeg -i radio-header.wav ffmpeg version N-48065-g6375318 Copyright (c) 2000-2012 the FFmpeg developers built on Dec 21 2012 09:13:20 with gcc 4.7.2 (GCC) configuration: --enable-static --arch=x86_64 --target-os=mingw32 --cross-prefi x=/home/rdp/dev/ffmpeg-windows-build-helpers/sandbox/mingw-w64-x86_64/bin/x86_64 -w64-mingw32- --pkg-config=pkg-config --enable-gpl --enable-libx264 --enable-avi synth --enable-libxvid --enable-libmp3lame --enable-version3 --enable-zlib --ena ble-librtmp --enable-libvorbis --enable-libtheora --enable-libspeex --enable-lib openjpeg --enable-gnutls --enable-libgsm --enable-libfreetype --enable-fontconfi g --enable-libass --enable-libutvideo --enable-libopus --disable-w32threads --en able-frei0r --enable-filter=frei0r --enable-libvo-aacenc --enable-bzlib --enable -libxavs --extra-cflags=-DPTW32_STATIC_LIB --enable-libopencore-amrnb --enable-l ibopencore-amrwb --enable-libvo-amrwbenc --enable-libschroedinger --enable-libbl uray --enable-libvpx --enable-runtime-cpudetect libavutil 52. 12.100 / 52. 12.100 libavcodec 54. 81.100 / 54. 81.100 libavformat 54. 49.102 / 54. 49.102 libavdevice 54. 3.102 / 54. 3.102 libavfilter 3. 29.100 / 3. 29.100 libswscale 2. 1.103 / 2. 1.103 libswresample 0. 17.102 / 0. 17.102 libpostproc 52. 2.100 / 52. 2.100 [wav @ 000000000225dfe0] max_analyze_duration 5000000 reached at 5002667 Guessed Channel Layout for Input Stream #0.0 : stereo Input #0, wav, from 'radio-header.wav': Duration: 24:51:18.49, bitrate: 0 kb/s Stream #0:0: Audio: adpcm_ms ([2][0][0][0] / 0x0002), 48000 Hz, stereo, s16, 384 kb/s At least one output file must be specified
Change History (21)
comment:2 by , 12 years ago
Component: | avcodec → undetermined |
---|---|
Keywords: | header removed |
How was radio-orig.wav produced? Which software plays radio-orig.wav ?
comment:3 by , 12 years ago
I do not know how it was produced.
It plays in a video game: Call of Duty Black Ops.
I don't know if they removed the header to save space (doubtful) or for obfuscation purposes.
comment:4 by , 12 years ago
Do I understand you correctly that the file is found as-is on your drive if Call of Duty Black Ops is installed / that the exact file can be found on the DVD?
comment:5 by , 12 years ago
Yes.
The files are inside an archive system, which when read through, make up the file system for the game. You can extract the files with 7-Zip and obtain many more samples. This is most likely an obfuscation attempt.
comment:6 by , 12 years ago
Component: | undetermined → avformat |
---|---|
Reproduced by developer: | set |
Status: | new → open |
Version: | unspecified → git-master |
comment:7 by , 12 years ago
Could you compare the first 64 bytes of a few samples (or provide them)?
At least the sample-rate is stored in a short header afaict, it may be possible to autodetect the format.
comment:8 by , 12 years ago
I will leave it to better men to investigate properly.
For more samples, please feel free to browse the directory of:
http://www.djxmmx.net/ffmpeg/2064/
All original/unmodified samples from the game.
The only file in which I manually added a header is: http://www.djxmmx.net/ffmpeg/2064/radio-header.wav
I can add more samples to that directory if you need.
Just let me know.
Thank you
comment:9 by , 12 years ago
Resolution: | → invalid |
---|---|
Status: | open → closed |
This bug report is pure nonsense. There is no way to support something that can be anything...
If you want support for raw generic (de)muxer where you manually specify audio codec parameters please open new bug report.
comment:11 by , 12 years ago
Summary: | Missing ADPCM_MS header → raw audio demuxer |
---|
comment:14 by , 12 years ago
What do you mean with headerless?
Afaict, the files contain a header that at least shows the number of channels and the samplerate in the file (afaiu, this is essential for decoding).
Or do I misunderstand?
comment:15 by , 12 years ago
Even if you assumption is correct there is still no way to automagically conclude that it have adpcm.
comment:16 by , 12 years ago
Summary: | raw audio demuxer → Support ADPCM_MS in unknown container |
---|
Maybe "30 08" tells us or the file format only supports adpcm_ms?
Since so far we only have adpcm_ms samples, the assumption looks not dangerous to me in any way.
comment:17 by , 12 years ago
Only 2 bytes? That is hardly useful. How would you name your new demuxer? 3008?
comment:18 by , 12 years ago
wav also uses two bytes to identify the codec...
Or do you mean the probing of the file?
Apart from the fact that demuxers without probe function exist, the header is quite long, so it should be possible to write a probe function that is at least not less strict than other existing probe functions.
comment:21 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Implemented by Michael, if any additional information is available like the actual file format name or if other codecs can be used, please share it!
Original file:
http://www.djxmmx.net/ffmpeg/2064/radio-orig.wav
File with ADPCM_MS header manually added:
http://www.djxmmx.net/ffmpeg/2064/radio-header.wav