Slow rtsp camera example

Hey,

when following the exampe in the documentation for h264 encoded rstp streams in https://docs.radxa.com/en/rock3/rock3a/app-development/rtsp everything functions as it should but the rtsp server is extremly ressource hungry:

have i something misconfigured or is there an alternative to mediamtx , which is faster? Recording encoded h264 to a file is blazing fast on the other hand.

Hmm i could reduce it by dropping the resolution,

but i still got a 1.5 sec latency in my local network, still wondering, if i installed anything wrong with
ffmpeg-rockchip/ffmpeg -f v4l2 -i /dev/video0 -vf “fps=30” -s 800x600 -c:v h264_rkmpp -rc_mode AVBR -b:v 20M -minrate 10M -maxrate 40M -profile:v main -level 5.1 -f rtsp rtsp://0.0.0.0:8554/stream

Using no encoding and udp reduces the latency to around ~800ms

With -c:v h264_rkmpp it goes up to 1.4s

I Solved the issue:

So the ffmpeg cmd has to be done as super user [sudio], reducing the latency to a couple of 100ms, even with encoding. I suspect, dma wasnt not used, even though i i opened them for all users.