### Question:
StandardMp4Writer extends DefaultBoxes implements SampleSink { public void close() throws IOException { for (StreamingTrack streamingTrack : source) { writeChunkContainer(createChunkContainer(streamingTrack)); streamingTrack.close(); } write(sink, createMoov()); } StandardMp4Writer(List<StreamingTrack> source, WritableByteChannel sink); void close(); void acceptSample(StreamingSample streamingSample, StreamingTrack streamingTrack); static final Object OBJ; }### Answer:
@Test public void testMuxing() throws Exception { H264AnnexBTrack b = new H264AnnexBTrack(StandardMp4WriterTest.class.getResourceAsStream("/org/mp4parser/streaming/input/h264/tos.h264")); OutputStream baos = new FileOutputStream("output.mp4"); StandardMp4Writer writer = new StandardMp4Writer(Collections.<StreamingTrack>singletonList(b), Channels.newChannel(baos)); b.call(); writer.close(); }