GithubHelp home page GithubHelp logo

jcodec's Introduction

jcodec - a pure java implementation of video/audio codecs.

About

JCodec is a library implementing a set of popular video and audio codecs. Currently JCodec supports:

  • Video

    • H.264 Main profile decoder ( CAVLC/CABAC, I/P/B frames );
    • H.264 Baseline profile encoder ( CAVLC, I-frame only );
    • MPEG 1/2 decoder ( I/P/B frames, interlace );
    • Apple ProRes decoder;
    • Apple ProRes encoder;
    • JPEG decoder;
  • Audio

    • SMPTE 302M decoder;
  • Wrappers ( muxers, demuxers, formats ):

    • MP4 ( ISO BMF, Apple QuickTime ) de-muxer;
    • MP4 ( ISO BMF, Apple QuickTime ) muxer;
    • MKV ( Matroska ) de-muxer;
    • MKV ( Matroska ) muxer;
    • MPEG PS ( Program Stream ) demuxer;
    • MPEG TS ( Transport Stream ) demuxer;

JCodec also features a pure java video player that works as a web-browser applet. The player uses a specially developed streaming technology 'JCodec Streaming'.

JCodec is free software distributed under FreeBSD License.

Future development

Those are just some of the things JCodec dev team is planning to work on during the next year:

  • Video
    • Improve H.264 encoder: add P frames, CABAC, rate control;
    • Performance optimize H.264 decoder;
    • J2K decoder;
    • Support high profiles in H.264;
  • Audio
    • MP3 decoder;
    • MP3 encoder;
    • AAC encoder;
  • Wrappers
    • MXF demuxer;
  • Player
    • H.264 support, GOP support, stability, remove signing, JAAD integration;

Getting started

You can get JCodec automatically with maven. For this just add below snippet to your pom.xml .

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

OR download it from here:

There is virtually no documentation right now but the plan is to catch up on this so stay tuned.

Sample code

Getting a single frame from a movie ( 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"));

Getting a sequence of frames from a movie ( 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)));
    }

Contact

Feel free to communicate any questions or concerns to us. Dev team email: [email protected]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.