FileDocCategorySizeDatePackage
Ec3Example.javaAPI Docmp4parser 1.0-RC-17947Wed Dec 19 20:10:38 GMT 2012com.googlecode.mp4parser.muxformats

Ec3Example.java

package com.googlecode.mp4parser.muxformats;

import com.coremedia.iso.IsoFile;
import com.googlecode.mp4parser.authoring.Movie;
import com.googlecode.mp4parser.authoring.builder.DefaultMp4Builder;
import com.googlecode.mp4parser.authoring.tracks.EC3TrackImpl;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 *
 */
public class Ec3Example {
    public static void main(String[] args) throws IOException {
        EC3TrackImpl track = new EC3TrackImpl(new FileInputStream("/home/sannies/Solekai020_1920_23_75x1_Dolby_v2/Dolby_Channel-Check_Voice_8-ch_Discrete_24bit_48kHz_dn24_448.ec3"));
        Movie m = new Movie();
        m.addTrack(track);
        DefaultMp4Builder mp4Builder = new DefaultMp4Builder();
        IsoFile isoFile = mp4Builder.build(m);
        FileOutputStream fos = new FileOutputStream("output.mp4");
        isoFile.getBox(fos.getChannel());
        fos.close();
    }
}