Giter VIP home page Giter VIP logo

gst-instruments's Introduction

GStreamer Instruments

Set of performance profiling and data flow inspection tools for GStreamer pipelines.

gst-instruments

gst-instruments displays the trace file.

GStreamer Instruments UI

Opening the file from the command-line is supported:

$ gst-instruments-1.0 pipeline0.gsttrace

gst-top

Inspired by top and perf-top, this utility displays performance report for the particular command, analyzing GStreamer ABI calls.

$ gst-top-1.0 gst-launch-1.0 audiotestsrc num-buffers=1000 ! vorbisenc ! vorbisdec ! fakesink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Redistribute latency...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 0:00:00.225688000
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
ELEMENT        %CPU   %TIME   TIME
vorbisenc0      73.8   74.3    172 ms
vorbisdec0      13.5   13.6   31.4 ms
audiotestsrc0    8.1    8.2   18.9 ms
fakesink0        4.0    4.0   9.21 ms
pipeline0        0.0    0.0      0 ns
$

Generating the trace file

Intercepts GStreamer ABI calls and records communication between the app and GStreamer into the trace file.

macOS example

$ DYLD_INSERT_LIBRARIES=/usr/local/lib/libgstintercept.dylib \
    DYLD_FORCE_FLAT_NAMESPACE= \
    GST_DEBUG_DUMP_TRACE_DIR=. \
    gst-launch-1.0 audiotestsrc num-buffers=1000 ! vorbisenc ! vorbisdec ! fakesink
Setting pipeline to PAUSED ...
[...]
Freeing pipeline ...
$ ls *.gsttrace
pipeline0.gsttrace

Linux example

$ LD_PRELOAD=/usr/lib/libgstintercept.so \
    GST_DEBUG_DUMP_TRACE_DIR=. \
    gst-launch-1.0 audiotestsrc num-buffers=1000 ! vorbisenc ! vorbisdec ! fakesink
Setting pipeline to PAUSED ...
[...]
Freeing pipeline ...
$ ls *.gsttrace
pipeline0.gsttrace

gst-report

Generates performance report for input trace file.

$ gst-report-1.0 playbin.gsttrace
ELEMENT               %CPU   %TIME   TIME
mad0                   33.4   26.5    806 ms
source                 10.5    8.3    253 ms
aconv                   9.8    7.8    237 ms
streamsynchronizer0     8.4    6.6    202 ms
mpegaudioparse0         8.2    6.5    197 ms
typefind                7.1    5.7    172 ms
inputselector0          7.1    5.6    171 ms
id3demux0               7.0    5.5    168 ms
volume                  6.9    5.5    166 ms
resample                6.7    5.3    161 ms
playsink                5.9    4.7    142 ms
aqueue                  5.6    4.5    136 ms
fakesink0               5.3    4.2    127 ms
abin                    4.2    3.4    102 ms
uridecodebin0           0.0    0.0    161 us
conv                    0.0    0.0   20.0 us
audiotee                0.0    0.0      0 ns
identity                0.0    0.0      0 ns
decodebin0              0.0    0.0      0 ns
playbin                 0.0    0.0      0 ns
$

You can generate performance graph in DOT format:

gst-report-1.0 --dot playbin.gsttrace | dot -Tsvg > perf.svg

gst-instruments's People

Contributors

kirushyk avatar ribalda avatar ohsewon avatar fthiery avatar larseje avatar tsaunier avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.