Raspicamera v4l


Im trying to use the raspberry camera board with the v4l driver, it works but i get some extrange color output, im using the folowing pipe

v4l2src device=/dev/video0 ! video/x-raw, format=RGB, width=512, height=256, framerate=30/1

this does not seems like rgb… (note: im not blue)

any clue?

did you try format=YUV ?

i get a pipeline error if use YUV

i make a shader to flip bgr to rgb and now loooks correct… but i dont know why comes in bgr using format=RGB


what about framerate? does it runs on full 30fps or varying?

well i tryed this to check if i can get 640x480 at 90 fps, so today i make an update to get those new modes from the camera and now i can not get it to work again so i can not really tell you. One thing that i can tell its that seems to get a better image quality using v4l2 driver

the bgr instead rgb was a issue on the driver that as i read was corrected in the new version

As I’m new in all this Rpi stuff, for now I’m playing with jvcleave’s camera wrapper for openframeworks and shaders, but it would be very interesting to try V4L2 driver in OF. Maby you have example project, because I have no idea how to use V4L2 driver in OF? I just can imagine, that you use V4L2 driver by writing “V4L2scr device=/dev/… etc.” and then use native videoGrabber’s functions to grab frames.

Im also a newie, i think that its safer to stay with jvcleave add-on.

But if you want to play, you have to install the driver (follow instructions on first post)
[http://www.raspberrypi.org/forum/viewtopic.php?f=43&t=62364][1][1]: http://www.raspberrypi.org/forum/viewtopic.php?f=43&t=62364

and use the videograbber example, (set the grabber resolution to 512x256)

if you got the newest firmware it will not work, as i read on the rpi forum seems to be a bug/incompatibility in gstreamer when using the latest firmware.

Thank you for the info. As I need fast stream from Rpi camera I’ll definitelly will try this out. All I’m going to try (maby at first outside the OF):

  1. V4L2
  2. Raspicam 0.6 (http://www.uco.es/investiga/grupos/ava/node/40)
  3. Chris Cummings API (http://robotblogging.blogspot.co.uk/2013/10/gpu-accelerated-camera-processing-on.html)
  4. The same Chris’s API with mmal -> textures pointer(not exactly this) ,because for now CPU copies all the frame to texture and this takes chunk of time.
  5. jvcleave’s camera wrapper based on OMX - testing this now.

if you want to try outside oF, there a new python library that looks nice

Thanks for info. Btw, how are the results of testing this V4L2 driver with 640x480 in 90fps? I thought, that Rpi camera limited to 60fps, so I’m very curiuos about this experiment.

The camera is currently limited to 30fps in all resolutions

not as this post, i tried that yesterday its working on raspivid, you can record a 640x480 at 90 fps


here you can see some videos

to get those modes you have to update the firmare but if you do, you can not acces to the camera using gstreamer as this post

1 Like

oh wow - nice! I’ll have to do a SD card backup and give it a shot

Those new modes are great, one question if are available using raspivid, they will work also on ofxRPiCameraVideoGrabber? i just see that you have a record mode in the develop branch, i have to try that thats nice

I would assume so - MMAL (what raspivid uses) and OpenMax are pretty much just different ways of working with the Videocore components. MMAL however doesn’t have anything I could find like OpenMax’s egl_render component that allows for textures

i have just tried using the latest rip firmware and your ofxRpiCameraVideoGrabber develop blanch and I’m able to record at 640x480 90fps…. that great !!!

1 Like

Thaths sounds fantastic :slight_smile: So, you just updated rpi firmware with “apt-get update” and “apt-get upgrade” and used the same ofxRpiCameraVideoGrabber plugin? So last updates changed something in OMX part?

just run

sudo rpi-update

and now you can get those new modes, the changes to make the modes avaliables seems to be in the sensor internals as jvcleave says so they work in omx as meal without changes.

note that if you do this rpi-update you can not use the v4l driver because its something break on the streamer part with the new update

thanks for info, it works :slight_smile: it just was some kind of problems with rpi-update, but worked “sudo UPDATE_SELF=0 rpi-update”