Skip to content

Releases: sannies/mp4parser

1.0.3.2

11 Aug 12:43
Compare
Choose a tag to compare

Correct SPS parsing (stop code emulation preventation)

Staging Repo

1.0.3.1

11 Aug 12:42
Compare
Choose a tag to compare

Release is mostly about performance issues:

  • replaced a bunch of linked lists with array list
  • reduce number of memory map operation when handling default MP4 files

1.0.3 - First Github Release

22 Jul 17:29
Compare
Choose a tag to compare

I was lazy and now have the nasty task to describe all changes that happened after 1.0-RC-27 which was released in October '13. The most important change is that I finally moved the project to GitHub. Now that I did it I'm annoyed by myself that I didn't have the courage to do it before (Will my followers follow me?)
So let's start with the latest stuff:

Common Encryption

The isoparser fully supports Common Encryption as specified in ISO/IEC 23001-7:2012. When a Movie object is created by the MovieCreator a CENC encrypted Track is instanceof CencEncyprtedTrack. If you want to decrypt the track you can wrap it with a CencDecryptingTrackImpl. If you have a plain movie you can wrap certain track with CencEncryptingTrackImpl to encrypt them.

This is how an encrypt/decrypt roundtrip works.

        Movie mOrig = MovieCreator.build("source.mp4");

        Movie mEncryptOut = new Movie();
        SecretKey sk = new SecretKeySpec(new byte[]{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, "AES");
        for (Track track : mOrig.getTracks()) {
            mEncryptOut.addTrack(new CencEncryptingTrackImpl(track, UUID.randomUUID(), sk));
        }

        Container cEncrypted = mp4Builder.build(mEncryptOut);
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        cEncrypted.writeContainer(Channels.newChannel(baos));

        Movie mEncryptIn = MovieCreator.build (new MemoryDataSourceImpl(baos.toByteArray()));
        Movie mDecrypt = new Movie();

        for (Track track : mEncryptIn.getTracks()) {
            if (track instanceof CencEncyprtedTrack) {
                mDecrypt.addTrack(new CencDecryptingTrackImpl((CencEncyprtedTrack) track, sk));
            } else {
                mDecrypt.addTrack(track);
            }
        }

        Container cDecrypted = mp4Builder.build(mDecrypt);
        FileOutputStream fos = new FileOutputStream("output.mp4");
        cDecrypted.writeContainer(fos.getChannel());

Rest

the rest is more or less small stuff:

  • IsoFiles are now closable
  • AAC tracks show correct number of channels
  • raw DTS files can be used as source
  • avc3 tracks are parsable
  • all data access is done though the DataSource interface

Staging Repo