Gstreamer resize video window

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Gstreamer resize video window

跳至解决方案
8,722 次查看
ramaofi
Contributor I

Hi,

I need to make the window size of my gstreamer video smaller than full screen.
I need to view two cameras on the same HDMI screen (1920x1080). (for the left camera and the right camera)
my original video resolution is 720x480.
how may I change the width and the height of the window?
I am using apalis-imx8, ixora carrier board, with OS multimedia image. BSP5.

this command is working fine but with full screen window:
gst-launch-1.0 rtspsrc location=rtsp://172.22.0.195:554/h264 latency=150 ! decodebin ! autovideosink

I have used this command:
gst-launch-1.0 rtspsrc location=rtsp://172.22.0.195:554/h264 latency=150 ! decodebin ! videoscale ! video/x-raw,width=720,height=480 ! autovideosink

but it showed me window like this:

ramaofi_0-1639903804728.jpeg

 

16393827194142040×1530 125 KB
 
this command was not working with imx8, but when using it with my laptop it is working properly " native ubuntu OS laptop". I can resize the window size here by changing the value of the width and the height in this command.
0 项奖励
回复
1 解答
8,713 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Rama

 

for gstreamer resize one can look at sect.7.3.17 Video conversion   i.MX Linux User’s Guide​

 

Best regards
igor

在原帖中查看解决方案

0 项奖励
回复
2 回复数
8,714 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Rama

 

for gstreamer resize one can look at sect.7.3.17 Video conversion   i.MX Linux User’s Guide​

 

Best regards
igor

0 项奖励
回复
8,696 次查看
ramaofi
Contributor I

hi @igorpadykov ,

it worked.

gst-launch-1.0 rtspsrc location=rtsp://172.22.0.195:554/h264 latency=150 ! decodebin ! imxvideoconvert_g2d ! video/x-raw, width=500, height=500 ! ximagesink

 

also I made it also for two videos composition.

gst-launch-1.0 imxcompositor_g2d name=comp \
sink_0::xpos=0 sink_0::ypos=0 sink_0::width=700 sink_0::height=500 \
sink_1::xpos=800 sink_1::ypos=0 sink_1::width=700 sink_1::height=500 ! \
video/x-raw,format=RGB16 ! waylandsink \
rtspsrc location=rtsp://172.22.0.195:554/h264 latency=150 ! decodebin ! imxvideoconvert_g2d ! video/x-raw,width=640,height=480 ! comp.sink_0 \
rtspsrc location=rtsp://172.22.0.195:554/h264 latency=150 ! decodebin ! imxvideoconvert_g2d ! video/x-raw,width=640,height=480 ! comp.sink_1

0 项奖励
回复