GstShark - Framerate tracer
Open-source project from Ridgerun. |
GstShark |
---|
Getting Started |
Generating trace files |
Tracer Parameters |
Available Tracers |
Results |
Visualization Tools |
Examples |
Contact Us |
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 the pipeline is synced, when both video and audio are involved. The frame rate is the measurement of the frame frequency, which means that it is the measurement of the number of frames that go through the source pad of a 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 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 the 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 that internally process asynchronously.
|
Graph
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.
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.