Win a copy of Java Challengers this week in the Java in General forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

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: 23536
161
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: 23536
161
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!
 
There’s no place like 127.0.0.1. But I'll always remember this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic