Changes between Initial Version and Version 1 of Ticket #7282, comment 3


Ignore:
Timestamp:
Jul 4, 2018, 2:12:11 AM (15 months ago)
Author:
cehoyos
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #7282, comment 3

    initial v1  
    66
    77with this console output:
    8 
     8{{{
    99a45e60e46a79:input ronakp$ ffmpeg -i short_44khz_16bit_2ch.wav -r:a 44100 -b:a 32k -codec libfdk_aac -profile:a aac_he_v2 test.aac
    1010ffmpeg version git-2018-06-23-b86c575 Copyright (c) 2000-2018 the FFmpeg developers
     
    3636size=    2284kB time=00:09:44.65 bitrate=  32.0kbits/s speed=67.1x   
    3737video:0kB audio:2284kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%
    38 
    39 Once I fragment this file with this command: ffmpeg -i "test.aac" -codec copy -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 "test.m3u8"
     38}}}
     39Once I fragment this file with this command:
     40{{{
     41ffmpeg -i "test.aac" -codec copy -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 "test.m3u8"
    4042ffmpeg version git-2018-06-23-b86c575 Copyright (c) 2000-2018 the FFmpeg developers
    4143  built with Apple LLVM version 9.1.0 (clang-902.0.39.2)
     
    6769size=N/A time=00:09:44.77 bitrate=N/A speed=6.29e+03x   
    6870video:0kB audio:2198kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    69 
     71}}}
    7072Open the M4S file, and look at the moof -> traf -> tfhd atom. The defaultSampleDuration is set to 2048.
    7173
     
    7375
    7476mediafilesegmenter -a -s -r -B test_apple -i test_apple.m3u8 -t 10 test.aac
    75 
     77{{{
    7678a45e60e46a79:input ronakp$ mediafilesegmenter -a -s -r -B test_apple -i test_apple.m3u8 -t 10 test.aac
    7779Jun 27 2018 09:38:41.908: ISO fragmented mode, forcing segments to start with I-Frame
     
    140142Jun 27 2018 09:38:42.140: Unknown video dynamic range value 0
    141143Jun 27 2018 09:38:42.140: average bit rate is 31.68 kbits/sec - max file bit rate is 31.88 kbits/sec
    142 
     144}}}
    143145Looking at this file, the defaultSampleDuration is set to 1024, which is correct at a 44100Hz sampling rate.
    144146
     
    170172
    171173Running ffprobe -i on the Apple Generated fragmented MP4:
    172 
     174{{{
    173175ffprobe -i test_apple.mp4
    174176ffprobe version git-2018-06-23-b86c575 Copyright (c) 2007-2018 the FFmpeg developers
     
    195197      creation_time   : 2018-06-27T13:38:41.000000Z
    196198      handler_name    : Core Media Audio
    197 
     199}}}
    198200So, in conclusion, here are the problems:
    199201
    2002021. It looks like ffmpeg's MP4 or fMP4 generation process ends up stripping the HE-AACv2 profile in a way that Apple's tooling does not recognize the profile anymore. This leads to players not always recognizing the profile properly and playing at degraded quality.
    2012032. The different defaultSampleDuration ends up causing issues when doing Adaptive Streaming between HE-AAC and LC-AAC audio streams in players like Exoplayer. I've filed an issue against Exoplayer and is how we discovered this problem: https://github.com/google/ExoPlayer/issues/3971
    202 
    203 
    204 
    205 
    206