Ticket #1579 (open defect)
fix remuxing of imaadpcm in wav
| Reported by: | ami_stuff | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | avformat |
| Version: | git-master | Keywords: | adpcm wav |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description
ms codec can't decode remuxed file because frame_size is set to 0 with "-acodec copy"
http://samples.mplayerhq.hu/A-codecs/ima-adpcm/test_ima_adpcm.wav
libavformat/riff.c:
} else if (enc->codec_id == CODEC_ID_GSM_MS || enc->codec_id == CODEC_ID_ADPCM_IMA_WAV) {
hdrsize += 2;
bytestream_put_le16(&riff_extradata, frame_size); /* wSamplesPerBlock */
+ av_log(enc, AV_LOG_WARNING, "frame_size: %d\n", frame_size);
C:\>ffmpeg -i test_ima_adpcm.wav -acodec copy out.wav
ffmpeg version N-42891-g9054f6b Copyright (c) 2000-2012 the FFmpeg developers
built on Jul 26 2012 02:25:40 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-w32threads --enable-memalign-hack --enable-runtime-cpudetect
--enable-cross-compile --enable-static --disable-shared --extra-libs='-lws2_32 -
lwinmm -lpthread' --extra-cflags='--static -I/var/www/users/research/ffmpeg/snap
shots/build/include' --extra-ldflags='-static -L/var/www/users/research/ffmpeg/s
napshots/build/lib' --enable-bzlib --enable-zlib --enable-gpl --enable-version3
--enable-nonfree --enable-libx264 --enable-libspeex --enable-libtheora --enable-
libvorbis --enable-libfaac --enable-libxvid --enable-libopencore-amrnb --enable-
libopencore-amrwb --enable-libmp3lame --enable-libvpx --disable-decoder=libvpx
libavutil 51. 65.100 / 51. 65.100
libavcodec 54. 44.101 / 54. 44.101
libavformat 54. 20.100 / 54. 20.100
libavdevice 54. 2.100 / 54. 2.100
libavfilter 3. 3.100 / 3. 3.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
Guessed Channel Layout for Input Stream #0.0 : mono
Input #0, wav, from 'test_ima_adpcm.wav':
Duration: 00:00:06.28, bitrate: 32 kb/s
Stream #0:0: Audio: adpcm_ima_wav ([17][0][0][0] / 0x0011), 8000 Hz, mono, s
16, 32 kb/s
Output #0, wav, to 'out.wav':
Metadata:
encoder : Lavf54.20.100
Stream #0:0: Audio: adpcm_ima_wav ([17][0][0][0] / 0x0011), 8000 Hz, mono, 3
2 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
size= 25kB time=00:00:06.31 bitrate= 32.5kbits/s
video:0kB audio:25kB subtitle:0 global headers:0kB muxing overhead 0.234375%
Change History
comment:2 in reply to: ↑ 1 Changed 10 months ago by ami_stuff
Replying to cehoyos:
Since remuxing appears to succeed: Is there a problem with the resulting file?
Or do I misunderstand?
The problem here is that the remuxed file does not decode with Windows' ima adpcm codec because frame_size is always set to 0.
Note: See
TracTickets for help on using
tickets.



Since remuxing appears to succeed: Is there a problem with the resulting file?
Or do I misunderstand?