I posted this solution for Kdenlive audio recording problems but I'll post it here too because this is a general fix for the following error message when using ffmpeg:

Unknown encoder 'libvo_aacenc'

So if you are seeing this error when using ffmpeg, or with any program that uses ffmpeg, then you might want to try the simple one line fix that worked for me.

In a terminal run the following (if you're using Ubuntu or Ubuntu based systems):

sudo apt install libavcodec-extra

That's it. Run that command to install the additional codecs that might be missing from your system and see if your application works without errors. I hope it does!