@@ -0,0 +1,2217 @@
+package org.jcodec.samples.mux;%0A%0Aimport static org.jcodec.common.io.IOUtils.closeQuietly;%0Aimport static org.jcodec.common.io.IOUtils.readFileToByteArray;%0A%0Aimport java.io.File;%0Aimport java.io.FileInputStream;%0Aimport java.io.FileNotFoundException;%0Aimport java.io.IOException;%0Aimport java.util.List;%0A%0Aimport org.jcodec.common.DemuxerTrack;%0Aimport org.jcodec.common.io.FileChannelWrapper;%0Aimport org.jcodec.containers.mkv.MKVParser;%0Aimport org.jcodec.containers.mkv.demuxer.MKVDemuxer;%0Aimport org.jcodec.containers.mkv.demuxer.MKVDemuxer.AudioTrack;%0Aimport org.jcodec.containers.mkv.boxes.EbmlMaster;%0A%0A%0Apublic class MKVDemux %7B%0A%0A%09public static void main(String%5B%5D args) throws FileNotFoundException, IOException %7B%0A        if (args.length %3C 1) %7B%0A            System.out.println(%22Syntax: %3Cin.mkv%3E%5Cn%22 + %22%5CtWhere:%5Cn%22%0A                    + %22%5Ct%3Cin.mkv%3E%5CtThe file to decode%22);%0A            return;%0A        %7D%0A%0A        FileInputStream demInputStream = new FileInputStream(args%5B0%5D);%0A        MKVDemuxer demuxer = new MKVDemuxer(new FileChannelWrapper(demInputStream.getChannel()));%0A%0A    %09System.out.println(%22Audio tracks: %22 + demuxer.getAudioTracks().size());%0A        for (DemuxerTrack elem : demuxer.getAudioTracks()) %7B%0A        %09AudioTrack elemAudio = (AudioTrack)elem;%0A        %09if (elemAudio == null) %7B%0A        %09%09System.out.println(%22    - null%22);%0A        %09%7D else %7B%0A        %09%09System.out.println(%22    - %22 + elemAudio.getLanguage() + %22  %22 + elemAudio.getMeta().getCodec() + %22  %22 + elem.getMeta().getAudioCodecMeta().getChannelCount() + %22  %22 + elem.getMeta().getAudioCodecMeta().getSampleRate());%0A        %09%7D%0A        %7D%0A    %09System.out.println(%22Video tracks: %22 + demuxer.getVideoTracks().size());%0A        for (DemuxerTrack elem : demuxer.getVideoTracks()) %7B%0A        %09System.out.println(%22    - %22 + elem.getMeta().getType() + %22  %22 + elem.getMeta().getCodec() + %22  %22 + elem.getMeta().getVideoCodecMeta().getSize());%0A        %7D%0A    %09System.out.println(%22Video subtitle tracks: %22 + demuxer.getSubtitleTracks().size());%0A        for (DemuxerTrack elem : demuxer.getSubtitleTracks()) %7B%0A        %09System.out.println(%22    - %22 + elem.getMeta().getType() + %22  %22 + elem.getMeta().getCodec());%0A        %7D%0A        closeQuietly(demInputStream);%0A        %0A%09%7D%0A%0A%7D%0A

add a simple MKV demuxer