# How to Reduce FPS for Live Camera Feed (RTSP)

**URL:** https://forum.opencv.org/t/how-to-reduce-fps-for-live-camera-feed-rtsp/19637
**Category:** Uncategorized
**Tags:** videoio, emgu, csharp
**Created:** [December 28, 2024, 8:01pm UTC](https://forum.opencv.org/t/how-to-reduce-fps-for-live-camera-feed-rtsp/19637 "2024-12-28T20:01:01Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Josh534](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@Josh534](https://forum.opencv.org/u/Josh534)
#### Post date: [December 28, 2024, 8:01pm UTC](https://forum.opencv.org/t/how-to-reduce-fps-for-live-camera-feed-rtsp/19637/1 "2024-12-28T20:01:01Z")

</div>

Hello,

I’m working with a live RTSP camera feed in C# (using `VideoCapture`) and would like to reduce the incoming FPS for the purpose of detection (for performance optimization). Unfortunately, I can’t change the FPS setting on the camera side.

I initially used `Stopwatch.Elapsed.TotalMilliseconds` as a time base to control the frame processing interval, but I found that I was getting around 7-8 FPS when I actually needed 10 FPS. (The Stopwatch doesn’t seem to be very accurate in this scenario.) Basically every time a frame came (`ImageGrabbed` event) I wrote down the Stopwatch’s current time and checked `time - last_time >= 1000.0 / target_fps`

To address this, I tried counting frames and using the formula `time = frame_count / fps * 1000` to estimate the current time per frame. This seems to work pretty well.

From what I’ve read, I can also use the `CAP_PROP_POS_MSEC` property from OpenCV, but I’m not sure if it works consistently across all camera models and whether this would be a more reliable solution than my current approach.

Is there are other ways to more accurately control FPS?

Thank you for your help!
