使用gst-launch将视频帧输出到帧缓冲区上的特定位置 [英] Use gst-launch to output a video frame to certain position on framebuffer

查看:466
本文介绍了使用gst-launch将视频帧输出到帧缓冲区上的特定位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前,我们正在使用以下命令来播放视频片段:

Currently we are using below command to play a video clip:

gst-launch filesrc location=/media/sda1/mpeg4_640x480.mp4 ! decodebin2 name=dec ! queue ! ffmpegcolorspace ! videoscale ! video/x-raw-rgb,width=320, height=240 ! fbdevsink dec. ! queue ! audioconvert ! autoaudiosink

视频帧重新调整为320x240并输出到帧缓冲区.但是,我们想将视频帧设置为特定(x,y).有可能吗?

The video frame is reiszed to 320x240 and outputted to the framebuffer. However, we'd like to set the video frame to certain (x, y). Is that possible?

推荐答案

尝试使用"videobox"元素.在top,left,bottom和right属性中,正值用于裁切,因此您要使用值进行补偿.

Try using the "videobox" element. In the top, left, bottom, and right properties, positive values are used for cropping, so you'll want to use negative values for offsetting.

此管道会将640x360视频测试源移动到1280x720输出的右下角:

This pipeline would move a 640x360 video test source to the bottom right corner of a 1280x720 output:

gst-launch-1.0 videotestsrc! video/x-raw,width = 640,height = 360! 视频转换!影音盒左= -640右= 0上== 360底= 0 =! video/x-raw,width = 1280,height = 720!自动视频接收器

gst-launch-1.0 videotestsrc ! video/x-raw,width=640,height=360 ! videoconvert ! videobox left=-640 right=0 top=-360 bottom=0 ! video/x-raw,width=1280,height=720 ! autovideosink

您可以使用"fill"属性来控制空间的填充方式.

And you can use the "fill" property to control how the space is filled.

http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good-plugins/html/gst-plugins-good-plugins-videobox.html

这篇关于使用gst-launch将视频帧输出到帧缓冲区上的特定位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆