-
Notifications
You must be signed in to change notification settings - Fork 255
Usage
a-schild edited this page Mar 4, 2013
·
21 revisions
- Download the current release from https://github.com/a-schild/jave2/tree/master/releases
- You need the jave-2.0.jar file which is your java interface to use
- In addition you need one of the native libraries, matching your platform. So for linux 64 bit you download also jave-2.0-linux64.jar. This file contents the binary executable for linux 64 bit
- Now you are ready to use it, you can find the javadoc here: https://github.com/a-schild/jave2/tree/master/releases/2.0/javadoc
{
System.out.println("encode WEBM");
File source = new File("test/videos/l4.mov");
File target = new File("test/out/l4.faststart.webm");
AudioAttributes audio = new AudioAttributes();
VideoAttributes video = new VideoAttributes();
EncodingAttributes attrs = new EncodingAttributes();
attrs.setAudioAttributes(audio);
attrs.setVideoAttributes(video);
audio.setCodec("libvorbis");
audio.setBitRate(new Integer(64000));
audio.setSamplingRate(new Integer(44100));
audio.setChannels(new Integer(2));
audio.setBitRate(new Integer(192000));
video.setCodec("libvpx");
video.setBitRate(new Integer(250000));
video.setFrameRate(new Integer(25));
attrs.setFormat("webm");
Encoder instance = new Encoder();
instance.encode(source, target, attrs, null);
}