Output ffmpeg to certain format

1

I have a media file with the following format according to ffprobe:

  Metadata:
    major_brand     : M4A 
    minor_version   : 0
    compatible_brands: M4A mp42isom
    creation_time   : 2013-03-21 07:05:30
  Duration: 00:00:00.42, start: 0.000000, bitrate: 118 kb/s
    Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 100 kb/s (default)
    Metadata:
      creation_time   : 2013-03-21 07:05:30
      handler_name    : Core Media Audio

Is it possible to have ffmpeg output to exactly this format?

William Entriken

Posted 2013-08-25T22:56:37.370

Reputation: 2 014

Answers

2

You can encode an AAC stream with these parameters using a command like this:

ffmpeg -i in.wav -map 0:a -acodec libfdk_aac -ar 44100 -ac 2 -ab 100k out.m4a

Any supported input format can be used in place of wav.

If your ffmpeg is not configured with libfdk_aac you can use -acodec libfaac or -acodec aac -strict experimental instead. See ffmpeg's AAC Encoding Guide for more details on the different AAC encoders.

The container will have the major brand M4A but not those exact values for minor_version and compatible_brands. If you need those values you can change them with mp4box. For example this will set the major brand to M4A with minor version 0, and remove iso2 (added by ffmpeg) from the list of compatible brands:

mp4box -brand "M4A :0" -rb iso2 out.m4a

mark4o

Posted 2013-08-25T22:56:37.370

Reputation: 4 729

How to change major brand with ffmpeg? Not mp4box – Dr.jacky – 2015-11-09T08:23:05.440