gstreamer videoscale not working on imx8m mini

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

gstreamer videoscale not working on imx8m mini

4,100 Views
greeranjunk
Contributor III

I am trying to videoscale my video but with no success. the command i use 

gst-launch-1.0 -vv v4l2src ! video/x-raw,width=720,height=576 ! queue ! videoscale ! video/x-raw,width=1024,height=720 ! waylandsink

i see the the videoscale is happening but just before the output there is another videoscale to the original scale. 

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, width=(int)720, height=(int)576, format=(string)YUY2, framerate=(fraction)50/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)be
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, width=(int)720, height=(int)576, format=(string)YUY2, framerate=(fraction)50/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(ste
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-raw, width=(int)720, height=(int)576, format=(string)YUY2, framerate=(fraction)50/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt70e
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-raw, width=(int)720, height=(int)576, format=(string)YUY2, framerate=(fraction)50/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt70e
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, width=(int)720, height=(int)576, format=(string)YUY2, framerate=(fraction)50/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(se
/GstPipeline:pipeline0/GstVideoScale:videoscale0.GstPad:src: caps = video/x-raw, width=(int)1024, height=(int)720, format=(string)YUY2, framerate=(fraction)50/1, pixel-aspect-ratio=(fraction)225/256, colorimetre
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = video/x-raw, width=(int)1024, height=(int)720, format=(string)YUY2, framerate=(fraction)50/1, pixel-aspect-ratio=(fraction)225/256, colorimetre
/GstPipeline:pipeline0/GstWaylandSink:waylandsink0.GstPad:sink: caps = video/x-raw, width=(int)1024, height=(int)720, format=(string)YUY2, framerate=(fraction)50/1, pixel-aspect-ratio=(fraction)225/256, colorime
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = video/x-raw, width=(int)1024, height=(int)720, format=(string)YUY2, framerate=(fraction)50/1, pixel-aspect-ratio=(fraction)225/256, colorimete
/GstPipeline:pipeline0/GstVideoScale:videoscale0.GstPad:sink: caps = video/x-raw, width=(int)720, height=(int)576, format=(string)YUY2, framerate=(fraction)50/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(se

Why does the videoscale not stay as in the command?

Labels (1)
0 Kudos
Reply
10 Replies

4,090 Views
greeranjunk
Contributor III

hi joanxie

from reading the gst-inspect on imxvideoconvert_g2d i could not find any resize or resolution change option. there is format converting or rotation but not resizing. if you could send me an example how to resize with imxvideoconvert_g2d that will be great

i also tried the render-rectangle with no success.

thanks

Ran

0 Kudos
Reply

4,096 Views
joanxie
NXP TechSupport
NXP TechSupport

if you want to resize, how about using imxvideoconvert_g2d instead of videoscale?

0 Kudos
Reply

4,080 Views
greeranjunk
Contributor III

hi joanxie

from reading the gst-inspect on imxvideoconvert_g2d i could not find any resize or resolution change option. there is format converting or rotation but not resizing. if you could send me an example how to resize with imxvideoconvert_g2d that will be great

i also tried the render-rectangle with no success.

thanks

Ran

0 Kudos
Reply

4,073 Views
joanxie
NXP TechSupport
NXP TechSupport

refer to the linux user guide,

Resize
gst-launch-1.0 videotestsrc ! video/x-raw,format=NV12,width=800,height=600 ! imxvideoconvert_{xxx} !
video/x-raw, width=640, height=480 ! ximagesink display=:0

for imxvideoconvert_{xxx}, you can use imxvideoconvert_g2d

 

0 Kudos
Reply

4,024 Views
greeranjunk
Contributor III

thanks for the reply

the imxvideoconverte_g2d works with the ximagesink. the problem is that it uses 80% of CPU. is there an option to use the waylandsink or glimagesink to handle this kind of convertions?

also if seems that i made also an error in the explanation. it seems that the video is in all of the screen but has large black borders on the side as if to fix the aspect-ratio.

could there be a solution using the wayland or glimage, that use the gpu and not the cpu, to stretch the width to full screen, or all the stretching and converting can be done only on the ximagesink with the cpu?

thanks

Ran

0 Kudos
Reply

4,015 Views
joanxie
NXP TechSupport
NXP TechSupport

you can change it to the waylandsink, do you test it? the command I sent to you just for reference, you can change it as your demands, if you want to capture full screen video from camera, you can try the command like:

gst-launch-1.0 v4l2src ! video/x-raw,width=640,height=480 ! waylandsink

0 Kudos
Reply

4,008 Views
greeranjunk
Contributor III

hello

our camera supports only video/x-raw,width=720,height=576, any other format the mipi driver does not support and fails

 

0 Kudos
Reply

3,992 Views
joanxie
NXP TechSupport
NXP TechSupport

what camera do you use? interlaced ?

 

0 Kudos
Reply

3,972 Views
greeranjunk
Contributor III

its a proprietary camera that converts the interlaced video to progressive but keeps the resolution. it has only one resolution option

 

0 Kudos
Reply

3,880 Views
joanxie
NXP TechSupport
NXP TechSupport

try the latest bsp version, which can support video scale

 

0 Kudos
Reply