Re: imx8mp mipi csi camera overlay: Unable to retrieve endpoint for port@1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Tim Harvey (2023-07-12 00:45:10)
> On Tue, Jul 11, 2023 at 3:49 PM Kieran Bingham
> <kieran.bingham@xxxxxxxxxxxxxxxx> wrote:
> >
> > Hi Tim,
> >

<snip>

> > >
> > > Hi Adam,
> > >
> > > Thanks, this helped point me in the right direction and proves the
> > > video capture device works with v4l2.
> > >
> > > For the imx219 which can capture 640x480 raw 8bit bayer:
> > > # configure media entities for 8-bit raw bayer 640x480
> > > media-ctl -v -V "'imx219 3-0010':0 [fmt:SRGGB8/640x480 field:none]"
> > > media-ctl -v -V "'crossbar':0 [fmt:SRGGB8/640x480 field:none]"
> > > media-ctl -v -V "'mxc_isi.0':0 [fmt:SRGGB8/640x480 field:none]"
> > > # configure for RGGB (8-bit bayer) 640x480
> > > v4l2-ctl --device /dev/video0
> > > --set-fmt-video=width=640,height=480,pixelformat=RGGB --verbose
> > > # capture a frame
> > > v4l2-ctl --device /dev/video0 --stream-mmap --stream-to=frame.raw
> > > --stream-count=1
> > > convert -size 640x480 -depth 8 gray:frame.raw frame.png # convert to png
> > > # stream to display
> > > gst-launch-1.0 v4l2src ! \
> > >       video/x-bayer,format=rggb,width=640,height=480,framerate=10/1 ! \
> > >       bayer2rgb ! fbdevsink
> > >
> >
> > I would expect if that's all working then libcamera with the ISI
> > pipeline handler would be able to handle all of the media-ctl
> > configuration for you.
> >
> > You should be able to use this directly (without needing calls to media-ctl):
> >
> > gst-launch-1.0 libcamerasrc ! \
> >         video/x-bayer,format=rggb,width=640,height=480 ! \
> >         bayer2rgb ! fbdevsink
> >
> > in the same way.
> >
> > If it does work, I'd be interested to hear that, and if it doesn't -
> > then lets fix it!
> >
> > Note I removed the framerate=10/1 as that's the part I would suspect
> > might cause issues in the libcamerasrc. It's likely worth trying both
> > with and without it.
> 
> Hi Kieran,
> 
> I've never looked into libcamera before but I love the idea of not
> needing to deal with media-ctl pipelines. I don't see a libcamerasrc

Indeed, that's one of the key points of libcamera - to handle all this
complexity of routing, configuration, and format propogation for every
platform on behalf of each application. (As well as manage any connected
ISP).

There's a few out of tree patches I believe, but it doesn't take much to
get libcamera running the ISP on the i.MX8MP as well so then you can
have hardware accelerated debayering and image processing too.


> in gstreamer 1.20.3 which I'm using. A quick look at the libcamera
> docs [1] seems to indicate building from source isn't necessary when
> libcamera is installed but I've installed libcamera-tools/libcamera0
> and there is still no libcamerasrc shown in gstreamer?

libcamerasrc is currently built as part of the libcamera project, not
gstreamer. I don't know what package libcamera-tools/libcamera0 refers
to - but look to see if your distribution package the gstreamer
component of libcamera separately. Once that's installed it should be
available.

Feel free to find us in the IRC/Matrix channels too if you get stuck for
a realtime support channel to get things running.

--
Kieran


> 
> best regards,
> 
> Tim
> [1] https://libcamera.org/getting-started.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux