Problem with videocrop on gstreamer

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

Problem with videocrop on gstreamer

786 次查看
szilard_b_cib
Contributor II

Dear NXP team,

 

I tried the pipeline [1], but I encountered an error [2]. Then, I tested the mosaic pipeline [3] (since we will be using a mosaic setup) and got the result [4]. Cropping from the right and bottom worked as expected, but when cropping from the top, it also cropped the bottom. Similarly, when cropping from the left, it also cropped the right. Is there an option to crop on the left without modifying the right part and to crop on the top without modifying the bottom part?

I'm using imx8mplus with gstreamer 1.22 with Mickledore kernel 6.1.36 yocto image.

 

Regards,
Szilard B


[1] gst-launch-1.0 -v videotestsrc ! videocrop top=100 left=0 right=0 bottom=0 ! waylandsink

[2] GST_DEBUG=3 gst-launch-1.0 -v videotestsrc ! videocrop top=100 left=0Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
0:00:00.067107875 67279 0xaaaafda2cd20 FIXME default gstutils.c:4031:gst_pad_create_stream_id_internal:<videotestsrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
/GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = video/x-raw, format=(string)BGRA, width=(int)320, height=(int)240, framerate=(fraction)30/1, multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstVideoCrop:videocrop0.GstPad:src: caps = video/x-raw, format=(string)BGRA, width=(int)320, height=(int)140, framerate=(fraction)30/1, multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstWaylandSink:waylandsink0.GstPad:sink: caps = video/x-raw, format=(string)BGRA, width=(int)320, height=(int)140, framerate=(fraction)30/1, multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstVideoCrop:videocrop0.GstPad:sink: caps = video/x-raw, format=(string)BGRA, width=(int)320, height=(int)240, framerate=(fraction)30/1, multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive
0:00:00.071841000 67279 0xaaaafda2cd20 WARN videopool gstvideopool.c:226:video_buffer_pool_set_config:<wlvideobufferpool2> Provided size is to small for the caps: 179200 < 307200
0:00:00.076864750 67279 0xaaaafda2cd20 WARN wlwindow gstwlwindow.c:492:gst_wl_window_new_internal: init surface_state fail, fallback to scale=1 fullscreen (800x600) panel-height (0)
wp_viewport@19: error 2: wl_surface@16 has viewport source outside buffer
0:00:00.078202375 67279 0xaaaafda2cc60 ERROR wldisplay gstwldisplay.c:516:gst_wl_display_thread_run: Error communicating with the wayland server
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
Redistribute latency...
New clock: GstSystemClock
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:01.94434275

 

[3]

gst-launch-1.0 \
videotestsrc ! videocrop top=30 left=0 right=0 bottom=0 ! videomixer.sink_0 \
videotestsrc ! videocrop top=0 left=30 right=0 bottom=0 ! videomixer.sink_1 \
videotestsrc ! videocrop top=0 left=0 right=30 bottom=0 ! videomixer.sink_3 \
videotestsrc ! videocrop top=0 left=0 right=0 bottom=30 ! videomixer.sink_4 \
imxcompositor_g2d name=videomixer \
sink_0::xpos=0 sink_0::ypos=0 sink_0::width=600 sink_0::height=480 sink_0::keep-ratio=true \
sink_1::xpos=640 sink_1::ypos=0 sink_1::width=600 sink_1::height=480 sink_1::keep-ratio=true \
sink_3::xpos=0 sink_3::ypos=560 sink_3::width=600 sink_3::height=480 sink_3::keep-ratio=true \
sink_4::xpos=640 sink_4::ypos=560 sink_4::width=600 sink_4::height=480 sink_4::keep-ratio=true \
! waylandsink sync=false enable-last-sample=false qos=false

 

[4]

szilard_b_0-1739884921018.png

 

标记 (3)
0 项奖励
回复
1 回复

769 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

To effectively use the videocrop Gstreamer plugin on the iMX8 you can refer to the iMX Linux User Guide section 7.3.17 Video Conversion.

i.MX Linux User's Guide (nxp.com)

It seems you are missing the plugin imxvideoconvert_g2d videocrop-meta-enable=true.

regards

0 项奖励
回复