imxg2dcompositor video0 and video1,but scale of video0 not correct

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

imxg2dcompositor video0 and video1,but scale of video0 not correct

跳至解决方案
572 次查看
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 项奖励
1 解答
555 次查看
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 项奖励
2 回复数
556 次查看
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 项奖励
563 次查看
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 项奖励