My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Downloads
Links

The MP4 Parser Project

ISO Parser

The isoparser API can read and write the MP4 file structure. It is a low level tool dealing with the so called boxes but it is as well as dealing with structure like tracks and movies. For examples see Examples.

If you have any questions please ask at the mp4parser discussion group. I don't do private support.

ISO Viewer

The Iso Viewer helps you to visualize the MP4 box structure. It is available as Java Webstart application and as well as download. Give it a try by clicking the webstart link on the top left. You must be aware that you don't see the file as it is on disk. You rather see what the isoparser would write to disk. Sometimes mov boxes (e.g. apple trailers) are read but corrected/modified on the fly so you will see how the file would look like after the correction.

Smooth Streaming Fragmenter

There is also a tool to fragment files for Microsoft Smooth Streaming. SmoothStreaming walks you through an example.

Maven Repository

The isoparser artifact is deployed to maven central. Using mp4parser is just a dependency away:

<dependency>
  <groupId>com.googlecode.mp4parser</groupId> 
  <artifactId>isoparser</artifactId> 
  <version>1.0-RC-2</version> 
</dependency> 

Snapshots are deployed to the Sonatype OSS Nexus: https://oss.sonatype.org/content/repositories/snapshots/

If you don't know how to use Maven you should learn. Please don't ask Maven questions here.

In case of any questions please post publicly on the mp4parser-discussion google group. I will not give any private support (donations can of course convince me to do it).

Credits

My colleague Shermin donated the smooth streaming example files. Thank you, Shermin. Visit her at http://shermin.net/.

YourKit supports this project with a free open source license. Thank you, YourKit!

YourKit is kindly supporting open source projects with its full-featured Java Profiler. YourKit, LLC is the creator of innovative and intelligent tools for profiling Java and .NET applications. Take a look at YourKit's leading software products:

YourKit Java Profiler and YourKit .NET Profiler

Changes/Releases

10.Mai.12: isoparser-1.0-RC-7 (released but not deployed to central)

Again I don't want to spam central only released to sonatype staging repo

  • DefaultMp4Builder & FragmentedMp4Builder: make tkhd & mvhd version 1 to support long values
  • Smooth Streaming: Multiple video frame rates in one asset
  • Smooth Streaming: Multiple audo sample rates in one asset
  • Smooth Streaming: support for mono, stereo and 5.1
  • Fragmented H264 Tracks: Main/High Profile now works correctly. (ctts was wrong)
  • H264TrackImpl: Ability to mux raw H264 tracks into MP4
  • I changed the versioning scheme of the isoviewer. It is now always the version number of the isoparser plus one. isoparser-1.0-RC-7 -> isoviewer-2.0-RC-7

20.Apr.12: isoparser-1.0-RC-2 released

  • added tmcd time code sample entry (apple stuff)
  • Enhanced AvcConfigurationBox to support latest spec revision
  • Added Ac3TrackImpl & Ec3TrackImpl -> Ability to mux (E)AC3 into Mp4
  • corrected sample duration calculation in FragmentedMp4Builder
  • Track/Movie level API now supports Sub Sample Information Boix

24.Mar.12: isoparser-1.0-RC-1 released

This release is the single most important release the isoparser has ever seen. The crappy IsoBufferWrapper interface and IsoOutputStream are vanished. All I/O is done via Buffers and Channels (Java NIO). With the help of aspect4j a file is first parsed just coarsely (box length and type) and whenever you access a box it is parsed on demand. Boxes larger than 1 MB are not read into memory they are mapped into the memory. All in all the read/write performance has - depending on the measurement - been improved by the factor of 5.

A cool new example is a Microsoft Smooth Streaming example! You can create and stream Microsoft Smooth Streaming streams without any MS tool. You just need the isoparser and an HTTP server of your choice. Anyone interested or is it just an intellectual bauble?

11.Mar.12: isoviewer-2.0-SNAPSHOT uploaded

I just uploaded a new version of the isoviewer. It is based on the new API. It is marked as 2.0-SNAPSHOT in the header, the old one (1.2-SNAPSHOT) is still there since it is really brand new. The performance should be much better. Try it and tell me.

6.Mar.12: isoparser-1.0-beta-6 released

  • sync samples were wrong when using append track
  • add sampleInfoSize calulation for correct saiz usage
  • getter for hdlr box
  • added toString and getters on several classes
  • made usable on android
  • some work with amf0 tracks (flash stuff)
  • scannotation has been removed from the dependencies

9.Jan.12: isoparser-1.0-beta-5 released

  • Change: BoxContainer#getClass now also returns subclasses
  • Added MS TfrfBox
  • Added MS Tfxd box
  • Added TrackEncryptionBox ('tenc' & 'uuid' variant)
  • Added SampleEncryptionBox

22.Nov.11: Iso Viewer 1.2 released

No substantial change over 1.2-SNAPSHOT. Using latest beta-4 release of isoparser as base.

21.Nov.11: isoparser-1.0-beta-4 released

It was time for a release. I added a lot of stuff without providing a release of the new features.

Changes:

  • Added ItemDataBox, PiffSampleEncryptionBox ('uuid' )
  • Added ability to keep uuid box to class references in isoparser-default.properties
  • Added TrickPlayBox ('trik') and ESDescriptorBox ('esds')
  • Added AVCNalUnitStorageBox ('avcn') and BaseLocationBox ('bloc')
  • Added AssetInformationBox ('ainf')
  • Added SampleAuxiliaryInformationOffsetsBox ('saio') and SampleAuxiliaryInformationSizesBox ('saiz')
  • Tweaked memory consumption especially when parsing a file with raw audio
  • Added XmlBox ('xml ')
  • Added CompositionShiftLeastGreatestAtom ('cslg')
  • Made IsoBufferWrapper an interface and added various implementations
  • Made MetaBox sensible to the different definitions (apple handles it as full box, iso as box (or the other way round - don't remember))

4.Nov.11: new isoviewer snapshot.

  • Application now restores its size, position, last opened file and last opened boxes
  • Application has an icon and shows opened file in title
  • ESDescriptors are now parsed and shown (isoparser feature)
  • ftyp shows subtypes (again)
  • Due to annotation parsing this release is around 1.2MB. I don't think this kind of annotation processing is necessary. I think I will remove it and rather list all required classes.
  • Tweaked memory consumption for tracks with fixed sample size (e.g. raw audio)

23.Sept.11: new isoviewer snapshot.

  • co64 is taken into account
  • size and dimension of isoviewer window is remembered
  • paths of open boxes are tried to reopen in the left tree if a new file is opened.

The latest Iso Viewer 1.2-SNAPSHOT introduces major changes to the UI and underlying structures. Tracks, chunks and samples are no longer children of mdat boxes. Tracks and samples now got the place they deserve. A second tab now displays all tracks of the opened file and allows listing of all samples of a certain track.

ALWAYS use a hex editor if you need to be really sure what is in the actual file.


Powered by Google Project Hosting