Controlling Framerate(fps) in the pipeline

Which element do you suggest for controlling the fps of the frames in the pipeline.

I have tried videorate(framerate) and rawvideoparse(max-rate). Despite setting the properties framerate and max-rate for respective elements not able to control the fps in the pipeline.

File has grayscale 16 bit 2k images
filesrc->rawvideoparse->tcpclientsink
The above pipeline is going through but fps is not maintained
Or
filesrc->videorate->tcpclientsink
The above pipeline throws an error streaming stopped, reason not-negotiated

Can any one provide some insights or suggestions

I’ve also observed many anomalies with FPS as well. E.g. when using queue in the pipeline, I’m getting 60FPS, without queue it’s just 30FPS. There are no frame drops or errors anywhere, system has plenty resources, encoding is offloaded to hardware. Will need to debug deeper to understand.

Also anomalies observed for a bitrate. When I set x264enc bitrate=10000 I’m getting 20Mbit/s in the browser stats, for 20000 - 40Mbit/s and so on.

UPD: In your situation, it could potentially lead to resource exhaustion problems, where the system’s limited resources might result in frame drops within the pipeline. Check CPU usage and offload encoding to the hardware.

I have previously used something like:
gst-launch-1.0 filesrc location=/tmp/test.raw ! videoparse format=gray8 width=1800 height=290 framerate=25/1 ! clocksync ! videoconvert ! ximagesink sync=0
Where you need to adjust the CAPS to match your stream

And then you can use fx a fakesink to check that the pipeline plays the frames at the correct speed.

If you then change to the tcpsink and start having issues you need to start checking the bottlenecks, add queues, etc.