aspose file tools*
The moose likes Linux / UNIX and the fly likes Video capture in Linux Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Video capture in Linux" Watch "Video capture in Linux" New topic
Author

Video capture in Linux

Mike Tatters
Greenhorn

Joined: Jan 23, 2009
Posts: 2
Hi all,
I need to create a video stream from a webcam in linux. i have good knowledge of Java, and I have tried JMF. But I find it to hard to install, and this will not be good when I need to deploy my apps. i know I could write some JNI glue between V4L and java, but before I reinvent the wheel,I wanted to know if anyone know of another API to capture video ?
Thanks
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15661
    
  15

It depends on what you want to do. Video in Linux is generally presented by the /dev/video devices. In many cases, the video stream in digital form can be captured as an ordinary binary stream just by opening and reading the appropriate device file.

For DTV video, streaming video is done in MPEG packets, so you have to be somewhat sensitive to the packets themselves, or you'll end up trying to use broken packets. Also, off-the-air streaming may contain bad packets, which should be discarded. The streaming protocol includes redundancies, so that's OK.

A good place to see some Java code that deals with DTV issues is the ProjectX video tool. You might also gain some insight by looking at the VLC program. It's not Java, but it's designed to route audit and video over a LAN.


Customer surveys are for companies who didn't pay proper attention to begin with.
Mike Tatters
Greenhorn

Joined: Jan 23, 2009
Posts: 2
Thanks for the reply Tim. During the week end, I came across v4l4j (http://v4l4j.googlecode.com) which does exactly what I need (simple capture from a webcam, handing out JPEG-compressed frames !). Also, it allows me to control the pan and tilt of my logitech quickcam sphere, along with other standard video controls. More than what I wanted !
I thought i d share this with everybody on this forum.
Cheers
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15661
    
  15

Thanks!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Video capture in Linux
 
Similar Threads
Not Serilizable Exception: RMI transferring video Player class JMF
capture a video of a video
read from a capture card
JMF or FMJ on ubuntu
java editor