Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
25 Views

Unable to get vaapipostproc element to work with `format=bgr`.

Plugin Details:
  Name                     vaapi
  Description              VA-API based elements
  Filename                 /opt/intel/openvino_2020.2.120/data_processing/gstreamer/lib/gstreamer-1.0/libgstvaapi.so
  Version                  1.16.2
  License                  LGPL
  Source module            gstreamer-vaapi
  Binary package           gstreamer-vaapi
  Origin URL               http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer
 

Launching RTSP encoded stream with the following pipeline: ( videotestsrc  ! videoscale ! video/x-raw,width=1280,height=720 ! capsfilter ! queue ! x264enc speed-preset=superfast ! rtph264pay name=pay0 pt=96  )

Gstreamer Pipleline used to decode the frame and read the buffer into application from appsink: ( rtspsrc location=rtsp://localhost:8554/live.sdp latency=100 ! rtph264depay ! h264parse ! vaapih264dec ! vaapipostproc format=bgr ! videoconvert ! video/x-raw,format=BGR ! appsink )

The above gstreamer pipeline does not work and produced the following failure when tested with gst-launch-1.0 tool in GST_DEBUG mode:

```
0:00:02.229807981 21492 0x7f32040034f0 WARN           basetransform gstbasetransform.c:1371:gst_base_transform_setcaps:<vaapipostproc0> FAILED to configure incaps video/x-raw(memory:VASurface), format=(string)NV12, width=(int)1280, height=(int)720, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1 and outcaps video/x-raw, width=(int)1280, height=(int)720, framerate=(fraction)30/1, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, format=(string)BGR, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, colorimetry=(string)sRGB
```

The vaapipostproc element works with `format=bgrx` and then videoconvert can be used to force the pixel format to BGR. But we would want the element to work with `format=bgr` itself (as bgr format is mentioned in the plugin inspect) and avoid the overhead caused by videoconvert element.


 

0 Kudos
2 Replies
Highlighted
25 Views

Any updates on the thread ?

Any updates on the thread ?

0 Kudos
Highlighted
Moderator
25 Views

Hi S, Sandesh Kumar,

Hi S, Sandesh Kumar,

From the document of the vaapipostproc attributes, it doesn’t support BGR as output (src): https://gstreamer.freedesktop.org/documentation/vaapi/vaapipostproc.html?gi-language=c

This is a limitation of vaapipostproc, I am not sure if there is a way to get around it. Since vaapih264dec outputs BGRx; I think instead of removing videoconvert you could remove vaapipostproc.

 

Best Regards,

Luis

0 Kudos