Difference between revisions of "GstShark - Framerate tracer"

From RidgeRun Developer Connection
Jump to: navigation, search
(New page for framerate tracer)
 
Line 1: Line 1:
{{GstShark tracer
+
{{GstShark Tracer
 
|name=framerate
 
|name=framerate
 
|description=The frame rate of a pipeline is one of the most useful characteristics, especially those one who include live video source elements, since it is normally 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, in which there are video and audio involved, is synced. As its own name says frame rate is the measurement of the frame frequency, that means that it corresponds to the measurement of the amount of frames that go through the source pad of certain element every defined amount of time. Normally frame rate is expressed in frames per second (FPS). Therefore what the framerate tracer does is displaying the amount of frames that goes through every source pad of every element of the pipeline and it is updated and printed on the output log every second.
 
|description=The frame rate of a pipeline is one of the most useful characteristics, especially those one who include live video source elements, since it is normally 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, in which there are video and audio involved, is synced. As its own name says frame rate is the measurement of the frame frequency, that means that it corresponds to the measurement of the amount of frames that go through the source pad of certain element every defined amount of time. Normally frame rate is expressed in frames per second (FPS). Therefore what the framerate tracer does is displaying the amount of frames that goes through every source pad of every element of the pipeline and it is updated and printed on the output log every second.

Revision as of 15:45, 28 June 2017


{{{prev}}}

Home

{{{next}}}

The frame rate of a pipeline is one of the most useful characteristics, especially those one who include live video source elements, since it is normally 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, in which there are video and audio involved, is synced. As its own name says frame rate is the measurement of the frame frequency, that means that it corresponds to the measurement of the amount of frames that go through the source pad of certain element every defined amount of time. Normally frame rate is expressed in frames per second (FPS). Therefore what the framerate tracer does is displaying the amount of frames that goes 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 could be the case in which the frame rate of different elements do not match and this does not affect negatively the outcome of pipeline; i.e., in a multi-threaded pipeline the frame rate values might report differently 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.

In order to exemplify how to use this tracer and result that the user might get from it, the following pipeline was used; the pipeline have only three elements, numbered from left to right, in which one of them is a sink element and because of the nature of the measurement and the tracer (frame rate is only measured on the source pads of the elements) the frame rate of this element is not being displayed. The elements are connected as the following graph shows and below that there is the pipeline with the output log obtained from it.

Pipeline

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

Sample diagram

Test framerate.png

Output

0:00:01.229360710 12840 0x18d5200 TRACE GST_TRACER :0:: framerate, pad=(string)videotestsrc0_src, fps=(uint)21;
0:00:01.229470965 12840 0x18d5200 TRACE GST_TRACER :0:: framerate, pad=(string)videorate0_src, fps=(uint)20;
0:00:02.229603561 12840 0x18d5200 TRACE GST_TRACER :0:: framerate, pad=(string)videotestsrc0_src, fps=(uint)15;
0:00:02.229704469 12840 0x18d5200 TRACE GST_TRACER :0:: framerate, pad=(string)videorate0_src, fps=(uint)15;
0:00:03.229813070 12840 0x18d5200 TRACE GST_TRACER :0:: framerate, pad=(string)videotestsrc0_src, fps=(uint)15;
0:00:03.229931789 12840 0x18d5200 TRACE GST_TRACER :0:: framerate, pad=(string)videorate0_src, fps=(uint)15;
0:00:04.229094685 12840 0x18d5200 TRACE GST_TRACER :0:: framerate, pad=(string)videotestsrc0_src, fps=(uint)15;
0:00:04.229177391 12840 0x18d5200 TRACE GST_TRACER :0:: framerate, pad=(string)videorate0_src, fps=(uint)15;
0:00:05.229269122 12840 0x18d5200 TRACE GST_TRACER :0:: framerate, pad=(string)videotestsrc0_src, fps=(uint)15;
0:00:05.229311209 12840 0x18d5200 TRACE GST_TRACER :0:: framerate, pad=(string)videorate0_src, fps=(uint)15;
0:00:06.229392913 12840 0x18d5200 TRACE GST_TRACER :0:: framerate, pad=(string)videotestsrc0_src, fps=(uint)15;
0:00:06.229459998 12840 0x18d5200 TRACE GST_TRACER :0:: framerate, pad=(string)videorate0_src, fps=(uint)15;
0:00:07.229506584 12840 0x18d5200 TRACE GST_TRACER :0:: framerate, pad=(string)videotestsrc0_src, fps=(uint)15;
0:00:07.229543062 12840 0x18d5200 TRACE GST_TRACER :0:: framerate, pad=(string)videorate0_src, fps=(uint)15;
0:00:08.229586552 12840 0x18d5200 TRACE GST_TRACER :0:: framerate, pad=(string)videotestsrc0_src, fps=(uint)15;
0:00:08.229645689 12840 0x18d5200 TRACE GST_TRACER :0:: framerate, pad=(string)videorate0_src, fps=(uint)15;
0:00:09.229695974 12840 0x18d5200 TRACE GST_TRACER :0:: framerate, pad=(string)videotestsrc0_src, fps=(uint)15;
0:00:09.229738533 12840 0x18d5200 TRACE GST_TRACER :0:: framerate, pad=(string)videorate0_src, fps=(uint)15;
0:00:10.229795081 12840 0x18d5200 TRACE GST_TRACER :0:: framerate, pad=(string)videotestsrc0_src, fps=(uint)15;
0:00:10.229884141 12840 0x18d5200 TRACE GST_TRACER :0:: framerate, pad=(string)videorate0_src, fps=(uint)15;
0:00:11.229029697 12840 0x18d5200 TRACE GST_TRACER :0:: framerate, pad=(string)videotestsrc0_src, fps=(uint)15;
0:00:11.229109025 12840 0x18d5200 TRACE GST_TRACER :0:: framerate, pad=(string)videorate0_src, fps=(uint)15;
0:00:12.229201141 12840 0x18d5200 TRACE GST_TRACER :0:: framerate, pad=(string)videotestsrc0_src, fps=(uint)15;
0:00:12.229264451 12840 0x18d5200 TRACE GST_TRACER :0:: framerate, pad=(string)videorate0_src, fps=(uint)15;
0:00:13.229362416 12840 0x18d5200 TRACE GST_TRACER :0:: framerate, pad=(string)videotestsrc0_src, fps=(uint)15;
0:00:13.229399786 12840 0x18d5200 TRACE GST_TRACER :0:: framerate, pad=(string)videorate0_src, fps=(uint)15;
0:00:14.229519683 12840 0x18d5200 TRACE GST_TRACER :0:: framerate, pad=(string)videotestsrc0_src, fps=(uint)15;
0:00:14.229598836 12840 0x18d5200 TRACE GST_TRACER :0:: framerate, pad=(string)videorate0_src, fps=(uint)15;
0:00:15.229713012 12840 0x18d5200 TRACE GST_TRACER :0:: framerate, pad=(string)videotestsrc0_src, fps=(uint)15;
0:00:15.229755348 12840 0x18d5200 TRACE GST_TRACER :0:: framerate, pad=(string)videorate0_src, fps=(uint)15;


Additional notes

In this case the results obtained are easy to verify, the pipeline only has one source element which means it only has one thread of processing; therefore, every element on the pipeline should have the same frame rate and since one of the element was a filter with the functionality of setting the frame rate of the pipeline (set to a value of 15), every frame rate measurement done on every source pad of the pipeline has to be equal to value set on that element.


{{{prev}}}

Home

{{{next}}}