views:

2341

answers:

8

We need to capture live video and display easily on Linux. We need a cheap card or USB device with a simple API. Anyone want to share some experience?

+2  A: 

Use the video4linux library. I've used it with a c++ program and was able to capture webcam frames within about an hour. (Very easy to use and setup)

Brian R. Bondy
+1  A: 

There's the cheese gnome application. Really simple to use. Not too much features, just video capture.

jackbravo
+2  A: 

There are "sealed" camera solutions out there with mini-webservers and an ethernet port on the back. Just plug it in to the network, set its IP, and open up a browser... in linux or wherever

If you want to capture in linux, I once had a cheap webcam capturing single frames in a perl script, which could have been modified for real time - though that was about 10 years ago. Anyway, its possible :-/

dittonamed
+1  A: 

openCV will allow you to capture individual frames from a camera and save to disk. If you need to then manipulate these to create a video, I would suggest netpbm, a pretty powerful set of command line tools you can use with some shell scripting to make a video or do whatever it is you need.

jdt141
+1  A: 

If you need to program, you're best off using GStreamer, a multimedia framework under Linux.

Cheese, mentioned by jackbravo, is based on GStreamer, as is Flumotion, a streaming server I work on.

Thomas Vander Stichele
+1  A: 

Another option is to use Firewire (IEEE1394) cameras, such as most common DV camcorders. They tend to work really well and give a lot better video than cheap web cams, and there is a plethora of tools in Linux for working with dv video, such as dvgrab.

jsmith
+1  A: 

As mentioned, Use dvgrab to capture from a Firewire interface from the camera, then use tools such as ffmpeg (command line) or kino (simple gui video editor) to process the video as needed. PCI based Firewire cards are relatively inexpensive and easy to find.

Examples:

  • continuous capture from firewire, autosplit every couple of minutes

dvgrab --size 500 --autosplit

  • watch the camera live

dvgrab - | mplayer -

Be aware that some recent distros (e.g. Fedora8) are using new but half-baked firewire drivers. However, Ubuntu works great.

Shannon Nelson
A: 

If you use java, v4l4j makes it very simple to capture frames from any V4L device. It also allows you to control the device from java. I used it with a PTZ webcam (logitech quickam orbit), and I could control usual thigs like brightness, saturation and auto-white balance, but also the tilt and pan of the camera. Very handy !