I am using gstreamer and the nvidia provided hw accelerated plugins to decode and encode video. Is there a way to tell how much time is spend doing the decode and encode step of a pipeline?
I found some tools ( GitHub - kirushyk/gst-instruments: Easy-to-use profiler for GStreamer) that provide timing information for different elements of a pipeline but it doesn’t seem to understand how much time is spent in the hw accelerated plugins.
I tried this on my pipeline that transcodes a video file.
I don’t think that the gst-top tool is able to record how much time is actually being spent by the hw decoder and encoder. My theory that it is only recording the time taken by the sw to pass the data back and forth to the hardware decoder and encoder.
gst-launch reports total running time of
Execution ended after 0:01:42.139042670 (102.14 seconds)
Adding up all the running time of gst-top comes to 69.912 seconds leaving 32.228 seconds un accounted for.
Here are the pipeline and the results I found.
gst-top-1.0 gst-launch-1.0 -e mpegtsmux name=m ! filesink location=uhd1280x720hwenc.mp4 filesrc location=uhd.trp ! tsdemux name=dem dem. ! queue ! h265parse ! omxh265dec ! nvvidconv ! ‘video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)I420’ ! omxh264enc profile=8 ! m. dem. ! queue ! avdec_aac ! audioconvert ! voaacenc ! m.
ELEMENT %CPU %TIME TIME
voaacenc0 23.6 34.5 24.1 s
m 7.4 10.9 7.59 s
h265parse0 7.3 10.7 7.51 s
filesink0 5.7 8.4 5.87 s
dem 5.7 8.3 5.80 s
nvvconv0 4.5 6.6 4.60 s
avdec_aac0 4.5 6.5 4.57 s
filesrc0 3.5 5.1 3.56 s
audioconvert0 2.5 3.7 2.58 s
omxh265dec-omxh265dec0 1.9 2.8 1.95 s
omxh264enc-omxh264enc0 0.6 0.8 580 ms
capsfilter0 0.4 0.6 454 ms
queue0 0.4 0.6 410 ms
queue1 0.3 0.5 338 ms
pipeline0 0.0 0.0 0 ns
Regards,
Rand