CSI deinterlace in gstreamer pipeline

Hi,

I have interlaced mipi video source. So far I’m able to capture both even and odd fields as if it was progressive video - without deinterlacing.

Now I would like to deinterlace it. I know (maybe I’m wrong) it is not possible to do this in hw and it has to be done in sw. Would someone be able to share example gstreamer pipeline which would do this?

Thank you.

Hi,
You would need to use deinterlace plugin. Please refer to
deinterlace

Yes, this is the only think I know. Let me specify my question.

  1. What has to be device tree for interlaced mode like? Is there something what has to be specified in device tree node for interlaced mode? I found nothing about interlaced format here .
  2. How am i supposed to specify which frame is top one and which is bottom one?
  3. I tried to run following pipeline but ended with segmentation error ( SIGSEGV exception).
WIDTH=768
HEIGHT=576

gst-launch-1.0 -e nvv4l2camerasrc device=/dev/video0 ! /\
"video/x-raw(memory:NVMM),format=UYVY,width=${WIDTH},height=${HEIGHT}, /\
framerate=60/1,interlace-mode=interlaced" ! /\
        deinterlace ! /\
        nvvidconv ! /\
        rtpvrawpay ! /\
        udpsink host=192.168.137.209 port=5005

Hi,
Are you able to capture through v4l2src? There is no complete path of deinterlacing when using nvv4l2camerasrc. You need to use v4l2src to run like:

v4l2src ! deinterlace ! ...

When I try to capture video using v4l2src plugin I end up with Internal data stream error.

How am I supposed to make my CSI source work with this plugin? Is there something specific what has to be written in device tree or camera driver? According to this the v4l2src is not available (or prefered) when having CSI interface.

Hi,
Are you able to capture frame data through v4l2-ctl commands? You would need to make sure the sensor driver/device tree is ready by running v4l2-ctl commands successfully. We have sensor driver programming guide in developer guide but it is mainly for progressive frame data.

Yes, I’m able to capture data through v4l2-ctl command.

I’m able to capture data like this

v4l2-ctl --set-fmt-video=width=768,height=576
v4l2-ctl --device /dev/video0 --stream-mmap --stream-to=frame --stream-count=1

but this simple pipeline gives me an Internal data stream error.

WIDTH=768
HEIGHT=576
gst-launch-1.0 v4l2src device=/dev/video0 ! \
        "video/x-raw, format=UYVY, width=${WIDTH}, height=${HEIGHT},framerate=60/1" ! \
        fakesink

Yes I noticed you have quite a nice guides for progressive formats but almost nothing for interlaced.

Hi,
Do you see 768x576 UYVY 60fps is listed in $ v4l2-ctl --list-formats-ext?

Generally most use-cases are progressive inputs. We don’t have much experience about interlaced inputs and this would need other users to provide guidance. While googling for information, it seems like this pipeline may work:

$ export DISPLAY=:0(or 1)
$ gst-launch-1.0 v4l2src ! video/x-raw,format=UYVY,framerate=60/1,width=768,height=576,interlace-mode=interlaced ! deinterlace ! videoconvert ! xvimagesink

Hi,
I tried suggested pipeline and ended up with the same error as before.
I hope there is someone who dealt with the same issues.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.