ERROR com.xuggle.ferry.JNILibraryLoader - Could not load library: xuggle-ferry

197 views
Skip to first unread message

Christos Athanasiadis

unread,
Jul 21, 2016, 1:53:33 PM7/21/16
to xuggler-users
I am trying to create a simple java code that captures video stream and store it in the hard disk. I have downloaded xuggler 3.2 jar file in order to do so. In fact I have add to my eclipse project the following jar files:

xuggle-xuggler-3.4.jar
webcam-capturer-0.3.10.jar
bridj-0.6.2.jar
slf4j-api-1.7.2.jar
slf4j-simple-1.7.2.jar

My code is the following:

public static void main(String [] args) throws InterruptedException{

File file = new File("output.ts");

IMediaWriter writer = ToolFactory.makeWriter(file.getName());
Dimension size = WebcamResolution.QVGA.getSize();

writer.addVideoStream(0, 0, ICodec.ID.CODEC_ID_H264, size.width, size.height);

Webcam webcam = Webcam.getDefault();
webcam.setViewSize(size);
webcam.open(true);

long start = System.currentTimeMillis();

for (int i = 0; i < 50; i++) {

System.out.println("Capture frame " + i);

BufferedImage image = ConverterFactory.convertToType(webcam.getImage(), BufferedImage.TYPE_3BYTE_BGR);
IConverter converter = ConverterFactory.createConverter(image, IPixelFormat.Type.YUV420P);

IVideoPicture frame = converter.toPicture(image, (System.currentTimeMillis() - start) * 1000);
frame.setKeyFrame(i == 0);
frame.setQuality(0);

writer.encodeVideo(0, frame);

// 10 FPS
Thread.sleep(100);
}

writer.close();

System.out.println("Video recorded in file: " + file.getAbsolutePath());
}

The problem is that I am receiving the following error when I am trying to run the code:

[main] ERROR com.xuggle.ferry.JNILibraryLoader - Could not load library: xuggle-ferry; version: 3; Visit http://www.xuggle.com/xuggler/faq/ to find common solutions to this problem
Exception in thread "main" java.lang.UnsatisfiedLinkError: no xuggle-ferry in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)

Suraj kumar

unread,
Aug 10, 2016, 7:36:58 AM8/10/16
to xuggler-users
this exception would never be resolved because xuggler api is deprecated so gor another library and tell me if you find any other library for video streaming

juangon

unread,
Aug 25, 2016, 12:08:02 PM8/25/16
to xuggler-users
You should use Xuggler 5.4. For Xuggler 3 you need to install Xuggler manually.
Reply all
Reply to author
Forward
0 new messages