Golang
You can publish a stream to the server by using the Go programming language and the following libraries:
Both powers MediaMTX itself. In the repositories of these projects there are several examples on how to connect to a server and push data.