Difference between revisions of "GstShark - Framerate tracer"

From RidgeRun Developer Connection
Jump to: navigation, search
Line 14: Line 14:
 
The following pipeline shows the usage and results of using the framerate tracer. The pipeline has only three elements. The sink element is not being displayed in the logs, because of the nature of the measurement.  
 
The following pipeline shows the usage and results of using the framerate tracer. The pipeline has only three elements. The sink element is not being displayed in the logs, because of the nature of the measurement.  
  
<pre style="white-space:pre-wrap; width:100%;">
+
<syntaxhighlight lang=bash style="white-space:pre-wrap; width:100%;">
 
GST_DEBUG="GST_TRACER:7" GST_TRACERS="framerate" gst-launch-1.0 videotestsrc ! videorate max-rate=15 ! fakesink sync=true
 
GST_DEBUG="GST_TRACER:7" GST_TRACERS="framerate" gst-launch-1.0 videotestsrc ! videorate max-rate=15 ! fakesink sync=true
</pre>
+
</syntaxhighlight>
  
 
A videorate element was used to set the framerate to a fixed value, which can be observed in the output log.
 
A videorate element was used to set the framerate to a fixed value, which can be observed in the output log.

Revision as of 18:31, 18 August 2017


Processing time tracer

Home

Schedule time tracer

The frame rate of a pipeline is one of the most useful characteristics when debugging, especially for those which include live video source elements. It is common that the frame rate is a design parameter and a requirement for declaring the performance of a pipeline as successful. Also, the frame rate is usually used for determining if the output of pipeline is synced, when both video and audio are involved. The frame rate is the measurement of the frame frequency, that means that it is the measurement of the number of frames that go through the source pad of certain element in a given time. Normally frame rate is expressed in frames per second (FPS).

The framerate tracer displays the number of frames that go through every source pad of every element of the pipeline and it is updated and printed on the output log every second.

Frequently, in a single threaded pipeline, the measurements will match for every element of the pipeline but this cannot be taken for granted. There are cases in which the frame rates of different elements do not match and this does not affect negatively the outcome of pipeline. For example, in a multi-threaded pipeline, the frame rate values might be different at different points in the pipeline and still have a good performance. The typical scenarios where pipelines can be multi-threaded are: multiple source elements, queues, and elements which internally process asynchronously.

Pipeline

The following pipeline shows the usage and results of using the framerate tracer. The pipeline has only three elements. The sink element is not being displayed in the logs, because of the nature of the measurement.

GST_DEBUG="GST_TRACER:7" GST_TRACERS="framerate" gst-launch-1.0 videotestsrc ! videorate max-rate=15 ! fakesink sync=true

A videorate element was used to set the framerate to a fixed value, which can be observed in the output log.

Sample diagram

Test framerate.png

Output

0:00:06.619551614 14662      0x1db8400 TRACE             GST_TRACER :0:: framerate, pad=(string)videorate0_src, fps=(uint)15;
0:00:06.619592774 14662      0x1db8400 TRACE             GST_TRACER :0:: framerate, pad=(string)videotestsrc0_src, fps=(uint)15;

Each log line provides a pad field with the source pad being measured and an fps field with the number of frames produced during the last second.


Processing time tracer

Home

Schedule time tracer