[FFmpeg-trac] #7282(undetermined:new): ffmpeg generates improper HE-AACv2 fMP4 files

FFmpeg trac at avcodec.org
Wed Jul 4 01:14:32 EEST 2018


#7282: ffmpeg generates improper HE-AACv2 fMP4 files
-------------------------------------+-------------------------------------
             Reporter:  ronak2121    |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:
              Version:  git-master   |  undetermined
             Keywords:               |               Resolution:
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0
-------------------------------------+-------------------------------------

Comment (by ronak2121):

 So, I just tested this with your idea of trying re-encoding with this
 output:

 ffmpeg -i test.aac -b:a 32k -r:a 44100 -codec libfdk_aac -profile:a
 aac_he_v2 -bsf:a aac_adtstoasc -hls_time 9.75238095238095
 -hls_segment_type fmp4 -hls_flags single_file+append_list+split_by_time
 -hls_playlist_type vod "test2.m3u8"
 ffmpeg version git-2018-06-23-b86c575 Copyright (c) 2000-2018 the FFmpeg
 developers
   built with Apple LLVM version 9.1.0 (clang-902.0.39.2)
   configuration: --prefix=/usr/local/Cellar/ffmpeg/HEAD-b86c575 --enable-
 shared --enable-pthreads --enable-version3 --enable-hardcoded-tables
 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl
 --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-
 librubberband --enable-libvorbis --enable-libvpx --enable-libx264
 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
 --enable-nonfree
   libavutil      56. 18.102 / 56. 18.102
   libavcodec     58. 20.103 / 58. 20.103
   libavformat    58. 17.101 / 58. 17.101
   libavdevice    58.  4.101 / 58.  4.101
   libavfilter     7. 25.100 /  7. 25.100
   libavresample   4.  0.  0 /  4.  0.  0
   libswscale      5.  2.100 /  5.  2.100
   libswresample   3.  2.100 /  3.  2.100
   libpostproc    55.  2.100 / 55.  2.100
 [aac @ 0x7fed85000000] Estimating duration from bitrate, this may be
 inaccurate
 Input #0, aac, from 'test.aac':
   Duration: 00:10:13.76, bitrate: 30 kb/s
     Stream #0:0: Audio: aac (HE-AACv2), 44100 Hz, stereo, fltp, 30 kb/s
 Stream mapping:
   Stream #0:0 -> #0:0 (aac (native) -> aac (libfdk_aac))
 Press [q] to stop, [?] for help
 [hls @ 0x7fed84012c00] Opening 'test2.m4s' for writing
 Output #0, hls, to 'test2.m3u8':
   Metadata:
     encoder         : Lavf58.17.101
     Stream #0:0: Audio: aac (libfdk_aac) (HE-AACv2), 44100 Hz, stereo,
 s16, 32 kb/s
     Metadata:
       encoder         : Lavc58.20.103 libfdk_aac
 [hls @ 0x7fed84012c00] Opening 'test2.m3u8.tmp' for writing
     Last message repeated 2 times
 [hls @ 0x7fed84012c00] Opening 'test2.m3u8.tmp' for writing
     Last message repeated 2 times
 [hls @ 0x7fed84012c00] Opening 'test2.m3u8.tmp' for writing
     Last message repeated 2 times
 [hls @ 0x7fed84012c00] Opening 'test2.m3u8.tmp' for writing
     Last message repeated 2 times
 [hls @ 0x7fed84012c00] Opening 'test2.m3u8.tmp' for writing
     Last message repeated 2 times
 [hls @ 0x7fed84012c00] Opening 'test2.m3u8.tmp' for writing
     Last message repeated 2 times
 [hls @ 0x7fed84012c00] Opening 'test2.m3u8.tmp' for writing
     Last message repeated 2 times
 [hls @ 0x7fed84012c00] Opening 'test2.m3u8.tmp' for writing
     Last message repeated 2 times
 [hls @ 0x7fed84012c00] Opening 'test2.m3u8.tmp' for writing
     Last message repeated 2 times
 [hls @ 0x7fed84012c00] Opening 'test2.m3u8.tmp' for writing
     Last message repeated 2 times
 [hls @ 0x7fed84012c00] Opening 'test2.m3u8.tmp' for writing
     Last message repeated 2 times
 [hls @ 0x7fed84012c00] Opening 'test2.m3u8.tmp' for writing
     Last message repeated 3 times
 [hls @ 0x7fed84012c00] Opening 'test2.m3u8.tmp' for writing
     Last message repeated 2 times
 [hls @ 0x7fed84012c00] Opening 'test2.m3u8.tmp' for writing
     Last message repeated 2 times
 [hls @ 0x7fed84012c00] Opening 'test2.m3u8.tmp' for writing
     Last message repeated 2 times
 [hls @ 0x7fed84012c00] Opening 'test2.m3u8.tmp' for writing
     Last message repeated 2 times
 [hls @ 0x7fed84012c00] Opening 'test2.m3u8.tmp' for writing
     Last message repeated 2 times
 [hls @ 0x7fed84012c00] Opening 'test2.m3u8.tmp' for writing
     Last message repeated 2 times
 [hls @ 0x7fed84012c00] Opening 'test2.m3u8.tmp' for writing
     Last message repeated 2 times
 [hls @ 0x7fed84012c00] Opening 'test2.m3u8.tmp' for writing
 [hls @ 0x7fed84012c00] Opening 'test2.m3u8.tmp' for writing
 size=N/A time=00:09:44.84 bitrate=N/A speed=  60x

 I can confirm the first issue (not having the correct
 defaultSampleDuration) is present. It looks like the codec issue isn't
 reproducible when you do a re-encode. I see:

 mediastreamvalidator test2.m3u8
 mediastreamvalidator: Version 1.2(180612)

 [test2.m3u8] Started loading root playlist
 [test2.m3u8] Started loading media playlist
 [test2.m3u8] parsed media segment count: 30, duration: 302.370
 [test2.m3u8] All media files delivered and have end tag, stopping

 --------------------------------------------------------------------------------
 test2.m3u8
 --------------------------------------------------------------------------------
 Processed 59 out of 60 segments
 Average segment duration: 9.749649
 Total segment bitrates (all discontinuities): average: 32.31 kb/s, max:
 32.97 kb/s


 Discontinuity: sequence: 1, parsed segment count: 59 of 60, duration:
 584.979 sec, average: 32.31 kb/s, max: 32.97 kb/s
 Track ID: 1
 Audio Codec: AAC-HEv2
 Audio sample rate: 44100 Hz
 Audio channels: 2
 Audio channel layout: Stereo (L R)

--
Ticket URL: <https://trac.ffmpeg.org/ticket/7282#comment:7>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list