#3180(undetermined:new): flv demuxer does not decode the aac audio properly
#3180: flv demuxer does not decode the aac audio properly -------------------------------------+------------------------------------- Reporter: merbanan | Type: defect Status: new | Priority: normal Component: | Version: undetermined | unspecified Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- ./ffmpeg -i rtmpt_stream2.flv ffmpeg version N-58535-g58010e5 Copyright (c) 2000-2013 the FFmpeg developers built on Nov 28 2013 21:28:49 with gcc 4.8 (Ubuntu/Linaro 4.8.1-10ubuntu9) configuration: libavutil 52. 55.100 / 52. 55.100 libavcodec 55. 44.100 / 55. 44.100 libavformat 55. 21.102 / 55. 21.102 libavdevice 55. 5.102 / 55. 5.102 libavfilter 3. 91.100 / 3. 91.100 libswscale 2. 5.101 / 2. 5.101 libswresample 0. 17.104 / 0. 17.104 Input #0, flv, from 'rtmpt_stream2.flv': Metadata: Encoder : Omnia A/XE StreamTitle : StreamUrl : Duration: 00:00:11.87, start: 0.000000, bitrate: 35 kb/s Stream #0:0: Audio: aac, 44100 Hz, mono, fltp, 32 kb/s At least one output file must be specified FFmpeg identifies the channels by parsing the aac extra data which indicates that the file is a mono stream. ./ffmpeg -i rtmpt_stream2.flv out.wav ffmpeg version N-58535-g58010e5 Copyright (c) 2000-2013 the FFmpeg developers built on Nov 28 2013 21:28:49 with gcc 4.8 (Ubuntu/Linaro 4.8.1-10ubuntu9) configuration: libavutil 52. 55.100 / 52. 55.100 libavcodec 55. 44.100 / 55. 44.100 libavformat 55. 21.102 / 55. 21.102 libavdevice 55. 5.102 / 55. 5.102 libavfilter 3. 91.100 / 3. 91.100 libswscale 2. 5.101 / 2. 5.101 libswresample 0. 17.104 / 0. 17.104 Input #0, flv, from 'rtmpt_stream2.flv': Metadata: Encoder : Omnia A/XE StreamTitle : StreamUrl : Duration: 00:00:11.87, start: 0.000000, bitrate: 35 kb/s Stream #0:0: Audio: aac, 44100 Hz, mono, fltp, 32 kb/s File 'out.wav' already exists. Overwrite ? [y/N] y Output #0, wav, to 'out.wav': Metadata: StreamUrl : StreamTitle : ISFT : Lavf55.21.102 Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, mono, s16, 705 kb/s Stream mapping: Stream #0:0 -> #0:0 (aac -> pcm_s16le) Press [q] to stop, [?] for help [aac @ 0x1f8b440] Parametric Stereo signaled to be not-present but was found in the bitstream. Last message repeated 248 times size= 1036kB time=00:00:11.91 bitrate= 712.3kbits/s video:0kB audio:1036kB subtitle:0 global headers:0kB muxing overhead 0.007541% Decoding it shows that the aac stream contains parametric stereo. The onMetaData indicates that this stream actually contains a stereo stream. File onMetaData block DEBUG: Property: <Name: duration, NUMBER: 0.00> DEBUG: Property: <Name: audiodatarate, NUMBER: 32.00> DEBUG: Property: <Name: audiosamplerate, NUMBER: 44100.00> DEBUG: Property: <Name: audiosamplesize, NUMBER: 16.00> DEBUG: Property: <Name: stereo, BOOLEAN: TRUE> DEBUG: Property: <Name: audiocodecid, NUMBER: 10.00> DEBUG: Property: <Name: Encoder, STRING: Omnia A/XE> DEBUG: Property: <Name: StreamTitle, STRING: > DEBUG: Property: <Name: StreamUrl, STRING: > So the suggestion is to change the demuxer to replace the aac extra data with a valid version. The replace condition should be based on codec, data rate and stereo flag. -- Ticket URL: <https://trac.ffmpeg.org/ticket/3180> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#3180: flv demuxer does not decode the aac audio properly ------------------------------------+------------------------------------ Reporter: merbanan | Owner: Type: defect | Status: open Priority: normal | Component: avformat Version: git-master | Resolution: Keywords: flv aac | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | ------------------------------------+------------------------------------ Changes (by cehoyos): * status: new => open * component: undetermined => avformat * version: unspecified => git-master * keywords: => flv aac * reproduced: 0 => 1 Old description:
./ffmpeg -i rtmpt_stream2.flv ffmpeg version N-58535-g58010e5 Copyright (c) 2000-2013 the FFmpeg developers built on Nov 28 2013 21:28:49 with gcc 4.8 (Ubuntu/Linaro 4.8.1-10ubuntu9) configuration: libavutil 52. 55.100 / 52. 55.100 libavcodec 55. 44.100 / 55. 44.100 libavformat 55. 21.102 / 55. 21.102 libavdevice 55. 5.102 / 55. 5.102 libavfilter 3. 91.100 / 3. 91.100 libswscale 2. 5.101 / 2. 5.101 libswresample 0. 17.104 / 0. 17.104 Input #0, flv, from 'rtmpt_stream2.flv': Metadata: Encoder : Omnia A/XE StreamTitle : StreamUrl : Duration: 00:00:11.87, start: 0.000000, bitrate: 35 kb/s Stream #0:0: Audio: aac, 44100 Hz, mono, fltp, 32 kb/s At least one output file must be specified
FFmpeg identifies the channels by parsing the aac extra data which indicates that the file is a mono stream.
./ffmpeg -i rtmpt_stream2.flv out.wav ffmpeg version N-58535-g58010e5 Copyright (c) 2000-2013 the FFmpeg developers built on Nov 28 2013 21:28:49 with gcc 4.8 (Ubuntu/Linaro 4.8.1-10ubuntu9) configuration: libavutil 52. 55.100 / 52. 55.100 libavcodec 55. 44.100 / 55. 44.100 libavformat 55. 21.102 / 55. 21.102 libavdevice 55. 5.102 / 55. 5.102 libavfilter 3. 91.100 / 3. 91.100 libswscale 2. 5.101 / 2. 5.101 libswresample 0. 17.104 / 0. 17.104 Input #0, flv, from 'rtmpt_stream2.flv': Metadata: Encoder : Omnia A/XE StreamTitle : StreamUrl : Duration: 00:00:11.87, start: 0.000000, bitrate: 35 kb/s Stream #0:0: Audio: aac, 44100 Hz, mono, fltp, 32 kb/s File 'out.wav' already exists. Overwrite ? [y/N] y Output #0, wav, to 'out.wav': Metadata: StreamUrl : StreamTitle : ISFT : Lavf55.21.102 Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, mono, s16, 705 kb/s Stream mapping: Stream #0:0 -> #0:0 (aac -> pcm_s16le) Press [q] to stop, [?] for help [aac @ 0x1f8b440] Parametric Stereo signaled to be not-present but was found in the bitstream. Last message repeated 248 times size= 1036kB time=00:00:11.91 bitrate= 712.3kbits/s video:0kB audio:1036kB subtitle:0 global headers:0kB muxing overhead 0.007541%
Decoding it shows that the aac stream contains parametric stereo.
The onMetaData indicates that this stream actually contains a stereo stream.
File onMetaData block DEBUG: Property: <Name: duration, NUMBER: 0.00> DEBUG: Property: <Name: audiodatarate, NUMBER: 32.00> DEBUG: Property: <Name: audiosamplerate, NUMBER: 44100.00> DEBUG: Property: <Name: audiosamplesize, NUMBER: 16.00> DEBUG: Property: <Name: stereo, BOOLEAN: TRUE> DEBUG: Property: <Name: audiocodecid, NUMBER: 10.00> DEBUG: Property: <Name: Encoder, STRING: Omnia A/XE> DEBUG: Property: <Name: StreamTitle, STRING: > DEBUG: Property: <Name: StreamUrl, STRING: >
So the suggestion is to change the demuxer to replace the aac extra data with a valid version. The replace condition should be based on codec, data rate and stereo flag.
New description: {{{ ./ffmpeg -i rtmpt_stream2.flv ffmpeg version N-58535-g58010e5 Copyright (c) 2000-2013 the FFmpeg developers built on Nov 28 2013 21:28:49 with gcc 4.8 (Ubuntu/Linaro 4.8.1-10ubuntu9) configuration: libavutil 52. 55.100 / 52. 55.100 libavcodec 55. 44.100 / 55. 44.100 libavformat 55. 21.102 / 55. 21.102 libavdevice 55. 5.102 / 55. 5.102 libavfilter 3. 91.100 / 3. 91.100 libswscale 2. 5.101 / 2. 5.101 libswresample 0. 17.104 / 0. 17.104 Input #0, flv, from 'rtmpt_stream2.flv': Metadata: Encoder : Omnia A/XE StreamTitle : StreamUrl : Duration: 00:00:11.87, start: 0.000000, bitrate: 35 kb/s Stream #0:0: Audio: aac, 44100 Hz, mono, fltp, 32 kb/s At least one output file must be specified FFmpeg identifies the channels by parsing the aac extra data which indicates that the file is a mono stream. ./ffmpeg -i rtmpt_stream2.flv out.wav ffmpeg version N-58535-g58010e5 Copyright (c) 2000-2013 the FFmpeg developers built on Nov 28 2013 21:28:49 with gcc 4.8 (Ubuntu/Linaro 4.8.1-10ubuntu9) configuration: libavutil 52. 55.100 / 52. 55.100 libavcodec 55. 44.100 / 55. 44.100 libavformat 55. 21.102 / 55. 21.102 libavdevice 55. 5.102 / 55. 5.102 libavfilter 3. 91.100 / 3. 91.100 libswscale 2. 5.101 / 2. 5.101 libswresample 0. 17.104 / 0. 17.104 Input #0, flv, from 'rtmpt_stream2.flv': Metadata: Encoder : Omnia A/XE StreamTitle : StreamUrl : Duration: 00:00:11.87, start: 0.000000, bitrate: 35 kb/s Stream #0:0: Audio: aac, 44100 Hz, mono, fltp, 32 kb/s File 'out.wav' already exists. Overwrite ? [y/N] y Output #0, wav, to 'out.wav': Metadata: StreamUrl : StreamTitle : ISFT : Lavf55.21.102 Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, mono, s16, 705 kb/s Stream mapping: Stream #0:0 -> #0:0 (aac -> pcm_s16le) Press [q] to stop, [?] for help [aac @ 0x1f8b440] Parametric Stereo signaled to be not-present but was found in the bitstream. Last message repeated 248 times size= 1036kB time=00:00:11.91 bitrate= 712.3kbits/s video:0kB audio:1036kB subtitle:0 global headers:0kB muxing overhead 0.007541% }}} Decoding it shows that the aac stream contains parametric stereo. The onMetaData indicates that this stream actually contains a stereo stream. File onMetaData block DEBUG: Property: <Name: duration, NUMBER: 0.00> DEBUG: Property: <Name: audiodatarate, NUMBER: 32.00> DEBUG: Property: <Name: audiosamplerate, NUMBER: 44100.00> DEBUG: Property: <Name: audiosamplesize, NUMBER: 16.00> DEBUG: Property: <Name: stereo, BOOLEAN: TRUE> DEBUG: Property: <Name: audiocodecid, NUMBER: 10.00> DEBUG: Property: <Name: Encoder, STRING: Omnia A/XE> DEBUG: Property: <Name: StreamTitle, STRING: > DEBUG: Property: <Name: StreamUrl, STRING: > So the suggestion is to change the demuxer to replace the aac extra data with a valid version. The replace condition should be based on codec, data rate and stereo flag. -- -- Ticket URL: <https://trac.ffmpeg.org/ticket/3180#comment:1> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#3180: flv demuxer does not decode the aac audio properly ------------------------------------+------------------------------------ Reporter: merbanan | Owner: Type: defect | Status: open Priority: normal | Component: avformat Version: git-master | Resolution: Keywords: flv aac | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | ------------------------------------+------------------------------------ Comment (by merbanan): diff --git a/libavcodec/mpeg4audio.c b/libavcodec/mpeg4audio.c index 0fb9b96..2f29408 100644 --- a/libavcodec/mpeg4audio.c +++ b/libavcodec/mpeg4audio.c @@ -125,8 +125,8 @@ int avpriv_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf, c->ext_object_type = get_object_type(&gb); if (c->ext_object_type == AOT_SBR && (c->sbr = get_bits1(&gb)) == 1) c->ext_sample_rate = get_sample_rate(&gb, &c->ext_sampling_index); - if (get_bits_left(&gb) > 11 && get_bits(&gb, 11) == 0x548) - c->ps = get_bits1(&gb); +// if (get_bits_left(&gb) > 11 && get_bits(&gb, 11) == 0x548) +// c->ps = get_bits1(&gb); break; } else get_bits1(&gb); // skip 1 bit This patch makes the file decode properly. -- Ticket URL: <https://trac.ffmpeg.org/ticket/3180#comment:2> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#3180: flv demuxer does not decode the aac audio properly ------------------------------------+------------------------------------ Reporter: merbanan | Owner: Type: defect | Status: closed Priority: normal | Component: avformat Version: git-master | Resolution: fixed Keywords: flv aac | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | ------------------------------------+------------------------------------ Changes (by cehoyos): * status: open => closed * resolution: => fixed Comment: Fixed by Benjamin Larsson since 419787a2 -- Ticket URL: <https://trac.ffmpeg.org/ticket/3180#comment:3> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg