Is there a way to use accelerated decode with gtksink?

Currently I am using non-accelerated playback because the ‘videoconvert’ plugin does not support NVMM memory video format.

So I can do this:

gst-launch-1.0 filesrc location=capture.mkv ! matroskademux name=demux demux.video_[0|1] ! queue ! h265parse ! omxh265dec disable-dvfs=1 ! queue ! videoconvert name=videoconvert ! gtksink

This works fine but for multiple 4k@30fps streams the CPUs are overloaded and there is a lot of drop.

Accelerated decode works fine via:

gst-launch-1.0 filesrc location=capture.mkv ! matroskademux name=demux demux.video_[0|1] ! queue ! h265parse ! omxh265dec disable-dvfs=1 ! nvvidconv ! 'video-raw(memory=NVMM),format=(string)NV12' ! queue ! nvoveralysink -e

Again it works.

But what I really want is combine the NVMM acceleration and send it to gtksink to embed in my application. Is this supported or am I stuck in slowland for now? Basically, is there a way to build a PyGTK applicaiton that leverages the TX2’s hardware decoder without using nvoverlaysink? Does anyone have an example of this working?

Hi,
We don’t have experience of using gtksink. Running gst-inspect-1.0 shows video/x-raw,format=BGRx is supported. You may try

... ! omxh265dec ! nvvidconv ! video/x-raw,format=BGRx ! gtksink

That will surely work but it is not accelerated:

28827 nvidia    20   0 1071892 170272  50104 R 133.3  2.1   0:07.07 gst-launch-1.0                                                                                                                                               

A guess a more generic question, how do you build a simple player app in PyGTK using NVIDIA’s decoder with GStreamer? Is it not possible right now?

Hi,

By default it is not possible since gtksink cannot handle video/x-raw(memory:NVMM) buffers.