v4l2-ctl --overlay=1 # enable viewfinderflok wrote:Ok, I'll see how can I enable this preview (not sure yet).
Code: Select all
if (rpi_workaround)
{
int sw = 1;
if (ioctl(fd, VIDIOC_OVERLAY, &sw) == -1)
error_exit(true, "ioctl(VIDIOC_OVERLAY) failed");
}
I'm unable to get this to run. I get "failed creating socket errno: 97 (Address family not supported by protocol)"flok wrote:Koudevoeten (http://www.vanheusden.com/koudevoeten/) 0.5 was released to the web! It now retrieves JPEG encoded images directly from the camera/GPU dramatically reducing the CPU load.
It has been streaming MJPEG data for a couple of days now from the birdhouse in my garden without any crashes and such: this data is then retrieved by "motion" on an other system where it is checked for any movements.
Fantastic. Thanks that works.flok wrote:Ah yes, that looks indeed like an ipv6 problem.
sudo modprobe ipv6
or
echo ipv6 >> /etc/modules
(and reboot)
should fix it.
Totally expected as you've told Motion to capture YU12 images.M_P wrote:I'm not sure if this is the best place to post this (and I apologize if it's a repeat of other work), but I found something interesting about the picture going dark when running Motion.
If I run it with resolution 1280x800, it goes dark within about five minutes. If I run it with resolution 1280x720, it seems to stay the correct brightness and changes appropriately with the ambient light. I can reliably reproduce both situations with two different NoIR camera modules after reboots and/or power cycles.
Some details:
- Pi Model B
- Fresh build from yesterday using the 2014-01-07 Raspbian image.
- Kernel #640 from Friday Feb 14 19:09GMT.
- I am using the official V4L2 driver.
- Memory split is set to 128MB
- The standard Motion build that comes from running apt-get (3.2.12).
- Motion is configured to use the YU12 palette.
- Motion is configured to grab images at 2FPS.
- Everything has been apt-get updated, apt-get upgraded, and rpi-updated.
I'm perfectly happy with 1280x720, just thought it might help pin down a problem (if there actually is one - I've no doubt that I could well be causing the problem).
Ah - that makes perfect sense. Very interesting, too - I didn't know there was a fixed cutoff between video and still image.6by9 wrote:Totally expected as you've told Motion to capture YU12 images.
With any of the raw pixel formats (YUV or RGB) the driver makes a guess as to what you're using it for based on resolution. If <= 1280x720, then it assumes it is video mode and effectively runs it as preview/video encode at whatever frame rate is requested. If > 1280x720, then it guesses you're doing a stills capture and switches the pipe into that mode. JPEG always assumes stills, H264 or MJPEG assumes video.
The issue is with the stills mode auto exposure calcs (or lack thereof), hence <=1280x720 is OK, but > isn't.
Having preview running means that it reverts to video mode between captures, and hence AE can run on those frames quite happily and hence adapts to changes in light level.
There isn't in standard V4L2 terms, but there is on the GPU (it does a load of slightly different AE and AWB calcs, and may choose a higher quality image off the sensor to improve the image quality to the detriment of framerate).M_P wrote:Ah - that makes perfect sense. Very interesting, too - I didn't know there was a fixed cutoff between video and still image.
Code: Select all
#define MAX_VIDEO_MODE_WIDTH 1280
#define MAX_VIDEO_MODE_HEIGHT 720