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 7079621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:41:40+00:00 2026-05-28T06:41:40+00:00

I’m writing a screencast application in Java. I decided to use Xuggle to do

  • 0

I’m writing a screencast application in Java.
I decided to use Xuggle to do it and I followed up the installation instructions on the xuggle wiki.

I set up the PATH environment with %XUGGLE_HOME%\bin and %XUGGLE_HOME%\lib. Everything seems OK.
I made this application as a RCP plugin. I tried it on the "RCP-mail" template and the plugin is working and the video is generated correctly.

But when I decided to use it on a "real" application, the plug-in crashed with a strange error message:

Starting Capture

2011-11-10 08:08:45,438 [Thread-5] WARN com.xuggle.ferry.JNILibraryLoader – Failure: library load of library: xuggle-xuggler; version: 3: absolute path: C:\Program Files (x86)\Xuggle\bin\libxuggle-xuggler-3.dll; error: java.lang.UnsatisfiedLinkError: C:\Program Files (x86)\Xuggle\bin\libxuggle-xuggler-3.dll: Can’t find dependent libraries

2011-11-10 08:08:45,447 [Thread-5] WARN com.xuggle.ferry.JNILibraryLoader – Failure: library load of library: xuggle-xuggler; version: 3: absolute path: C:\Program Files (x86)\Xuggle\bin\libxuggle-xuggler-3.dll; error: java.lang.UnsatisfiedLinkError: C:\Program Files (x86)\Xuggle\bin\libxuggle-xuggler-3.dll: Can’t find dependent libraries

2011-11-10 08:08:45,453 [Thread-5] ERROR com.xuggle.ferry.JNILibraryLoader – Could not load library: xuggle-xuggler; version: 3; Visit http://www.xuggle.com/xuggler/faq/ to find common solutions to this problem

But this strange because the java.library.path is well defined:

logger.info(System.getProperty("java.library.path"));

returns

Nov 10, 2011 8:08:45 AM com.gvs.tools.ui.record.video.handler.RecordHandler startRecording
INFO: C:\Program Files (x86)\Java\jre6\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files (x86)/Java/jre6/bin/client;C:/Program Files (x86)/Java/jre6/bin;C:/Program Files (x86)/Java/jre6/lib/i386;C:\Program Files (x86)\Xuggle\bin;C:\Program Files (x86)\Xuggle\lib;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\JProbe 8.3\bin;C:\Program Files\TortoiseSVN\bin;D:\Work\Paul\eclipse;;.

What I’m missing to make the plug-in work with this application?
Is this issue due to the fact that the application uses other native libraries such as 3D-dll?

Here is the code used to make the screencast video:

RecordHandler.java:
    private void startRecording() {

    Logger logger = Logger.getLogger(RecordHandler.class.getName());
    logger.info(System.getProperty("java.library.path"));

    // Initialize framesQueue
    framesQueue =  new LinkedBlockingQueue<BufferedImage>();
    // Initialize the capture thread
    captureThread =  new ScreenCapturer();
    captureThread.setCaptureFramesQueue(framesQueue);
    
    // Initialize the recorder
    encoderThread = new FrameEncoder("test.mp4");
    encoderThread.setCapturedFramesQueue(framesQueue);      
    
    // Start capture
    captureThread.start();
    // wait for the Queue to be feed before encoding
    try {
        Thread.sleep(1000L);
    } catch (InterruptedException e) {
    }
    encoderThread.start();
}

ScreenCapturer.java:

    @Override
public void run() {
    // Retrieve the application main window's shell
    Display.getDefault().asyncExec(new Runnable() {
        
        @Override
        public void run() {
            appShell = Display.getCurrent().getActiveShell();
        }
    });
    
    isRunning = true;
    System.out.println("Starting Capture");
    for (numberOfFramesTaken = 0; isRunning && numberOfFramesTaken <= IVideoEncoderConfiguration.MAXIMUM_NUMBER_OF_FRAMES; numberOfFramesTaken++) {
        try {
            takeScreenShot();
            Thread.sleep(IVideoEncoderConfiguration.CAPTURE_TIME_INTERVAL_MILLIS);
        } catch (InterruptedException e) {
        }
    }
    System.out.println("Capture has ended");
    System.out.println("Number of frames taken: "
            + numberOfFramesTaken);
}

/**
 * Take a screen capture and store it in the capturedFramesQueue
 */
private void takeScreenShot() {
    Display.getDefault().asyncExec(new Runnable() {
        @Override
        public void run() {
            if (appShell != null) {
                Rectangle bounds = appShell.getBounds();
                java.awt.Rectangle awtBounds =  new java.awt.Rectangle(bounds.x, bounds.y, bounds.width, bounds.height);
                final BufferedImage screenCapture =  robot.createScreenCapture(awtBounds);
                try {
                    capturedFramesQueue.put(screenCapture);
                } catch (InterruptedException e) {
                }
            }
        }
    });
}

FrameEncoder.java:

public void run() {
    isRunning = true;
    String outFile = outputdirectoryPath + outputFileName;
    // First, let's make a IMediaWriter to write the file.
    final IMediaWriter writer = ToolFactory.makeWriter(outFile);
    // Retrieve the first frame to guess video dimensions
    BufferedImage firstFrame = null;
    try {
        firstFrame = capturedFramesQueue.take();
    } catch (InterruptedException e) {
    }
    if (firstFrame == null) {
        return;
    }
    // We tell it we're going to add one video stream, with id 0,
    // at position 0, and that it will have a fixed frame rate of
    // FRAME_RATE.
    writer.addVideoStream(0, 0,
            IVideoEncoderConfiguration.FRAME_RATE,
            firstFrame.getWidth(), firstFrame.getHeight());
    
    long startTime = System.nanoTime();
    for (numberOfFramesRecorded = 0; isRunning
            && numberOfFramesRecorded <= IVideoEncoderConfiguration.MAXIMUM_NUMBER_OF_FRAMES; numberOfFramesRecorded++) {
        // Retrieve the captured frame
        try {
            final BufferedImage currentFrame = convertToType(capturedFramesQueue.take(), BufferedImage.TYPE_3BYTE_BGR);
            // encode the next frame
            writer.encodeVideo(0, currentFrame, System.nanoTime() - startTime,
                    TimeUnit.NANOSECONDS);
            // sleep, time depending of FRAME_RATE
            Thread.sleep(IVideoEncoderConfiguration.CAPTURE_TIME_INTERVAL_MILLIS);
        } catch (InterruptedException e) {
        }
    }
    // Get the remaining frame on the queue
    Collection<BufferedImage> frames = new LinkedList<BufferedImage>();
    capturedFramesQueue.drainTo(frames, IVideoEncoderConfiguration.MAXIMUM_NUMBER_OF_FRAMES - numberOfFramesRecorded);
    for (BufferedImage frame : frames) {
        BufferedImage currentFrame = convertToType(frame, BufferedImage.TYPE_3BYTE_BGR);
        writer.encodeVideo(0, currentFrame, System.nanoTime() - startTime,
                TimeUnit.NANOSECONDS);
    }
    // close the MediaWriter, write the trailer if needed
    writer.close();
}
  • 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-05-28T06:41:41+00:00Added an answer on May 28, 2026 at 6:41 am

    It’s a little late I know, but the problem is that Xuggler requires ALL THE DLLs to be in the operating system load-path environment, not just the java.library.path

    That means that all DLLs that install with Xuggle (for example, libavcodec.dll) need to be in the %PATH% environment variable of the process that launched Java.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am writing an app with both english and french support. The app requests
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I have thousands of HTML files to process using Groovy/Java and I need to
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

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.