I observed that in some rare cases, when I use jwplayer to play a recorded stream, I cannot hear any sound. So I grabbed the archived file and use ffprobe to analyze the file:
~$ ffprobe temp.flv
FFprobe version SVN-r23840, Copyright (c) 2007-2010 the FFmpeg developers
...
libavutil 50.19. 0 / 50.19. 0
libavcodec 52.78. 0 / 52.78. 0
libavformat 52.71. 0 / 52.71. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.20. 1 / 1.20. 1
libswscale 0.11. 0 / 0.11. 0
[aac @ 0x101012e00] channel element 1.0 is not allocated
Last message repeated 8656 times
[flv @ 0x101011c00] Estimating duration from bitrate, this may be inaccurate
Input #0, flv, from 'temp.flv':
The file is playable in mplayer despite of the following messages:
[aac @ 0x10186d200] channel element 1.0 is not allocated
Last message repeated 8656 times
[flv @ 0x102010c00] Estimating duration from bitrate, this may be inaccurate
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0
VIDEO: [H264] 320x240 0bpp 15.000 fps 0.0 kbps ( 0.0 kbyte/s)
Clip info:
duration: 0
creationdate: Fri Jun 25 14:27:46
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
Unsupported LATM configuration: 1 programs/ 2 subframes, 3 layers, allstreams: 1
versionA not supported
versionA not supported
Unsupported LATM configuration: 1 programs/ 2 subframes, 3 layers, allstreams: 1
versionA not supported
versionA not supported
I then manually parsed the flv file, I found the AAC header packet is missing. In the other word,
faacEncGetDecoderSpecificInfo(hEncoder, &extra, &extra_size);
the “extra_size” octets in “extra” are missing.
It is usually the first audio packet sent through RTMP audio channel, but due to some unknown reason, it is lost. That’s why Flash Player cannot play it: it failed to recognize the information required to decode it.
It is quite hard to reproduce the problem. wowza is set up on my localhost, so I don’t think it is network-latency-related.
Is it possible for wowza to provide a valid AAC header when it does not exist?
Thanks.