How to get a stream from the rpi camera, convert it to h264 with FFMPEG and send it to Mediamxt

I need to get on a small website the stream captured by my rpi camera (not a webcam). I have tryed something like:

libcamera-vid -t 0 --inline --width 640 --height 480 --framerate 10 | ffmpeg -f h264 -i - -vcodec copy -f rtsp rtsp://192.168.1.111:8554

but it doesn’t work. I think that the first part with libcamera-vid is OK, but next I am not sure what to do to convert the strem with FFMPEG and send it to Mediamxt to be able to show it properly on a website.
Thanks for your help