If you are using the old encoding service of rtMedia plugin along with the API, I request you to update rtMedia plugin to latest version and use the transcoder service https://rtmedia.io/transcoder/.
rtMedia's inbuild audio & video encoding service no along supported now.
Thanks,