Source code Downloads Documentation

Welcome to JCodec!

JCodec is an open source pure java implementation of video and audio codecs and formats.

Features Roadmap
H.264 ( AVC ) Main profile decoder MP3 decoder/encoder
Apple ProRes decoder and encoder AAC encoder
H264 Baseline profile encoder
Matroska ( MKV ) demuxer and muxer
MP4 ( ISO BMF, QuickTime ) demuxer/muxer and tools
MPEG 1/2 decoder ( supports interlace )
MPEG PS/TS demuxer
Java player applet
VP8 encoder
MXF demuxer

Get a single frame ( supports only AVC, H.264 in MP4, ISO BMF, Quicktime container ):

int frameNumber = 150;
BufferedImage frame = FrameGrab.getFrame(new File("filename.mp4"), frameNumber);
ImageIO.write(frame, "png", new File("frame_150.png"));
				

Get a sequence of frames ( supports only AVC, H.264 in MP4, ISO BMF, Quicktime container ):

double startSec = 51.632;
FrameGrab grab = new FrameGrab(new File("filename.mp4"));
grab.seek(startSec);
for (int i = 0; i < 100; i++) {
  ImageIO.write(grab.getFrame(), "png",
    new File(System.getProperty("user.home"), String.format("Desktop/frame_%08d.png", i)));
}
				

Source code:

git clone git://github.com/jcodec/jcodec.git

Maven

<dependency>
  <groupId>org.jcodec</groupId>
  <artifactId>jcodec</artifactId>
  <version>0.1.3</version>
</dependency>

Download

jcodec-0.1.5.jar Jar 05/20/2013
jcodec-0.1.5.pom POM 05/20/2013

Android Downloads

jcodec-android-0.1.7.zip JCodec for Android 09/14/2013
jcodec-samples-android-0.1.7.zip Sample application source code 09/14/2013
jcodec-samples-0.1.7.apk Sample application binary 09/14/2013

September 14 2013.Android version

September 09 2013.Live clip/cat of AVC

August 29 2013.All new JPEG decoder

July 16 2013.VP8 encoder

July 08 2013.MXF container support

June 19 2013.HTML5 streaming framework

May 20 2013.JCodec without dependencies

Apr 01 2013.All new H.264 decoder with Main Profile support

Feb 01 2013. H.264 encoder

Nov 01 2012. MPEG 1/2 decoder

Jul 01 2012. MPEG PS/TS demuxer

Jan 01 2012. MOV muxer/demuxer

Nov 01 2011. ProRes encoder

Oct 01 2011. ProRes decoder

Apr 28 2010. H264 baseline profile

Last updated: September 14 2013