[FFmpeg-trac] #1638(avformat:open): SWF demuxer cannot correctly identify MP3 stream

FFmpeg trac at avcodec.org
Wed Aug 15 06:21:14 CEST 2012


#1638: SWF demuxer cannot correctly identify MP3 stream
------------------------------------+------------------------------------
             Reporter:  mbradshaw   |                    Owner:
                 Type:  defect      |                   Status:  open
             Priority:  normal      |                Component:  avformat
              Version:  git-master  |               Resolution:
             Keywords:  swf         |               Blocked By:
             Blocking:              |  Reproduced by developer:  1
Analyzed by developer:  0           |
------------------------------------+------------------------------------

Comment (by mbradshaw):

 I've looked into this a bit and I've found the issue, but I'm unsure of
 how to resolve it so I'll give my analysis in the hopes that someone might
 know the best solution (or help me understand the best solution).

 The SWF file has a TAG_STREAMHEAD2 tag, but there is no streaming audio
 (there are no TAG_STREAMBLOCK tags). AFAIK, this is valid, as the
 TAG_STREAMHEAD2 just says what format to expect streamed audio to be in,
 even if it's not present. The TAG_STREAMHEAD2 reports pcm_s16le, 5512 Hz,
 1 channels, 88 kb/s audio, which FFmpeg correctly reads, but it struggles
 from there. I don't know if FFmpeg is rejecting the reported audio format,
 or if it's choking on the fact that there's no TAG_STREAMBLOCK tags.

 Anyway, the audio is not streamed in the frames. Instead, in this file, it
 is found in a DefineSound tag (tag code = 14), and the entire MP3 file is
 stored as part of this tag. FFmpeg does not look for any DefineSound tags.
 I could easily add the necessary code to find and parse a DefineSound tag,
 but I'm unsure of how to properly demux this sound because it's not broken
 up into frames (like audio (TAG_STREAMHEAD(2)) or video (TAG_VIDEOSTREAM)
 streams are). Audio in DefineSound tags come in one solid chunk.

 I could hack it, but I'd rather not write hackish code. Ideas on how to
 (nicely) add demuxing support for DefineSound tags are very welcome!

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1638#comment:2>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list