android – Video and Audio into H264 and AAC codec using MediaCodec

I need to create an application that captures screen and audio, encodes it via MediaCodec API into H264 and AAC codec, and saves it on disk. I read about how MediaCodec works from the official documentation but I also need to see some practical applications/code.

Please help me find some good resources for doing this.
Sorry if this question is not according to the principles of SO.