GstShark - Bitrate tracer: Difference between revisions
No edit summary |
mNo edit summary |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{GstShark | {{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.}} | ||
| | |||
|next= | 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. | ||
| | <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
Open-source project from Ridgerun. |
GstShark |
---|
Getting Started |
Generating trace files |
Tracer Parameters |
Available Tracers |
Results |
Visualization Tools |
Examples |
Contact Us |
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.
|
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.