Skip to content
a-schild edited this page Mar 4, 2013 · 21 revisions

Usage

  1. Download the current release from https://github.com/a-schild/jave2/tree/master/releases
  2. You need the jave-2.0.jar file which is your java interface to use
  3. 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
  4. 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

Example usage:

{
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); }

Clone this wiki locally