GstShark - Bitrate tracer: Difference between revisions

From RidgeRun Developer Wiki
(Created page with "{{GstShark Tracer |prev=GstShark - Graphic tracer |next=GstShark - Queue Level tracer |description= |pipeline= |diagram= }}")
 
mNo edit summary
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{GstShark Tracer
{{GstShark/Head |previous=Graphic tracer|next=Queue Level tracer|metakeywords=Bitrate tracer|metadescription=This tracer is similar to the framerate tracer, but instead of measuring the number of frames produced every second, it measures bits.}}
|prev=[[GstShark - Graphic tracer]]
 
|next=[[GstShark - Queue Level tracer]]
The bitrate tracer displays the number of bits that go out of a source pad in a second. This is a measurement of the bitrate of the stream. It is updated and printed on the output log every second. The data from this tracer is especially useful for the output of encoders, as it will be able to provide the compression rate and the potential variation of the bitrate value over time.
|description=
 
|pipeline=
Currently, there are no plots available to be generated based on this tracer. This is a feature that is being developed and will be made available in a future release.
|diagram=
<br><br>
}}
<table>
<tr>
<td><div class="clear; float:right">__TOC__</div></td>
<td valign=top>
{{GStreamer debug}}
</td>
</table>
 
==Pipeline==
The following pipeline provides a guide of the usage of the bitrate tracer and the results obtained. In this example, elements with very different bitrates are included.
<syntaxhighlight lang=bash>
$ GST_DEBUG="GST_TRACER:7" GST_TRACERS="bitrate" gst-launch-1.0 videotestsrc ! 'video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, framerate=(fraction)30/1' ! videorate max-rate=30 ! videoconvert ! queue ! avenc_h263p ! queue ! avimux ! fakesink sync=true
</syntaxhighlight>
 
==Graph==
[[File:bitrate_test.png|1000px|center]]
 
==Output==
<pre>
0:00:19.474510925  4823 0x10de400 TRACE GST_TRACER :0:: bitrate, pad=(string)avenc_h263p0_src, bitrate=(guint64)1408000;
0:00:19.474556080  4823 0x10de400 TRACE GST_TRACER :0:: bitrate, pad=(string)queue1_src, bitrate=(guint64)1405776;
0:00:19.474577011  4823 0x10de400 TRACE GST_TRACER :0:: bitrate, pad=(string)capsfilter0_src, bitrate=(guint64)147456000;
0:00:19.474595308  4823 0x10de400 TRACE GST_TRACER :0:: bitrate, pad=(string)videotestsrc0_src, bitrate=(guint64)147456000;
0:00:19.474610751  4823 0x10de400 TRACE GST_TRACER :0:: bitrate, pad=(string)videorate0_src, bitrate=(guint64)147456000;
0:00:19.474624919  4823 0x10de400 TRACE GST_TRACER :0:: bitrate, pad=(string)videoconvert0_src, bitrate=(guint64)110592000;
0:00:19.474638984  4823 0x10de400 TRACE GST_TRACER :0:: bitrate, pad=(string)avimux0_src, bitrate=(guint64)1407792;
0:00:19.474656953  4823 0x10de400 TRACE GST_TRACER :0:: bitrate, pad=(string)queue0_src, bitrate=(guint64)110592000;
</pre>
 
Each log line provides a {{code|pad}} field with the source pad being measured and a {{code|bitrate}} field with the number of bits produced in the last second.
 
 
{{GstShark/Foot |previous=Graphic tracer|next=Queue Level tracer}}

Latest revision as of 08:01, 17 March 2023





Previous: Graphic tracer Index Next: Queue Level tracer




The bitrate tracer displays the number of bits that go out of a source pad in a second. This is a measurement of the bitrate of the stream. It is updated and printed on the output log every second. The data from this tracer is especially useful for the output of encoders, as it will be able to provide the compression rate and the potential variation of the bitrate value over time.

Currently, there are no plots available to be generated based on this tracer. This is a feature that is being developed and will be made available in a future release.

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

Pipeline

The following pipeline provides a guide of the usage of the bitrate tracer and the results obtained. In this example, elements with very different bitrates are included.

$ GST_DEBUG="GST_TRACER:7" GST_TRACERS="bitrate" gst-launch-1.0 videotestsrc ! 'video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, framerate=(fraction)30/1' ! videorate max-rate=30 ! videoconvert ! queue ! avenc_h263p ! queue ! avimux ! fakesink sync=true

Graph

Output

0:00:19.474510925  4823 0x10de400 TRACE GST_TRACER :0:: bitrate, pad=(string)avenc_h263p0_src, bitrate=(guint64)1408000;
0:00:19.474556080  4823 0x10de400 TRACE GST_TRACER :0:: bitrate, pad=(string)queue1_src, bitrate=(guint64)1405776;
0:00:19.474577011  4823 0x10de400 TRACE GST_TRACER :0:: bitrate, pad=(string)capsfilter0_src, bitrate=(guint64)147456000;
0:00:19.474595308  4823 0x10de400 TRACE GST_TRACER :0:: bitrate, pad=(string)videotestsrc0_src, bitrate=(guint64)147456000;
0:00:19.474610751  4823 0x10de400 TRACE GST_TRACER :0:: bitrate, pad=(string)videorate0_src, bitrate=(guint64)147456000;
0:00:19.474624919  4823 0x10de400 TRACE GST_TRACER :0:: bitrate, pad=(string)videoconvert0_src, bitrate=(guint64)110592000;
0:00:19.474638984  4823 0x10de400 TRACE GST_TRACER :0:: bitrate, pad=(string)avimux0_src, bitrate=(guint64)1407792;
0:00:19.474656953  4823 0x10de400 TRACE GST_TRACER :0:: bitrate, pad=(string)queue0_src, bitrate=(guint64)110592000;

Each log line provides a pad field with the source pad being measured and a bitrate field with the number of bits produced in the last second.



Previous: Graphic tracer Index Next: Queue Level tracer