A/V Data Collection Using Linux?
Simon D. Levy asks: "I am consulting in a biology lab that collects data on fruit-fly mating behavior, and we would like to migrate our data collection to a Linux box. Our primary concern is being able to digitize incoming audio signals (at 8kHz sampling rate), but we would also ideally like to be able to monitor the flies' behavior using a digital camera connected directly to the computer. Crucially, we need to be able to isolate the audio component of the signal, as well as having access to an API (C/C++ would be nice) that allowed us to start and stop the recording. Any experience that anyone has had with this sort of problem would be much appreciated. We haven't bought anything yet, and are looking to build this system (CPU, video camera, A/D cards) from the bottom up.
Thanks!"
If you're part of a university, this project sounds tailor-made for a senior project by some EE whizkid. Just draft some geek and bribe him with promises of interships, and give him an unrealistically short deadline.
If you're in the private sector, it's a totally different story. You must summon the civic-minded core of your being and seize the opportunity to help the next generation. Give some deserving, hardworking American student the real-world experience that will provide them with an edge in the competitive job market of tomorrow. In return for the design and construction of your whole system, you will provide an invaluable internship opportunity that will give a real shot in the arm to their resume! And you'll hardly charge them anything.
Either way, you get your gadgetry, and everyone's happy.
Perfectly Normal Industries
Once, just once, I would like to see a fruit fly turn to the camera and say, "Can't you see we need some privacy?"
This stuff is pretty trivial under linux with even the most budget hardware.
Take a bt848 card and a camera and you have good quality video in, easily accessible via Video4Linux with a large base of existing video manipulation tools that let you pipe the video data around, manipulate it in realtime, compress/decompress in realtime etc. etc.
OSS/ALSA make it easy to record sound, and again there is a huge range of open source projects that should be either directly applicable or easily modifiable for your purposes.
There is some specialised hardware for hardware compression, though depending on your needs an Iomega Buz or similar can be had for very few dollars and provides hardware MJPEG compression, and is well supported under Linux.
Its not hard to do this stuff under Windows either, but for the sort of project you have, Linux is ideal. You should be able to get something up and working in a couple of days.
I gots ta ding a ding dang my dang a long ling long
Instead of using a usb based webcam, I'd go with a video capture card personally.
Under every OS, webcams suck...period. If this is something where your going to take the MPEG stream and make a VCD archive out of it, your going to want something that creates a quality MPEG stream.
For apps for video check out http://www.exploits.org/v4l/
As for the sound, "try dspspy".
Hope that helps!
Yes Francis, the world has gone crazy.
You might start here for equipment.
CEE5210S The signal SIGHUP was received.
"Hi, we do something. We're probably already doing it. We've made a decision to switch platforms. Now that we've decided to do that, we should figure out if the platform we've chosen can actually do what we need it to do."
Vintage computer games and RPG books available. Email me if you're interested.
well, two basic parts: hardware and software
first of the hardware is pretty independant of the os, just pick the highest quality capture card you can afford that is supported in linux, add a reasonable camera, sound card, and a nice modern machine of any kind. I use a bttv card, which works well for me, but of course it depends on your exact needs, and the camera that you hook up to it. As to software:
SDL, mostly used for game programming, but has some of the capabilites needed for capturing, sound recording, etc.
v4l the basic component of all video type stuff under linux-you can see the list of crap it supports there, but it doesn't really have facilities for actually capturing to something like mpeg.
avifile everything you want in a capture API, will let you output to all kinds of formats.
mplayer I have heard that they support capturing now, but haven't used them for that, but is what you will be using for playing back the files you capture.
My recommendation would be to use the VCR project, and one of these for audio. VCR uses avifile to record the video in your chosen format, and will record the audio also, but if you want seperate files for audio and video, it is simplest just to use the mic in with another program.
Let me know if you have problems--it's remarakably similar to what is already done to record television programming, with higher quality requirements, so you should be able to take advantage of all the PVR projects out there.
Or you can let me do it-send me the requirements, 1500$, and I'll send the box back a week later
;-}
Slackware: old school feel, new school gear.