Hello,
to your knowledge, a Video4Linux2 driver for the CSI Camera Board is available here:
http://www.linux-projects.org/modules/n ... toryid=150
Re: Video4Linux2 driver ready!
Is this the "official" driver that the Raspberry Pi Foundation have funded? Or have you done this off your own initiative?
Alex Eames RasPi.TV, RasP.iO
Re: Video4Linux2 driver ready!
On the web site it says"NOTE: The Raspicam module has NOT be funded by the Raspberry Pi Foundation in any way." So I guess he has done this off his own initiative.alexeames wrote:Is this the "official" driver that the Raspberry Pi Foundation have funded? Or have you done this off your own initiative?
Re: Video4Linux2 driver ready!
Has anyone tried this yet? Is the source code for this available? Who wrote this code? I had a look around http://www.linux-projects.org/listing/u ... /raspbian/ but I'm not sure what directory I'm looking for to find the source code. I see in http://www.linux-projects.org/listing/u ... f/Packages that it lists Maintainer: Luca Risolia but is that just V4L in general, or this Raspbian userspace code in particular?
Not to look a gift horse in the mouth, etc. but would like to have a look at the source, before installing.
Not to look a gift horse in the mouth, etc. but would like to have a look at the source, before installing.
Re: Video4Linux2 driver ready!
I am not sure what you mean by that question, but UV4L consists of a group of Video4Linux2-compliant user space drivers ported to Raspbian. One of those drivers is for the Rpi CSI Camera Board.is that just V4L in general, or this Raspbian userspace code in particular?
From the documentation available on the website:
[1]
If you read the examples given in the instructions (from a link in the announcement), you will notice that the applications really "just work" transparently, accessing a device node, as if there was an underlying kernel driver, in other words:DESCRIPTION
UV4L is a simple framework aiming to provide User
space Video4Linux2-compliant drivers for real or virtual video
input devices. The 'uv4l' core daemon loads a given driver module
passed as argument via command line and creates one device node
file under /dev for the applications to access the device. From
the application's perspective, there is no real difference from
when a kernel driver is being used to control the device. You can
run uv4l as many times as the number of the devices you want to
handle (one process per device).
http://www.linux-projects.org/modules/s ... e&artid=14
[1] http://www.linux-projects.org/modules/s ... le&artid=9
[2] http://www.linux-projects.org/modules/s ... es&secid=2
Re: Video4Linux2 driver ready!
Thank you for your quick response. I meant, who is the author of this particular V4L2 driver specifically for the RPi camera? Luca Risolia is shown as "Maintained by:" but I don't know if he is just maintaining the V4L2 system as a whole, and/or he is also the author of this particular driver. Is the source code available?RpiName wrote:I am not sure what you mean by that question, but UV4L consists of a group of Video4Linux2-compliant user space drivers ported to Raspbian. One of those drivers is for the Rpi CSI Camera Board.
thanks,
John Beale
Re: Video4Linux2 driver ready!
Hello John,
the author is the same person; no source code is available from the website.
the author is the same person; no source code is available from the website.
Re: Video4Linux2 driver ready!
As you probably know, both the Raspbian system kernel, and the R-Pi camera firmware are under active development, and code is changing on a weekly basis. If the V4L2 driver is a closed-source project, I'm just wondering about how it might be maintained over the long run.
Re: Video4Linux2 driver ready!
John, again, that V4L2 driver is a 100% user space program; it does not strictly depend on the kernel in any way! In other words, as long as the mmal ABI is stable (isn't it?), unlike a real kernel driver, that driver does not have to be rebuilt each time the kernel or the firmware internals change, if this is what you are wondering about, yet it behaves like a kernel driver in all the ways: the user cannot see the difference. It also means no kernel crashes if a bug occurs, just like any other programs 

Re: Video4Linux2 driver ready!
It might be worth releasing the source, however, so the Community can help with any bugs that arise or if they think there are any improvements that might be made.
--
Michael Horne - @recantha on Twitter
Raspberry Pi Pod blog - http://www.recantha.co.uk/blog
Cambridge Raspberry Jam - https://camjam.me
Pi Wars - https://piwars.org
Michael Horne - @recantha on Twitter
Raspberry Pi Pod blog - http://www.recantha.co.uk/blog
Cambridge Raspberry Jam - https://camjam.me
Pi Wars - https://piwars.org
Re: Video4Linux2 driver ready!
Yes, userspace code isolates you from kernel development. So far, the RPI camera ABI has not changed (but some meanings have; reversed the default horizontal flip, for example). We are hoping that some additional capabilities may eventually be added, for example the latest fix gave us Gain/ISO control, and we are hoping at some point for full manual exposure control (ability to manually set both Gain/ISO and shutter speed). If that does happen, I assume that would require an ABI change or addition, as the raspistill/raspivid programs do not currently have an option to set shutter speed.RpiName wrote:as long as the mmal ABI is stable (isn't it?), unlike a real kernel driver, that driver does not have to be rebuilt each time the kernel or the firmware internals change
Re: Video4Linux2 driver ready!
I am adding stuff fairly quickly on the ARM side at the moment; although the mmal ABI won't be changing, I am using more of it.
I think the next batch of changes may be more firmware based though, looking at my bug list. They won;t affect this project.
I think the next batch of changes may be more firmware based though, looking at my bug list. They won;t affect this project.
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.
Working in the Applications Team.
Re: Video4Linux2 driver ready!
This Works!
How do i provide raspicam options to mjpg-streamer? Such as rotate camera (not picture)
Thanks.
How do i provide raspicam options to mjpg-streamer? Such as rotate camera (not picture)
Thanks.
Re: Video4Linux2 driver ready!
Anyone got it to work with motion? Getting error unable to open video device. Also getting error /dev/video0 does not support streaming i/o.
Re: Video4Linux2 driver ready!
Try to load the driver with the --extension-presence=1 option (man uv4l for more informations why it is necessary in some cases), and run motion as follows:Anyone got it to work with motion? Getting error unable to open video device. Also getting error /dev/video0 does not support streaming i/o.
Code: Select all
pi@raspberrypi ~ $ uv4l --driver raspicam --auto-video_nr --extension-presence=1
Code: Select all
pi@raspberrypi ~ $ LD_PRELOAD=/usr/lib/uv4l/uv4lext/armv6l/libuv4lext.so motion
Edit: it might be a known problem with Motion:
http://www.lavrsen.dk/foswiki/bin/view/ ... cts_Motion
Re: Video4Linux2 driver ready!
Source or it didn't happen!
-
- Posts: 29
- Joined: Fri Apr 26, 2013 4:54 am
Re: Video4Linux2 driver ready!
I'm having the same issue as the posts above me. I'm trying to run the raspi camera through python using /dev/video0, which wasn't working at first, now it is.
Now I'm getting an error in the Shell saying that "/dev/video0 does not support streaming i/o"
If anyone has some information on how to fix this it would be greatly appreciated.
Now I'm getting an error in the Shell saying that "/dev/video0 does not support streaming i/o"
If anyone has some information on how to fix this it would be greatly appreciated.
Re: Video4Linux2 driver ready!
To enable the streaming I/O, set the LD_PRELOAD environment variable as in the following example:If anyone has some information on how to fix this it would be greatly appreciated.
Code: Select all
$ LD_PRELOAD=/usr/lib/uv4l/uv4lext/armv6l/libuv4lext.so python ./pyprog.py
If you need to take a snapshot for some reasons, consider using the "dd" system command.SystemError: ioctl(VIDIOC_S_FMT) failure: no supported formats
-
- Posts: 29
- Joined: Fri Apr 26, 2013 4:54 am
Re: Video4Linux2 driver ready!
Yeah I eventually got that same error from the Shell as well. I was looking for a video stream, rather than pictures. I'm trying to get a video feed in, then put graphic overlays on top of the video stream. If I find a way to get it to work, I'll post it up.
Does anyone think that using OpenCV could be a work around for this problem?
Does anyone think that using OpenCV could be a work around for this problem?
Re: Video4Linux2 driver ready!
Have you had a look at fswebcam? http://www.firestorm.cx/fswebcam/I'm trying to get a video feed in, then put graphic overlays on top of the video stream.
I think it can overlay PNG images while grabbing. The resulting images can be piped into mencoder to encode a video. To give you an idea, see:
http://andyseasysite.com/?p=33
By looking at the manual, it looks like mencoder itself has overlying capabilities.
Re: Video4Linux2 driver ready!
What output modes does the RPi V4L2 driver support? is it JPEG only? The RPi camera video output (from raspivid) is .h264 format, at up to 30 fps. But I suppose few if any programs taking webcam input, can deal with that format (?) Then there is raspiYUV but I think that is only for low frame rate stills.RpiName wrote:To enable the streaming I/O, set the LD_PRELOAD environment variable as in the following example:The "pygame.camera" python module does not seem to support the JPEG format from the cameraCode: Select all
$ LD_PRELOAD=/usr/lib/uv4l/uv4lext/armv6l/libuv4lext.so python ./pyprog.py
-
- Posts: 29
- Joined: Fri Apr 26, 2013 4:54 am
Re: Video4Linux2 driver ready!
Just wondering if anyone as made any progress with getting this driver to work with the camera and python.
I tried to get it to work by using this driver in addition to SimpleCV and OpenCV, both seem to work as far as communicating with the camera, because the camera light does turn on. But every time my program loads it freezes my pi. Does anyone have any solutions I might be able to try?
I figure that the combination of using a newly released driver paired with SimpleCV/OpenCV as a work around for the jpeg issue in the above posts would account for the issues that I'm having.
I tried to get it to work by using this driver in addition to SimpleCV and OpenCV, both seem to work as far as communicating with the camera, because the camera light does turn on. But every time my program loads it freezes my pi. Does anyone have any solutions I might be able to try?
I figure that the combination of using a newly released driver paired with SimpleCV/OpenCV as a work around for the jpeg issue in the above posts would account for the issues that I'm having.
Re: Video4Linux2 driver ready!
For now, yes.What output modes does the RPi V4L2 driver support? is it JPEG only?
Re: Video4Linux2 driver ready!
Upgrade UV4L to the latest version eventually. If you still have problems, post your code.nickneubrand wrote:I tried to get it to work by using this driver in addition to SimpleCV and OpenCV, both seem to work as far as communicating with the camera, because the camera light does turn on. But every time my program loads it freezes my pi. Does anyone have any solutions I might be able to try?
Re: Video4Linux2 driver ready!
There is a basic guide on the website to use the driver with Motion:ekoome wrote:Anyone got it to work with motion? Getting error unable to open video device. Also getting error /dev/video0 does not support streaming i/o.
http://www.linux-projects.org/modules/s ... e&artid=16