AAC and MP4 encoding libraries?

I wrote a simple screen recorder but after writing it I realized that libvpx is kind of painfully slow. Are there libraries for the following?

  • AAC encoding (e.g. bindings to CoreAudio/MediaFoundation/libfdk-aac).
  • MP4 muxing.

I'm guessing the answer is no, but I thought I'd ask here just in case.

I have seen there are a bunch of wrappers for ffmpeg. I haven't tried any of them but it might be worth taking a look at least.

Libvpx has settings for real-time encoding -- VPX_DL_REALTIME. It ruins motion prediction quality and causes a lot of blur, but it's faster.

Unfortunately in my experience libvpx is terribly slow, borderline unusable, when compared to h264, though I've tested only CRF modes.

This mirrors my experience. VP9 is unbearable even with realtime, and VP8 is bearable, but compared to x264 the speed and quality are both much worse. But I guess it's possible that I'm just using it wrong.

Edit: nvm, thanks, @kornel, I was already using deadline=1 but i also had to set cpu_used=6 to have any effect. it's still nowhere near as good as x264 but it's enough for now.