gst-shark icon indicating copy to clipboard operation
gst-shark copied to clipboard

Gstshark cannot plot bitrate and framerate tracers

Open joshua-tatenda opened this issue 5 years ago • 8 comments

Hi,

I am having troubles plotting bitrate trace (on its own) or framerate trace (own its own as well) using gstshark.

(a) For bitrate, I get the following error: _error: xlim: axis limits must be increasing error: called from axis_limits at line 49 column 11 xlim at line 54 column 7 plot_tracer at line 220 column 9 ./gstshark-plot.m at line 68 column 5

(b) For framerate, I get the following (almost identical) error: error: xlim: axis limits must be increasing error: called from axis_limits at line 49 column 11 xlim at line 54 column 7 plot_tracer at line 88 column 9 ./gstshark-plot.m at line 68 column 5

Additional info: -My gstshark version is the latest "master" branch. -The pipeline and CTF files are run and produced on Xilinx ZCU106 board. -The CTF files are analysed on Desktop Ubuntu 18.04.2 LTS.

Thanks in advance,

joshua-tatenda avatar Oct 03 '19 12:10 joshua-tatenda

@michaelgruner, @mleivaf, @rrcarlosrodriguez , @bill9889, @carlos-aguero, @eramirez392, @dgarbanzo, @lleoncr, @adriancervantes, @loganek, @gdesmott . Please kindly assit with insights,. Kind Regards, Joshua

joshua-tatenda avatar Oct 04 '19 14:10 joshua-tatenda

Hi @joshua-tatenda sure our team is kindly checking your reported issue and feedback will be provided soon.

Regards.

carlos-aguero avatar Oct 04 '19 15:10 carlos-aguero

Hi @joshua-tatenda,

Could you provide your pipeline and CTF files generated?

Regards.

mleivaf avatar Oct 04 '19 15:10 mleivaf

Hi @mleivaf ( and @michaelgruner , @rrcarlosrodriguez , @bill9889 , @carlos-aguero , @eramirez392 , @dgarbanzo , @lleoncr , @adriancervantes , @loganek , @gdesmott)

Thanks for the response.

My pipelines are as shown below:

(a) Stream sender: gst-launch-1.0 --eos-on-shutdown v4l2src device=/dev/video0 io-mode=4 ! capsfilter caps="video/x-raw, width=1920, height=1080, format=NV12,framerate=60/1" ! videorate max-rate=15 ! tee name=t ! queue ! kmssink bus-id=a0070000.v_mix t. ! queue ! omxh264enc gop-length=60 gop-mode=0 low-bandwidth=FALSE target-bitrate=600 num-slices=8 control-rate=2 qp-mode=2 periodicity-idr=60 prefetch-buffer=TRUE latency-mode=1 b-frames=0 filler-data=TRUE ! capsfilter caps="video/x-h264, profile=high" ! queue ! mpegtsmux alignment=7 ! rtpmp2tpay pt=33 ! queue ! udpsink host=192.168.2.200 async=FALSE send-duplicates=FALSE max-bitrate=1500000 port=5004 qos-dscp=60

(b) Stream receiver: GST_DEBUG="GST_TRACER:7" GST_TRACERS="framerate" gst-launch-1.0 --eos-on-shutdown udpsrc port=5004 retrieve-sender-address=FALSE ! capsfilter name=stream_capsfilter caps="application/x-rtp, media=video, encoding-name=MPT2, clock-rate=90000, payload=33" ! queue name=depay_queue max-size-bytes=0 ! rtpmp2tdepay ! tsparse ! video/mpegts ! tsdemux ! queue name=h264parser_queue max-size-bytes=0 ! h264parse ! queue name=decoder_queue max-size-bytes=0 ! omxh264dec internal-entropy-buffers=5 latency-mode=2 ! videorate name=videorate max-rate=15 ! tee name=t ! queue name=sink_queue max-size-bytes=0 ! kmssink bus-id=a0070000.v_mix

The appropriately-named log files produced are attached as zip folders below: GstShark_Logs_Framerate.zip GstShark_Logs_Bitrate.zip

Thanks in advance

joshua-tatenda avatar Oct 05 '19 16:10 joshua-tatenda

Hi @joshua-tatenda,

I am able to reproduce the error reported by you, I am researching the cause.

For the frame rate beside the error reported by you I have seen this error:

[error] Event id 119 is outside range.
[error] Reading event failed.
Error printing trace.

Have you seen this error?

Regards.

mleivaf avatar Oct 12 '19 02:10 mleivaf

Hi @mleivaf ,

Thank you.

No , I am NOT getting this error on my side:

[error] Event id 119 is outside range. [error] Reading event failed. Error printing trace.

Kind Regards

joshua-tatenda avatar Oct 14 '19 07:10 joshua-tatenda

Hi @joshua-tatenda,

I have found the cause of your problem. Based on the information in the file GstShark_Logs_Bitrate/metadata you are using an old tracer version (before version v0.5.2) but you are trying to plot the information with a more recent version of gstshark.

You can confirm this running this command

grep bitrate GstShark_Logs_Bitrate/metadata -A 20

This is the expected output when you are using an old gstshark library version

    name = bitrate;
    id = 4;
    stream_id = 0;
    fields := struct {
      integer { size = 64; align = 8; signed = 0; encoding = none; base = 10; } h264parser_queue_src;
      integer { size = 64; align = 8; signed = 0; encoding = none; base = 10; } udpsrc0_src;
      integer { size = 64; align = 8; signed = 0; encoding = none; base = 10; } rtpmp2tdepay0_src;
      integer { size = 64; align = 8; signed = 0; encoding = none; base = 10; } stream_capsfilter_src;
      integer { size = 64; align = 8; signed = 0; encoding = none; base = 10; } mpegtsparse2_0_src;
      integer { size = 64; align = 8; signed = 0; encoding = none; base = 10; } capsfilter1_src;
      integer { size = 64; align = 8; signed = 0; encoding = none; base = 10; } tsdemux0_video_0_0041;
      integer { size = 64; align = 8; signed = 0; encoding = none; base = 10; } depay_queue_src;
      integer { size = 64; align = 8; signed = 0; encoding = none; base = 10; } h264parse0_src;
      integer { size = 64; align = 8; signed = 0; encoding = none; base = 10; } decoder_queue_src;
      integer { size = 64; align = 8; signed = 0; encoding = none; base = 10; } sink_queue_src;
      integer { size = 64; align = 8; signed = 0; encoding = none; base = 10; } omxh264dec_omxh264dec0_src;
      integer { size = 64; align = 8; signed = 0; encoding = none; base = 10; } t_src_0;
      integer { size = 64; align = 8; signed = 0; encoding = none; base = 10; } videorate_src;
    };
};

This is the expected output when you use latest library version v0.6.1 (current master branch)

    name = bitrate;
    id = 7;
    stream_id = 0;
    fields := struct {
        string pad;
        integer { size = 64; align = 8; signed = 0; encoding = none; base = 10; } _bps;
    };
};

I recommend to download the latest gst-shark version and reinstall it in your system and use the previous command to confirm if metadata contains the expected format.

Regards,

mleivaf avatar Nov 07 '19 16:11 mleivaf

Hi @mleivaf

I hit the exact same problem and you're diagnosis is probably right in my case. On the machine running gst-shark, it's v0.2. On the machine plotting gst-shark it's v0.6. Is there any hack-like fix I can use to make the plotting work for now? Installing the latest version might take some effort...

rajatsrao avatar Jul 18 '20 16:07 rajatsrao