public WebVTTSourceLabelBox getSourceLabel() { return Path.getPath(this, "vlab"); } }
public MediaInformationBox getMediaInformationBox() { return Path.getPath(this, "minf[0]"); }
public HandlerBox getHandlerBox() { return Path.getPath(this, "hdlr[0]"); }
public SampleTableBox getSampleTableBox() { return Path.getPath(this, "stbl[0]"); }
public MediaBox getMediaBox() { return Path.getPath(this, "mdia[0]"); }
public SampleDescriptionBox getSampleDescriptionBox() { return Path.getPath(this, "stsd"); }
public SampleToChunkBox getSampleToChunkBox() { return Path.getPath(this, "stsc"); }
public MovieHeaderBox getMovieHeaderBox() { return Path.getPath(this, "mvhd"); }
public TrackHeaderBox getTrackHeaderBox() { return Path.getPath(this, "tkhd[0]"); }
public TimeToSampleBox getTimeToSampleBox() { return Path.getPath(this, "stts"); }
public CompositionTimeToSample getCompositionTimeToSample() { return Path.getPath(this, "ctts"); }
public SampleSizeBox getSampleSizeBox() { return Path.getPath(this, "stsz"); }
public SampleDependencyTypeBox getSampleDependencyTypeBox() { return Path.getPath(this, "sdtp"); }
public MediaHeaderBox getMediaHeaderBox() { return Path.getPath(this, "mdhd[0]"); }
public SyncSampleBox getSyncSampleBox() { return Path.getPath(this, "stss"); }
private String getSchemeType(SampleEntry s) { SchemeTypeBox schm = Path.getPath((Container) s, "sinf/schm"); assert schm != null : "Cannot get cipher without schemetypebox"; return schm.getSchemeType(); }
public static void main(String[] args) throws IOException { FileChannel channel = new FileInputStream("/home/sannies2/Mission_Impossible_Ghost_Protocol_Feature_SDUV_480p_16avg192max.uvu").getChannel(); IsoFile isoFile = new IsoFile(channel); //isoFile = new IsoFile(Channels.newChannel(new FileInputStream(this.filePath))); //Path path = new Path(isoFile); XmlBox xmlBox = Path.getPath(isoFile, "/moov/meta/xml "); assert xmlBox != null; String xml = xmlBox.getXml(); System.err.println(xml); }
public static void main(String[] args) throws IOException { IsoFile i = new IsoFile("C:\\Users\\sannies\\Downloads\\CF2.0_1920x1080_8000.mp4"); VisualSampleEntry sampleEntry = Path.getPath(i, "/moov[0]/trak[0]/mdia[0]/minf[0]/stbl[0]/stsd[0]/avc1[0]"); List<Box> nuBoxes = new ArrayList<Box>(); assert sampleEntry != null; for (Box box : sampleEntry.getBoxes()) { if (!box.getType().equals("pasp")) { nuBoxes.add(box); } } sampleEntry.setBoxes(nuBoxes); i.writeContainer(new FileOutputStream("C:\\Users\\sannies\\Downloads\\CF2.0_1920x1080_8000-without-pasp.mp4").getChannel()); }
public CencDecryptingTrackImpl(CencEncryptedTrack original, SecretKey sk) { super("dec(" + original.getName() + ")"); this.original = original; Map<UUID, SecretKey> keys = new HashMap<>(); for (SampleEntry sampleEntry : original.getSampleEntries()) { TrackEncryptionBox tenc = Path.getPath((Container)sampleEntry, "sinf[0]/schi[0]/tenc[0]"); assert tenc != null; keys.put(tenc.getDefault_KID(), sk); } init(keys); }
protected void writeChunkContainer(ChunkContainer chunkContainer) throws IOException { TrackBox tb = trackBoxes.get(chunkContainer.streamingTrack); ChunkOffsetBox stco = Path.getPath(tb, "mdia[0]/minf[0]/stbl[0]/stco[0]"); assert stco != null; stco.setChunkOffsets(Mp4Arrays.copyOfAndAppend(stco.getChunkOffsets(), bytesWritten + 8)); write(sink, chunkContainer.mdat); }