Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8189519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T03:18:13+00:00 2026-06-07T03:18:13+00:00

I want to write a program that can capture video through my webcam by

  • 0

I want to write a program that can capture video through my webcam by using Java language, i.e live video streaming.
I have found some threads about this topic but the issue is how can i make my program Operating system independent, like how to capture video on 32 bit and 64bit operating systems..

Kindly help me to solve this, i have very short time for this job. Also if anybody have some lead to this topic, post its link here..
Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T03:18:15+00:00Added an answer on June 7, 2026 at 3:18 am
    1. As there are no classes in j2se that can be used to capture video from a webcam, so you need an external library like JMF or JavaCV, to do the same.

    2. To install JavaCV you will find instructions on these links:

      a. ganeshtiwaridotcomdotnp.blogspot.in Link

      b. code.google.com Link

    3. The code to capture video in real time from camera:

      import com.googlecode.javacv.CanvasFrame;
      import com.googlecode.javacv.FrameGrabber;
      import com.googlecode.javacv.VideoInputFrameGrabber;
      import com.googlecode.javacv.cpp.opencv_core.IplImage;
      import static com.googlecode.javacv.cpp.opencv_core.cvFlip;
      
      class GrabberShow implements Runnable 
      {    
         IplImage image;
         CanvasFrame canvas = new CanvasFrame("Web Cam");
         public GrabberShow() {
             canvas.setDefaultCloseOperation(javax.swing.JFrame.EXIT_ON_CLOSE);
         }
         @Override
         public void run() {
             FrameGrabber grabber = new VideoInputFrameGrabber(0); // 1 for next camera
             try {
                 grabber.start();
                 IplImage img;
                 while (true) {
                     img = grabber.grab();
                     if (img != null) {
                         cvFlip(img, img, 1);// l-r = 90_degrees_steps_anti_clockwise
                         canvas.showImage(img);
                     }
                 } 
             } catch (Exception e) {}
         }
      }
      
      public class Main 
      {
             public static void main(String[] args) 
             {
                 GrabberShow gs = new GrabberShow();
                 Thread th = new Thread(gs);
                 th.start();
             }
      }
      

    hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to write a java program that acts as a user interface to
I want to write a program (preferably in java) that will parse and analyze
I want to write a program that can turn on Caps lock key without
I want to write a C program that can search Bonjour enabled devices on
What I want to do is to write a program that can generate large
I cannot use threads thus I want to write a server program that can
I want to write a program that sends email using Python's smtplib . I
I want to write a program that can not close it In other words,
I want to write a Java program that'll access a few web pages that
I want to write a C++-Program that can interact/call Lua-scripts during execution. A key

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.