pixelated macro-blocks on videosink with hardware-acceleration

Saurabh Bora saurabh9bora at gmail.com
Mon Oct 14 21:04:51 UTC 2019


Hi Experts,

I have a gstreamer pipeline to send VP8 encoded data using hardware
acceleration:
videotestsrc is-live=yes ! aspectratiocrop aspect-ratio=4/3 ! vaapivp8enc !
rtpvp8pay !application/x-rtp,media=video,encoding-name=VP8,payload=96  !
udpsink host-127.0.0.1 port=5000

On the other hand, following pipeline is used to decode the data and
display on a videosink:
udpsrc port=5000 caps = "application/x-rtp, media=video, clock-rate=90000,
encoding-name=VP8, payload=96" ! rtpvp8depay ! decodebin ! videoconvert !
autovideosink

When a specific event happens, I change the "aspect-ratio" property on
"aspectratiocrop" element to 1/1. I achieve this by using below code:

  GstElement* cropStream = gst_bin_get_by_name(GST_BIN(pipeline),
"aspectRatio");
  if (cropStream == NULL)
  {
      return -1;
  }
  //Set aspect-ratio property as 1/1.
  g_object_set(cropStream, "aspect-ratio", 1, 1, NULL);

The property is successfully changed and aspect ratio changes to "1/1".
However, for a second or so, macro-blocks of pixels with pink color appear
on the videosink. These macro-blocks are really ugly and not desired.

I have tried few things and observations were as follows:

   1. Modified all the default properties on "vaapivp8enc" element -->
*still pixelated
   macro-blocks appear*
   2. Do not change aspect-ratio property  --> *pixelated macro-blocks do
   not appear*
   3. Replace hardware accelerated vaapi encoding - "vaapivp8enc" element
   with normal software enabled encoding - "vp8enc" element --> *pixelated
   macro blocks do not appear*

Please help me understand if

   1. The way I am setting the "aspect-ratio" property directly is correct
   and why does it impact the encoder? *OR* Ideal way to set property in a
   running pipeline is - pause pipeline, unlink element, create element with
   right property, link element, play the pipeline again?
   2. Are there any specific combination of property values that can be
   used with "vaapivp8enc" to solve this issue?


Kindly guide me in right direction..

-- 
Thanks and Regards,
Saurabh Bora

PH NO : 7038166900
EMAIL : saurabh9bora at gmail.com
             saurabh9bora at outlook.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20191015/1f1cc6c4/attachment-0001.html>


More information about the gstreamer-devel mailing list