Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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
share|improve this answer
    
Perfect, thanks, you're awesome –  Full Decent Aug 27 '13 at 14:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.