faad and faac are old. Use libavcodec for decoding, and another 3rd party for encoding (Nero aac encoder is free, has linux, and supports reading from stdin or via a pipe)