Packed YUV pixel formats in nvhdmioverlaysink


the following pipeline produces a corrupted pattern (Jetson TK1, OS R21.4):

gst-launch-1.0 -v videotestsrc pattern=smpte ! video/x-raw,format=UYVY,width=1280,height=720,framerate=50/1 ! nvhdmioverlaysink

Is this a bug or am I doing something wrong? I found a way to solve it using nvvidconv, although it requires conversion to I420 (conversion to UYVY yields no visible results):

gst-launch-1.0 -v videotestsrc ! video/x-raw,format=UYVY,width=1280,height=720 ! nvvidconv ! 'video/x-raw(memory:NVMM),format=I420' ! nvhdmioverlaysink

According to the K1’s multimedia user guide, I420, UYVY and and NV12 formats are supported by nvvidconv.

Thanks in advance,

Anyone? Perhaps this is the wrong forum for this kind of questions?

Hello, EmilioG:
‘nvhdmioverlaysink’ output raw data directly to hdmi, so with wrong format, it will show mess.
‘nvvidconv’ can convert the data to desired format. That’s correct.
is there any problem?


Thanks jachen,

well, there is clearly a documentation problem, since nowhere in the documentation is stated that “‘nvhdmioverlaysink’ output raw data directly to hdmi”, and neither is that only I420 is supported (the “Multimedia User Guide” actually plays with various pixel formats).

Another question I have is the misterious “overlay” (“Overlay index”, according to gst-inspect) attribute of nvhdmioverlaysink… is it somehow related to availability of multiple overlay layers? How do you use it?

If not, how would you go about efficiently composing two video sources using a colour key? I’ve seen the videomixer GST plug-in, but it seems to be software-based, and I’m looking for something more of a hardware-accelerated compositing, to save CPU resources.

Thanks in advance,

Hello, Emilio:
You are right. overlay can be specified.
Now 2 overlays are supported. You can display 2 streams simultaneously by setting overlay=1/2.


Could you provide any more specific details?

  • Can the two overlays be superimposed? how?
  • Is chroma key composing or alpha blending possible? how?


Hello, Emilio:
‘nvhdmioverlaysink’ can support 2 overlays.
But that cannot support complex image composition, like alpha blending.

You can try opengl API for more complicated image composition.