Golang
You can publish to the server from the Go programming language by using gortsplib, a RTSP client/server library, and gortmplib, a RTMP client/server library. Both powers MediaMTX itself. In the repositories of these projects there are several examples on how to connect to a server and push data.