<div dir="ltr">Hi Experts, <div><br></div><div>I have a gstreamer pipeline to send VP8 encoded data using hardware acceleration:</div><div>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<br></div><div><span style="color:black;font-family:"Segoe UI",sans-serif;font-size:10pt"><br></span></div><div><span style="color:black;font-size:10pt"><font face="arial, sans-serif">On the other hand, following pipeline is used to decode the data and display on a videosink:</font></span></div><div>udpsrc port=5000 caps = "application/x-rtp, media=video, clock-rate=90000, encoding-name=VP8, payload=96" ! rtpvp8depay ! decodebin ! videoconvert ! autovideosink<span style="color:black;font-family:"Segoe UI",sans-serif;font-size:10pt"><br></span></div><div><span style="color:black;font-family:"Segoe UI",sans-serif;font-size:10pt"><br></span></div><div><font color="#000000" face="arial, sans-serif"><span style="font-size:13.3333px">When a specific event happens, I change the "aspect-ratio" property on "aspectratiocrop" element to 1/1. I achieve this by using below code:</span></font></div><div><font color="#000000" face="Segoe UI, sans-serif"><span style="font-size:13.3333px"><br></span></font></div><div> <font face="monospace"> GstElement* cropStream = gst_bin_get_by_name(GST_BIN(pipeline), "aspectRatio");<br> if (cropStream == NULL)<br> {<br> return -1;<br> }<br> //Set aspect-ratio property as 1/1.<br> g_object_set(cropStream, "aspect-ratio", 1, 1, NULL);</font><font color="#000000" face="Segoe UI, sans-serif"><span style="font-size:13.3333px"><br></span></font></div><div><font face="monospace"><br></font></div><div><font face="arial, sans-serif">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.</font></div><div><br></div><div>I have tried few things and observations were as follows:</div><div><ol><li>Modified all the default properties on "vaapivp8enc" element --> <b>still pixelated macro-blocks appear</b></li><li>Do not change aspect-ratio property --> <b>pixelated macro-blocks do not appear</b></li><li>Replace hardware accelerated vaapi encoding - "vaapivp8enc" element with normal software enabled encoding - "vp8enc" element -->
<b>pixelated
macro blocks do not appear</b></li></ol></div><div>Please help me understand if</div><div><ol><li>The way I am setting the "aspect-ratio" property directly is correct and why does it impact the encoder? <b>OR</b> 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?</li><li>Are there any specific combination of property values that can be used with "vaapivp8enc" to solve this issue?</li></ol></div><div><br></div><div>Kindly guide me in right direction..</div><div><br></div><div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Thanks and Regards,</div><div dir="ltr">Saurabh Bora<br><div><br></div><div>PH NO : 7038166900</div><div>EMAIL : <a href="mailto:saurabh9bora@gmail.com" style="font-size:12.8px" target="_blank">saurabh9bora@gmail.com</a></div><div> <a href="mailto:saurabh9bora@outlook.com" target="_blank">saurabh9bora@outlook.com</a></div></div></div></div></div></div></div></div></div></div></div>