# Using raspberry pi camera for video?



## spork (Nov 29, 2020)

I have a Raspberry Pi B rev. 2 and also just bought the camera module for it (version 2, w/sony 8MP sensor).

I'm having a hard time figuring out what the proper way to setup streaming the video output of this thing is under FreeBSD. Most guides assume v4l on linux, and while I see there's a v4l freebsd port, I don't see a device to tell v4l to use as a camera. Nothing in /dev looks like a camera to me. On the linux side, it looks like they have to load a special kernel module to enable v4l support.

What are folks doing in FreeBSD land?

I see the "raspivid" utility does work... but most guides for linux say not to use that. I do see options to pipe raspivid output to ffmpeg (or avconv, which apparently doesn't build on ARM?), but I'm having trouble hitting more than 13 fps or so using the ffmpeg method (admittedly, just copypasta attempts here so far). I see raspivid only takes about 5% CPU in the "pipe to ffmpeg" scenario, but then ffmpeg is sucking down all the remaining cpu, which is a bit of a mystery - the output from raspivid should already be encoded...

Any ideas or is this one of those "just use linux" situations?


----------



## Phishfry (Nov 29, 2020)

I would try webcamd(8) along with the ports recomended here:


			VIDEO4BSD daemon
		


The wiki is rather dated:




__





						arm/Raspberry Pi Camera - FreeBSD Wiki
					





					wiki.freebsd.org


----------



## spork (Nov 29, 2020)

I'm pretty sure webcamd does not support the Pi camera. It's not a USB cam, it's something that's on some weird internal bus on the Pi. As best I can tell, the only thing with the proprietary "magic" to talk to it (on FreeBSD) are the Pi userland tools. I mean, the docs are a bit scattered about, but I see no mention of a kernel module that would even expose a device in /dev for v4l/webcamd to work with...


----------

