org.jcodec.containers.mp4.muxer
Class MP4Muxer

java.lang.Object
  extended by org.jcodec.containers.mp4.muxer.MP4Muxer

public class MP4Muxer
extends Object

This class is part of JCodec ( www.jcodec.org ) This software is distributed under FreeBSD License Creates MP4 file out of a set of samples

Author:
The JCodec project

Constructor Summary
MP4Muxer(SeekableByteChannel output)
           
MP4Muxer(SeekableByteChannel output, Brand brand)
           
MP4Muxer(SeekableByteChannel output, FileTypeBox ftyp)
           
 
Method Summary
 FramesMP4MuxerTrack addCompressedAudioTrack(String fourcc, int timescale, int channels, int sampleRate, int samplesPerPkt, Box... extra)
           
 TimecodeMP4MuxerTrack addTimecodeTrack(int timescale)
           
 FramesMP4MuxerTrack addTrackForCompressed(TrackType type, int timescale)
           
 PCMMP4MuxerTrack addTrackForUncompressed(TrackType type, int timescale, int sampleDuration, int sampleSize, SampleEntry se)
           
 PCMMP4MuxerTrack addUncompressedAudioTrack(AudioFormat format)
           
 FramesMP4MuxerTrack addVideoTrack(String fourcc, Size size, String encoderName, int timescale)
           
 FramesMP4MuxerTrack addVideoTrackWithTimecode(String fourcc, Size size, String encoderName, int timescale)
           
static AudioSampleEntry audioSampleEntry(String fourcc, int drefId, int sampleSize, int channels, int sampleRate, EndianBox.Endian endian)
           
 MovieBox finalizeHeader()
           
 List<AbstractMP4MuxerTrack> getAudioTracks()
           
 AbstractMP4MuxerTrack getTimecodeTrack()
           
 List<AbstractMP4MuxerTrack> getTracks()
           
 AbstractMP4MuxerTrack getVideoTrack()
           
static String lookupFourcc(AudioFormat format)
           
 void storeHeader(MovieBox movie)
           
static LeafBox terminatorAtom()
           
static VideoSampleEntry videoSampleEntry(String fourcc, Size size, String encoderName)
           
 void writeHeader()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MP4Muxer

public MP4Muxer(SeekableByteChannel output)
         throws IOException
Throws:
IOException

MP4Muxer

public MP4Muxer(SeekableByteChannel output,
                Brand brand)
         throws IOException
Throws:
IOException

MP4Muxer

public MP4Muxer(SeekableByteChannel output,
                FileTypeBox ftyp)
         throws IOException
Throws:
IOException
Method Detail

addVideoTrackWithTimecode

public FramesMP4MuxerTrack addVideoTrackWithTimecode(String fourcc,
                                                     Size size,
                                                     String encoderName,
                                                     int timescale)

addVideoTrack

public FramesMP4MuxerTrack addVideoTrack(String fourcc,
                                         Size size,
                                         String encoderName,
                                         int timescale)

videoSampleEntry

public static VideoSampleEntry videoSampleEntry(String fourcc,
                                                Size size,
                                                String encoderName)

audioSampleEntry

public static AudioSampleEntry audioSampleEntry(String fourcc,
                                                int drefId,
                                                int sampleSize,
                                                int channels,
                                                int sampleRate,
                                                EndianBox.Endian endian)

terminatorAtom

public static LeafBox terminatorAtom()

addTimecodeTrack

public TimecodeMP4MuxerTrack addTimecodeTrack(int timescale)

addTrackForCompressed

public FramesMP4MuxerTrack addTrackForCompressed(TrackType type,
                                                 int timescale)

addTrackForUncompressed

public PCMMP4MuxerTrack addTrackForUncompressed(TrackType type,
                                                int timescale,
                                                int sampleDuration,
                                                int sampleSize,
                                                SampleEntry se)

getTracks

public List<AbstractMP4MuxerTrack> getTracks()

writeHeader

public void writeHeader()
                 throws IOException
Throws:
IOException

storeHeader

public void storeHeader(MovieBox movie)
                 throws IOException
Throws:
IOException

finalizeHeader

public MovieBox finalizeHeader()
                        throws IOException
Throws:
IOException

getVideoTrack

public AbstractMP4MuxerTrack getVideoTrack()

getTimecodeTrack

public AbstractMP4MuxerTrack getTimecodeTrack()

getAudioTracks

public List<AbstractMP4MuxerTrack> getAudioTracks()

lookupFourcc

public static String lookupFourcc(AudioFormat format)

addUncompressedAudioTrack

public PCMMP4MuxerTrack addUncompressedAudioTrack(AudioFormat format)

addCompressedAudioTrack

public FramesMP4MuxerTrack addCompressedAudioTrack(String fourcc,
                                                   int timescale,
                                                   int channels,
                                                   int sampleRate,
                                                   int samplesPerPkt,
                                                   Box... extra)


Copyright © 2013. All Rights Reserved.