prabhakar-sivanesan / OpenCV-rtsp-server

RTSP streaming using GStreamer
177 stars 62 forks source link

How to do variable frame rate. #2

Closed cyrusbehr closed 2 years ago

cyrusbehr commented 3 years ago

This is not really an issue but more of a question.

I see that on this line, you are setting the frame rate.

Do you know how one could go about using a variable framerate? In my setup, I grab a frame from an RTSP stream, perform some processing, then restream the processed frame as a new RTSP stream.

The issue is that the processing I perform can vary based on the image received from the RTSP stream and hence is not a constant time, so it's therefore not possible to achieved a fixed frame rate.

mheriyanto commented 2 years ago

Hi @cyrusbehr , I'm facing the same problem with you. By the way, any updates for this issue?

cyrusbehr commented 2 years ago

@mheriyanto I worked around this issue by manually computing my frame rate: https://github.com/getchui/sample-apps/blob/b25e37cb4025eb61d168fed94ca0e7ce30616c07/python/face_recognition_1_n_rtsp_server/run_1_n_identification_rtsp_server.py#L184-L195

mheriyanto commented 2 years ago

@mheriyanto I worked around this issue by manually computing my frame rate: https://github.com/getchui/sample-apps/blob/b25e37cb4025eb61d168fed94ca0e7ce30616c07/python/face_recognition_1_n_rtsp_server/run_1_n_identification_rtsp_server.py#L184-L195

Wow, thank you for useful link you gave.