imxg2dcompositor video0 and video1,but scale of video0 not correct

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

imxg2dcompositor video0 and video1,but scale of video0 not correct

Jump to solution
526 Views
adorable
Contributor III

Hardware:imx6q 

Sofrware: kernel 4.9.88 gstreamer1.0

Plugin:imxg2dcompositor 

Pipeline: gst-launch-1.0 \
imxg2dcompositor name=c background-color=0xff border-alpha=0 \
sink_0::xpos=0 sink_0::ypos=0 sink_0::width=384 sink_0::height=288 sink_0::fill_color=0xff00ff00 sink_0::zorder=55 sink_0::alpha=0.7 sink_0::rotation=0 \
sink_1::xpos=0 sink_1::ypos=0 sink_1::width=640 sink_1::height=480 ! \
queue2 ! "video/x-raw, width=640, height=288,format=RGBA" ! overlaysink \
imxv4l2videosrc device=/dev/video0 ! imxipuvideotransform ! video/x-raw, width=384, height=288, format=RGBA ! c.sink_0 \
imxv4l2videosrc device=/dev/video1 ! c.sink_1

Result: video1 is OK,but video0 scale height is not 288,and be filled with green back-color.Why?and How should I do to fixed it?

video1:640*480 I420

video0:384*288 RGBA

ERR.png

0 Kudos
1 Solution
509 Views
adorable
Contributor III

The reason is pixel-aspect-ratio has been chaned to others.Using pixel-aspect-ratio=1/1 as caps is OK.

And my pipe line is as follows:

gst-launch-1.0 \
imxg2dcompositor name=c background-color=0x000000 border-alpha=0 \
sink_0::xpos=0 sink_0::ypos=0 sink_0::width=640 sink_0::height=480 sink_0::zorder=55 sink_0::fill_color=0xff00ff00 sink_0::alpha=0.7 sink_0::rotation=0 \
sink_1::xpos=640 sink_1::ypos=0 sink_1::width=640 sink_1::height=480 ! \
queue2 ! "video/x-raw, width=1280, height=480,format=RGBA" ! overlaysink\
imxv4l2videosrc device=/dev/video0 ! tee name=t ! queue ! hzncchytransform pseudo-color=1 ! video/x-raw, width=384, height=288, format=RGBA,pixel-aspect-ratio=1/1 ! c.sink_0 t. ! queue ! fakesink \
imxv4l2videosrc device=/dev/video1 ! c.sink_1

the plugin hzncchytransform is my own.using this plugins to producess video0 raw_data (separate frame_data and to RGBA format).

plugin hzncchytransform code is:

https://github.com/tttg/hzncctransform.git

 

View solution in original post

0 Kudos
2 Replies
510 Views
adorable
Contributor III

The reason is pixel-aspect-ratio has been chaned to others.Using pixel-aspect-ratio=1/1 as caps is OK.

And my pipe line is as follows:

gst-launch-1.0 \
imxg2dcompositor name=c background-color=0x000000 border-alpha=0 \
sink_0::xpos=0 sink_0::ypos=0 sink_0::width=640 sink_0::height=480 sink_0::zorder=55 sink_0::fill_color=0xff00ff00 sink_0::alpha=0.7 sink_0::rotation=0 \
sink_1::xpos=640 sink_1::ypos=0 sink_1::width=640 sink_1::height=480 ! \
queue2 ! "video/x-raw, width=1280, height=480,format=RGBA" ! overlaysink\
imxv4l2videosrc device=/dev/video0 ! tee name=t ! queue ! hzncchytransform pseudo-color=1 ! video/x-raw, width=384, height=288, format=RGBA,pixel-aspect-ratio=1/1 ! c.sink_0 t. ! queue ! fakesink \
imxv4l2videosrc device=/dev/video1 ! c.sink_1

the plugin hzncchytransform is my own.using this plugins to producess video0 raw_data (separate frame_data and to RGBA format).

plugin hzncchytransform code is:

https://github.com/tttg/hzncctransform.git

 

0 Kudos
517 Views
joanxie
NXP TechSupport
NXP TechSupport

how about removing the alpha option? I found your command is :

"video/x-raw, width=640, height=288,format=RGBA"

is this typo?

0 Kudos