GstShark - Example: Frame rate

From RidgeRun Developer Wiki





Previous: Example: CPU usage analysis Index Next: Example: Processing time




Problems running the pipelines shown on this page? Please see our GStreamer Debugging guide for help.


The frame rate tracer displays the number of frames that go through every element of the pipeline per second. More detailed information of this trace is given on the tracer's manual.

The measurements of the frame rate normally tend to remain constant and equal among each other for every element of the pipeline, since the more frequent case of analysis is the single threaded pipeline. However, this is not the case in scenarios where the pipeline has different frame rates for different elements. The following pipeline is a demonstration of a case in which different sections of the pipeline have different values of frame rate set. This example is also a test of the capabilities of the GstShark frame rate tracer and for the plot scripts since it is much easier to observe the different frame rate values generated by the pipeline in a plot than in the output log.

The following plot shows three groups of elements categorized by the value of frame rate measured on each one of them, producing three defined lines on the graph in which the different elements gather; specifically speaking to 15, 30, and 60 fps.

Test Pipeline

$ GST_DEBUG="GST_TRACER:7" GST_TRACERS="framerate" gst-launch-1.0 videotestsrc num-buffers=1800 ! tee name=tee0 ! queue ! videorate  ! video/x-raw,framerate=60/1 ! fakesink sync=true tee0. ! queue ! videorate  ! video/x-raw,framerate=30/1 ! fakesink sync=true tee0. ! queue ! videorate  ! video/x-raw,framerate=15/1 ! fakesink sync=true

Pipeline diagram

Pipeline diagram

Results

Frame rate plot of the pipeline


Previous: Example: CPU usage analysis Index Next: Example: Processing time