[FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

Mark Burton mwjburton at gmail.com
Sun Jul 2 13:13:47 EEST 2017


On 1 Jul 2017, at 20:24, Sasi Inguva <isasi-at-google.com at ffmpeg.org> wrote:
>> On Sat, Jul 1, 2017 at 6:56 AM, Mark Burton [via FFmpeg-users] 
>> How about this for a partial solution - ffmpeg supports the audiotoolbox
>> aac encoder on macOS. For the sake of being able to create .mov which are
>> compatible with the Quicktime format, there is a single change which I
>> think could work well, albeit the ‘fix' would be limited to macOS system
>> encoders.
>> 
>> Currently a .mov created by ffmpeg when using the aac_at audiotoolbox
>> encoder creates a sound track edit list with a media time of 2112. This
>> will not work with Quicktime decoders, the file with decode out of sync. If
>> this value was 0 however, then the file will decode properly in sync.
>> 
>> For now, would it be possible to change this value to 0 when using the
>> aac_at encoder in ffmpeg?
>> 
>> Doing the same for the ffmpeg native aac encoder does help quite a bit,
>> about 1/2 frame out of sync as opposed to a full frame.

> 
> There is already a flag called -use_editlist in ffmpeg MOV muxer
> http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavformat/movenc.c;h=ca389e3a97f92e05b1abfda29aa7bde25e1089a0;hb=HEAD#l88 <http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavformat/movenc.c;h=ca389e3a97f92e05b1abfda29aa7bde25e1089a0;hb=HEAD#l88>
> I think you can use that along with the audiotoolbox encoder to achieve what you want.

I have tried this before, but by removing the editlist using this flag, the resulting file had major frame rate issues - for example a 24fps file, would come out at 23.99fps and would not play correctly - using my test file with burnt in timecode and a timecode track, it was easy to see that they were not keeping sync. This also results in a file which is longer than the true duration and Quicktime decoders can display a black frame at the end as a result.

Perhaps this is because the edit list is removed from all tracks, not just the audio, I don’t know, but it doesn’t currently achieve what I described above sadly.


More information about the ffmpeg-user mailing list