Maybe you could try go2rtc[0]? It can ingest multiple stream formats and output them in a different one.
Also has some other nice features, like I use it to ingest one RTSP stream and share that to multiple applications, and to push audio out to my Tapo camera