gstreamer插件例子

videobox

介绍:videobox

 * This plugin crops or enlarges the image. It takes 4 values as input, a

 * top, bottom, left and right offset. Positive values will crop that much

 * pixels from the respective border of the image, negative values will add

 * that much pixels. When pixels are added, you can specify their color.

该插件可以用来加边框,上下左右都可以加。

case:  输入图的尺寸比模型的尺寸小,但是不希望做拉伸,只希望做填充。用这个命令可以实现希望的效果:gst-launch-1.0 videotestsrc ! video/x-raw,width=300,height=300 ! videobox left=-10 top=-100 bottom=-200 right=-300 ! xvimagesink

效果图如下图,如果不用videobox,就没有黑框。

gstreamer插件例子_第1张图片

你可能感兴趣的:(gstreamer,deepstream)