Gstreamer resize video window

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Gstreamer resize video window

Jump to solution
6,096 Views
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 Kudos
Reply
1 Solution
6,087 Views
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

View solution in original post

0 Kudos
Reply
2 Replies
6,088 Views
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 Kudos
Reply
6,070 Views
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 Kudos
Reply