How to do video crop in gstream

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

How to do video crop in gstream

3,705件の閲覧回数
santhosh2
Contributor IV

Hi,

The resolution is set to 1920x1080 i want to crop it to 1728x1080 how to do in gstreamer

 

Regards

 

Santhosh

0 件の賞賛
返信
4 返答(返信)

3,698件の閲覧回数
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi

 

Like this :

gst-launch-1.0 v4l2src device=/dev/video2 ! 'video/x-raw,width=1728,height=1080,framerate=30/1'  ! autovideosink

0 件の賞賛
返信

3,672件の閲覧回数
santhosh2
Contributor IV

Hello,

I am trying to crop the video, Im getting below messages

gst-launch-1.0 v4l2src device=/dev/video0 ! 'video/x-raw,width=1280,height=720' ! videoconvert ! videocrop top=42 left=1 right=4 bottom=0 ! videoconvert ! vpuenc_h264 ! rtph264pay ! multiudpsink auto-multicast=true send-duplicates = true bind-port=5000 clients="255.255.255.255:5000"

WARNING: erroneous pipeline: could not link videoconvert1 to vpuenc_h264-0

----------------------------------------------------------------------------------------------------------------------------------

gst-launch-1.0 v4l2src device=/dev/video0 ! 'video/x-raw,width=1280,height=720' ! videoconvert ! videocrop left=10 top=20 bottom=80 right=20 ! vpuenc_h264 ! imxvideoconvert_g2d ! rtph264pay ! multiudpsink auto-multicast=true send-duplicates = true bind-port=5000 clients="255.255.255.255:5000"

Error:

Setting pipeline to PAUSED ...
====== VPUENC: 4.4.4 build on Feb 11 2021 05:03:33. ======
wrapper: 3.0.0 (VPUWRAPPER_ARM64_LINUX Build on Feb 11 2021 04:34:02)
vpulib: 1.1.1
firmware: 1.1.1.65535
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
../../../../git/libs/gst/base/gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.006898500
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
rue send-duplicates = true bind-port=5000 clients="255.255.255.255:5000"ticast=t
WARNING: erroneous pipeline: could not link videocrop0 to vpuenc_h264-0

----------------------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

3,665件の閲覧回数
Zhiming_Liu
NXP TechSupport
NXP TechSupport

The convert plugin in evk are :imxvideoconvert_ipu, imxvideoconvert_g2d, and imxvideoconvert_pxp

You can find more information in i.MX_Linux_User's_Guide.pdf

0 件の賞賛
返信

3,689件の閲覧回数
santhosh2
Contributor IV

Thanks for the quick reply,

That is not working in my case because we are using the custom camera that outputs 1920 x 1080 p

do let me know any other alternate method

0 件の賞賛
返信