Opened 4 years ago

Last modified 4 years ago

#1965 open defect

mmf: support correctly formats ma-3/5/7

Reported by: ami_stuff Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: adpcm smaf
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

When I remove these check form "libavformat/mmf.c" then ma-3/5/7 samples decodes, but sample rate (and channels count for stereo files) is identified incorrectly.

    /* Tag = "ATRx", where "x" = track number */
-   if ((tag & 0xffffff) == MKTAG('M', 'T', 'R', 0)) {
-        av_log(s, AV_LOG_ERROR, "MIDI like format found, unsupported\n");
-        return -1;
-    } 
-    if ((tag & 0xffffff) != MKTAG('A', 'T', 'R', 0)) {
-        av_log(s, AV_LOG_ERROR, "Unsupported SMAF chunk %08x\n", tag);
-        return -1;
-    }




    /* Make sure it's followed by an Awa chunk, aka wave data */
-    if ((tag & 0xffffff) != MKTAG('A', 'w', 'a', 0)) {
-        av_log(s, AV_LOG_ERROR, "Unexpected SMAF chunk %08x\n", tag);
-        return -1;
C:\>ffmpeg -i ma3.mmf
ffmpeg version N-46755-ge70144c Copyright (c) 2000-2012 the FFmpeg developers
  built on Nov 15 2012 02:38:20 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      52.  6.100 / 52.  6.100
  libavcodec     54. 71.100 / 54. 71.100
  libavformat    54. 36.100 / 54. 36.100
  libavdevice    54.  3.100 / 54.  3.100
  libavfilter     3. 23.100 /  3. 23.100
  libswscale      2.  1.102 /  2.  1.102
  libswresample   0. 16.100 /  0. 16.100
  libpostproc    52.  1.100 / 52.  1.100
[mmf @ 0x1edc280] MIDI like format found, unsupported
ma3.mmf: Operation not permitted

Attachments (10)

ma2_mono_8khz.mmf (117.4 KB) - added by ami_stuff 4 years ago.
ma3_mono_8khz.mmf (117.4 KB) - added by ami_stuff 4 years ago.
ma5_mono_8khz.mmf (117.4 KB) - added by ami_stuff 4 years ago.
ma5_stereo_8khz.mmf (234.7 KB) - added by ami_stuff 4 years ago.
ma7_mono_8khz.mmf (117.5 KB) - added by ami_stuff 4 years ago.
ma7_stereo_8khz.mmf (234.7 KB) - added by ami_stuff 4 years ago.
ma1_midi.mmf (1.5 KB) - added by ami_stuff 4 years ago.
ma2_midi.mmf (6.0 KB) - added by ami_stuff 4 years ago.
ma3_midi.mmf (5.0 KB) - added by ami_stuff 4 years ago.
ma5_midi.mmf (5.0 KB) - added by ami_stuff 4 years ago.

Download all attachments as: .zip

Change History (16)

Changed 4 years ago by ami_stuff

Changed 4 years ago by ami_stuff

Changed 4 years ago by ami_stuff

Changed 4 years ago by ami_stuff

Changed 4 years ago by ami_stuff

Changed 4 years ago by ami_stuff

comment:1 Changed 4 years ago by cehoyos

  • Keywords adpcm mmf added
  • Reproduced by developer set
  • Status changed from new to open
  • Version changed from unspecified to git-master

comment:2 Changed 4 years ago by cehoyos

  • Keywords smaf added; mmf removed

Changed 4 years ago by ami_stuff

Changed 4 years ago by ami_stuff

Changed 4 years ago by ami_stuff

Changed 4 years ago by ami_stuff

comment:3 Changed 4 years ago by ami_stuff

I attached also the real mmf midi files.

comment:4 Changed 4 years ago by compn

some mmf in sample repo too, never tested them:
http://samples.ffmpeg.org/A-codecs/suite/MMF/

also this one would be nice to know what it really is:
http://samples.ffmpeg.org/A-codecs/format-0x20-laugh.mmf

comment:6 Changed 4 years ago by richardpl

  • Component changed from undetermined to avformat
Note: See TracTickets for help on using tickets.