[Libav-user] Misidentification of data stream as AAC_LATM
Andrew Magill
Andrew.Magill at exelisvis.com
Fri Mar 1 02:29:13 CET 2013
I'm working on improving my software's video functionality and
upgrading it to support the latest versions of FFmpeg, and I've run into
a little problem. One of my requirements is to be able to return the
raw packet data from any data streams in a video file, but the newer
versions of FFmpeg are misidentifying my test video's data streams as
audio AAC_LATM.
I believe the culprit is commits 47818b2a ("Add LOAS demuxer.") and
7bdc5de3 ("Autodetect LOAS in transport streams.") on 2011-08-19. See
output from ffprobe below- failing case from a newer version first, then
passing case in an older version. It looks like the new LOAS demuxer's
probe function is stumbling across extremely poor evidence that it can
decode my stream, and is reporting that as a confidence of 1.
Could it be considered a bug that LOAS is being a little overzealous
by misidentifying my stream with minimum confidence? It seems better
for the probes to fail than to pass with such a poor match.
Looking at the probe function a little closer, it seems that any
stream that contains a 16-bit value 0x56E0-0x56FF at any byte alignment
will result in a confidence of at least 1. The odds of encountering
that sequence in random data is about 1/2048, so with probe sizes of
2500 bytes, odds are better than half that it will return a confidence
of 1 rather than 0.
Might I suggest eliminating the (max_frames>=1) condition, or
increasing its threshold to 2?
ffmpeg-git-276f43b-win32-shared\bin\ffprobe.exe foo.mpg -loglevel debug
ffprobe version N-32071-g276f43b, Copyright (c) 2007-2011 the FFmpeg
developers
built on Aug 23 2011 11:03:02 with gcc 4.6.1
configuration: --disable-static --enable-shared --disable-outdev=sdl
--enable-gpl --enable-version3 --enable-memalign-hack
--enable-runtime-cpudetect --enable-avisynth --enable-bzlib
--enable-frei0r --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libfreetype --enable-libgsm --enable-libmp3lame
--enable-libopenjpeg --enable-librtmp --enable-libschroedinger
--enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx
--enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 51. 13. 0 / 51. 13. 0
libavcodec 53. 11. 0 / 53. 11. 0
libavformat 53. 9. 0 / 53. 9. 0
libavdevice 53. 3. 0 / 53. 3. 0
libavfilter 2. 34. 2 / 2. 34. 2
libswscale 2. 0. 0 / 2. 0. 0
libpostproc 51. 2. 0 / 51. 2. 0
[mpegts @ 0060F100] Format mpegts probed with size=2048 and score=100
[mpegts @ 0060F100] stream=0 stream_type=1b pid=21 prog_reg_desc=
[mpegts @ 0060F100] stream=1 stream_type=15 pid=1f2 prog_reg_desc=
[h264 @ 01D6A5A0] Unsupported bit depth: 0 [mpegts @ 0060F100]
Continuity Check Failed
[h264 @ 01D6A5A0] no picture
[mpegts @ 0060F100] probing stream 1 pp:2500 [mpegts @ 0060F100] probing
stream 1 pp:2499 [mpegts @ 0060F100] Probe with size=2299, packets=2
detected loas with score=1 [mpegts @ 0060F100] probing stream 1 pp:2498
[mpegts @ 0060F100] probing stream 1 pp:2497 [mpegts @ 0060F100] Probe
with size=4601, packets=4 detected loas with score=1 [mpegts @ 0060F100]
probed stream 1 [mpegts @ 0060F100] max_analyze_duration 5000000 reached
at 5000000 [NULL @ 01D6C2A0] start time is not set in
estimate_timings_from_pts [mpegts @ 0060F100] Continuity Check Failed
Input #0, mpegts, from 'foo.mpg':
Duration: 00:00:46.38, start: 0.572222, bitrate: 6223 kb/s
Program 1
Stream #0.0[0x21], 302, 1/90000: Video: h264 (Main) ([27][0][0][0] /
0x001B), yuv420p, 1280x720 [SAR 10:11 DAR 160:99], 1/120, 60 fps, 60
tbr, 90k tbn, 120 tbc
Stream #0.1[0x1f2], 0, 1/90000: Audio: aac_latm ([21][0][0][0] /
0x0015), 0 channels [aac_latm @ 01D6C2A0] Unsupported bit depth: 0
ffmpeg-git-41bf67d-win32-shared\bin\ffprobe.exe foo.mpg -loglevel debug
ffprobe version N-31932-g41bf67d, Copyright (c) 2007-2011 the FFmpeg
developers
built on Aug 16 2011 18:55:50 with gcc 4.6.1
configuration: --disable-static --enable-shared --disable-outdev=sdl
--enable-gpl --enable-version3 --enable-memalign-hack
--enable-runtime-cpudetect --enable-avisynth --enable-bzlib
--enable-frei0r --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libfreetype --enable-libgsm --enable-libmp3lame
--enable-libopenjpeg --enable-librtmp --enable-libschroedinger
--enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx
--enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 51. 12. 0 / 51. 12. 0
libavcodec 53. 10. 0 / 53. 10. 0
libavformat 53. 7. 0 / 53. 7. 0
libavdevice 53. 3. 0 / 53. 3. 0
libavfilter 2. 31. 1 / 2. 31. 1
libswscale 2. 0. 0 / 2. 0. 0
libpostproc 51. 2. 0 / 51. 2. 0
[mpegts @ 006FF100] Format mpegts probed with size=2048 and score=100
[mpegts @ 006FF100] stream=0 stream_type=1b pid=21 prog_reg_desc=
[mpegts @ 006FF100] stream=1 stream_type=15 pid=1f2 prog_reg_desc=
[h264 @ 0060A5A0] Unsupported bit depth: 0 [mpegts @ 006FF100]
Continuity Check Failed
[h264 @ 0060A5A0] no picture
[mpegts @ 006FF100] probing stream 1 pp:2500 [mpegts @ 006FF100] probing
stream 1 pp:2499 [mpegts @ 006FF100] probing stream 1 pp:2498 [mpegts @
006FF100] probing stream 1 pp:2497 [mpegts @ 006FF100] probed stream 1
failed [mpegts @ 006FF100] max_analyze_duration 5000000 reached at
5000000 [mpegts @ 006FF100] Continuity Check Failed Input #0, mpegts,
from 'foo.mpg':
Duration: 00:00:46.95, start: 0.000000, bitrate: 6147 kb/s
Program 1
Stream #0.0[0x21], 302, 1/90000: Video: h264 (Main), yuv420p,
1280x720 [SAR 10:11 DAR 160:99], 1/120, 60 fps, 60 tbr, 90k tbn, 120 tbc
Stream #0.1[0x1f2], 3, 1/90000: Data: [21][0][0][0] / 0x0015
Unsupported codec with id 0 for input stream 1
Thanks!
Andrew Magill
More information about the Libav-user
mailing list