Title: Video Processing Library for Java
Tags: java;video-processing;gstreamer;jmf;xuggle
Question: I want to extract frames from a video and apply some filters on it such as gabor/hough etc. Which Java library would be perfect for handling all kinds of video encodings? I have been looking at GStreamer, JMF, Xuggler etc. but am unable to decide which one would be the best. I'm also looking to edit the frames and make the video with the new frames.

Here is the accepted answer: If you're looking to do low level operations such as extracting frames and manipulating them, then Xuggler would be the best choice, because the APIs are geared around this low level. It works on ffmpeg so can handle all types of video encodings.
Don't use JMF for anything, it's old, outdated and buggy - GStreamer is good, but the API lends itself more to playing videos rather than manipulating the frames.
Comment for this answer: I haven't uesd OpenCV so can't really comment, but would still probably lean towards Xuggler since it's a pure Java API which should make the task easier.
Comment for this answer: Thanks! I guess it's Xuggler then. It also looks like OpenCV for Java can be manually configured http://answers.opencv.org/question/2137/wrapping-opencv-with-desktop-java-building-for-64/ - any ideas on if this would be better?

Here is another answer: You can try Marvin Framework. It uses JavaCV for video encodings and device access, but all image processing algorithms are pure Java.
It's very easy to load a video and process the frames in real time, as shown in the edge detection example below.
Source code:
import static marvin.MarvinPluginCollection.*;
public class SimpleVideoProcessing extends JFrame implements Runnable{
private MarvinVideoInterface    videoAdapter = new MarvinJavaCVAdapter();
private MarvinImagePanel        videoPanel = new MarvinImagePanel();
private MarvinImage             videoFrame, videoOut = new MarvinImage(640,480);
public SimpleVideoProcessing() throws MarvinVideoInterfaceException{
super("Simple Video Processing using Marvin");
add(videoPanel);
// Load video file and start the processing thread
videoAdapter.loadResource("./res/snooker.wmv");
new Thread(this).start();
setSize(640,500);
setVisible(true);
public void run() {
try {
while(true){
// Request, process and show the video frame.
videoOut.clear();
videoFrame = videoAdapter.getFrame();
prewitt(videoFrame.clone(), videoOut);
videoPanel.setImage(videoOut);
}
} catch (MarvinVideoInterfaceException e) {
e.printStackTrace();
}
public static void main(String[] args) throws MarvinVideoInterfaceException {
new SimpleVideoProcessing().setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

Here is another answer: Xuggler, yes. But if you are going to be working on a lot of Image processing, you should go with OpenImaj. This library uses Xuggler as its dependency, but that's not all what it does. Think of having capabilities of Opencv without the lack of speed which you get in Java. Also, all it requires is adding a maven dependency and you are good to go. The amount of code is also reduced.
Note: I am still reviewing the library and will keep updating my answer on how this goes.
Introductory Video: https://www.youtube.com/watch?v=TNEQ0eNqLgA

Here is another answer: JMF is a good choice. But if the process time is important in your code, it's better to use Xuggler. Obviously, JMF is more general than Xuggler.

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 4, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2012:00:10/22/12', 'FavoriteCount': 7.0, 'PostTypeId': 1, 'Tags': '<java><video-processing><gstreamer><jmf><xuggle>', 'Title': 'Video Processing Library for Java', 'ViewCount': 13990, 'id': 13011397, 'user_AboutMe': '', 'user_AccountId': 1782183.0, 'user_DisplayName': 'abhishek', 'user_Reputation': 795.0, 'user_Views': 215.0, 'user_id': 1624616.0}}