private MovieHeaderBox movieHeader(NodeBox movie) { int timescale = tracks.get(0).getTimescale(); long duration = tracks.get(0).getTrackTotalDuration(); AbstractMP4MuxerTrack videoTrack = getVideoTrack(); if (videoTrack != null) { timescale = videoTrack.getTimescale(); duration = videoTrack.getTrackTotalDuration(); } return new MovieHeaderBox(timescale, duration, 1.0f, 1.0f, new Date().getTime(), new Date().getTime(), new int[] { 0x10000, 0, 0, 0, 0x10000, 0, 0, 0, 0x40000000 }, nextTrackId); }
private MovieHeaderBox movieHeader(NodeBox movie) { int timescale = tracks.get(0).getTimescale(); long duration = tracks.get(0).getTrackTotalDuration(); AbstractMP4MuxerTrack videoTrack = getVideoTrack(); if (videoTrack != null) { timescale = videoTrack.getTimescale(); duration = videoTrack.getTrackTotalDuration(); } return new MovieHeaderBox(timescale, duration, 1.0f, 1.0f, new Date().getTime(), new Date().getTime(), new int[] { 0x10000, 0, 0, 0, 0x10000, 0, 0, 0, 0x40000000 }, nextTrackId); }
public static MovieHeaderBox createMovieHeaderBox(int timescale, long duration, float rate, float volume, long created, long modified, int[] matrix, int nextTrackId) { MovieHeaderBox mvhd = new MovieHeaderBox(new Header(fourcc())); mvhd.timescale = timescale; mvhd.duration = duration; mvhd.rate = rate; mvhd.volume = volume; mvhd.created = created; mvhd.modified = modified; mvhd.matrix = matrix; mvhd.nextTrackId = nextTrackId; return mvhd; }