gstreamer videoscale not working on imx8m mini

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

gstreamer videoscale not working on imx8m mini

3,018 次查看
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?

标签 (1)
0 项奖励
10 回复数

3,008 次查看
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 项奖励

3,014 次查看
joanxie
NXP TechSupport
NXP TechSupport

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

0 项奖励

2,998 次查看
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 项奖励

2,991 次查看
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 项奖励

2,942 次查看
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 项奖励

2,933 次查看
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 项奖励

2,926 次查看
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 项奖励

2,910 次查看
joanxie
NXP TechSupport
NXP TechSupport

what camera do you use? interlaced ?

 

0 项奖励

2,890 次查看
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 项奖励

2,798 次查看
joanxie
NXP TechSupport
NXP TechSupport

try the latest bsp version, which can support video scale

 

0 项奖励