same old same old: codecs!! (avconv and AAC)

Today I encountered problems with encoding video/audio material due to same old problematic, which so many people seem to not notice but seems that it is oh so important. At least to content creators.

In short, here’s the thing: avconv, the flagship encoder/decoder for most of a/v content (it’s a fork of more famous ffmpeg), now cannot in a simple way encode AAC audio (this is the most common format for h264 mp4 video – or so it seems). In order to have avconv with libfaac encoder (which creates AAC audio) compiling is necessary – without an option to create a deb (if you are on Ubuntu or Debian). That’s quite inconvenient. However, there is an experimental work-around: instead of -acodec libfaac, use ffmpeg/avconv’s own experimental encoder by using -acodec aac -strict experimental.

So here’s the full commandline:

avconv -i INPUTFILE.EXT -s 480x320 -r 25 -b 1000k -bt 1600k -vcodec libx264 -pre:v medium -acodec aac -strict experimental -ac 2 -ar 48000 -ab 128k OUTPUTFILE.mp4

Above was made in order to transcode any video to a format suitable for Waterwheel online platform.