• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Video capture in Linux

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Saloon Keeper
Posts: 28125
198
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Mike Tatters
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 28125
198
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks!
 
He got surgery to replace his foot with a pig. He said it was because of this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic