Reputation: 1187
For AAC ("libfaac") audio encoder, how can I specify the "MPEG Version" to either "MPEG-4" or "MPEG-2" through FFmpeg's command?
Upvotes: 0
Views: 4634
Reputation: 38652
When using libfaac, FFmpeg hard-codes the MPEG version to MPEG-4. You can observe this in libfaac.c
, line 118.
faac_cfg->mpegVersion = MPEG4;
If you want to change it, you will have download the FFmpeg source, modify this line to use MPEG2
instead, and recompile FFmpeg with the appropriate configuration (including --enable-libfaac
). This works and produces a playable file, however you'll obviously have to use a bitstream filter to create a valid bitstream for MPEG-4 containers now:
ffmpeg -i in.wav -c:a libfaac -absf aac_adtstoasc out.m4a
If instead you use the FAAC API directly, you can of course change this parameter as you wish.
Ideally, one would submit a patch for FFmpeg to include a new option which allows you to set this manually, but given that MPEG-4 was chosen as a hardcoded default I don't see a compelling reason to implement this.
Upvotes: 1