EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: USB V4L2 driver camera
From: Michael Davidsaver via Tech-talk <tech-talk at aps.anl.gov>
To: "Palaha, Arvinder (DLSLtd, RAL, LSCI)" <arvinder.palaha at diamond.ac.uk>
Cc: tech-talk <tech-talk at aps.anl.gov>
Date: Fri, 8 Jan 2021 08:58:15 -0800
On 1/8/21 6:59 AM, Palaha, Arvinder (DLSLtd, RAL, LSCI) via Tech-talk wrote:
> Dear tech-talk-ers,
> 
> I'm having a look again at implementing controls for a usb camera using the v4l2 driver, and my approach is to use a python ioc to issue commands and set up and control an ffmpeg server, and hopefully pipe in the video stream into areaDetector/AD. I think this seems reasonable, but if there are better approaches, I'd be eager to hear them 🙂
> 
> Looking back through the archive, it seems this was looked at in 2014, and potentially before then also. Has there been any progress on this topic since then?
> 
> If/when I do get this running, I'll post on here about it as it seems it'd be useful.
> 
> Wishing everyone good health and happy new year,


I've uploaded a small project I did ~2 years ago.  It reads frames from
a V4L2 device, and publishes them with PV access (as an NTNDArray).
This can be viewed directly with eg. cs-studio or pydm.  It can also
be read into areaDetector with the PVA client camera driver.

https://github.com/mdavidsaver/p4pvid

Big caveat.  This was a weekend project which has only been tested with
laptop webcams.  It supports only a limited number of color modes
(GRAY, YUYV, and a few others untested).

Still, it should at least be easy to test.

> git clone https://github.com/mdavidsaver/p4pvid
> cd p4pvid
> virtualenv -p python3 env
> . env/bin/activate
> python -m pip install -r requirements.txt
> python setup.py build_ext -i

> python -m p4pvid /dev/video0 vidpv

Then you can eg. point a cs-studio/phoebus image widget at "pva://vidpv".

Replies:
Re: USB V4L2 driver camera Palaha, Arvinder (DLSLtd, RAL, LSCI) via Tech-talk
References:
USB V4L2 driver camera Palaha, Arvinder (DLSLtd, RAL, LSCI) via Tech-talk

Navigate by Date:
Prev: Re: USB V4L2 driver camera Wlodek, Jakub via Tech-talk
Next: Thorlabs motor controller Siddons, David via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
Navigate by Thread:
Prev: Re: USB V4L2 driver camera Wlodek, Jakub via Tech-talk
Next: Re: USB V4L2 driver camera Palaha, Arvinder (DLSLtd, RAL, LSCI) via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
ANJ, 11 Jan 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·