gstreamer videoscale not working on imx8m mini

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

gstreamer videoscale not working on imx8m mini

6,627件の閲覧回数
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 返答(返信)

6,617件の閲覧回数
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 件の賞賛
返信

6,623件の閲覧回数
joanxie
NXP TechSupport
NXP TechSupport

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

0 件の賞賛
返信

6,607件の閲覧回数
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 件の賞賛
返信

6,600件の閲覧回数
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 件の賞賛
返信

6,551件の閲覧回数
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 件の賞賛
返信

6,542件の閲覧回数
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 件の賞賛
返信

6,535件の閲覧回数
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 件の賞賛
返信

6,519件の閲覧回数
joanxie
NXP TechSupport
NXP TechSupport

what camera do you use? interlaced ?

 

0 件の賞賛
返信

6,499件の閲覧回数
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 件の賞賛
返信

6,407件の閲覧回数
joanxie
NXP TechSupport
NXP TechSupport

try the latest bsp version, which can support video scale

 

0 件の賞賛
返信