Measuring received frame rate of rtsp video stream using gscam [closed]

asked 2020-06-09 12:13:52 -0500

adnan gravatar image


I am transmitting video to a rtsp server using gscam. Here is the code for the gscam nodelet in the launch file:

<node pkg="nodelet" type="nodelet"
name="nodelet_manager" args="manager"

<node pkg="nodelet" type="nodelet"
name="$(arg cam_name)"
args="load gscam/GSCamNodelet nodelet_manager"

<param name="camera_name"          value="$(arg cam_name)"/>
<param name="camera_info_url"      value="$(arg camera_info_url)"/>
<param name="frame_id"             value="$(arg cam_name)"/>
<param name="sync_sink"            value="true" />
<param name="use_gst_timestamps"   value="true" />
<param name="gst_clock_type"       value="0" />    <!-- GST_CLOCK_TYPE_REALTIME -->
<param name="reopen_on_eof"        value="true" />

<!-- choose appropriate gstreamer pipeline -->
<param name="gscam_config"
value="gst-launch-1.0 rtspsrc location=$(arg rtsp_stream) latency=$(arg latency) ! decodebin ! videoconvert ! video/x-raw,format=RGB" />

<remap from="camera/image_raw" to="$(arg cam_name)/image_raw" />

Now, I would like to measure the received and dropped frame rate from the camera and there is a gstream element fpsdisplay for that. If I try this launch operation from console :gst-launch-1.0 rtspsrc location=rtsp:// latency=400 ! decodebin ! videoconvert ! fpsdisplaysink, then it displays the frame rate on a pooped up window but if I want to use fpsdisplay in the pipeline in the above gscam nodelet in the launch file like this:

<param name="gscam_config"
value="gst-launch-1.0 rtspsrc location=$(arg rtsp_stream) latency=$(arg latency) ! fpsdisplaysink ! decodebin ! videoconvert ! 
video/x-raw,format=RGB" />

then it does not work, no topics are published. Through the documentations, I could not understand how to combine fpsdisplaysink in the gscam pipeline.

How then this element has to be combined with the pipeline?

Or if it is not clearly possible to get the received frame rate through fpsdisplaysink then how it can be done?


edit retag flag offensive reopen merge delete

Closed for the following reason question is off-topic or not relevant. Please see for more details. by gvdhoorn
close date 2020-06-10 01:05:51.152965


At this point this does not seem like a ROS problem, as you're trying to use the fpsdisplaysink element without it popping up a window, which seems like a gstreamer configuration issue.

I'd advise you to post your question on a more suitable forum, and not limit you to ROS Answers.

gvdhoorn gravatar image gvdhoorn  ( 2020-06-10 01:06:53 -0500 )edit