def __init__(self, filename=None, data=None): MP4Filter.__init__(self, filename, data) self.top_level_boxes_to_parse = [b'moov'] self.composite_boxes_to_parse = [b'moov', b'trak', b'mdia', b'mvex'] self._track_timescale = -1 self._track_id = None self._handler_type = None
def __init__(self, filename=None, data=None): MP4Filter.__init__(self, filename, data) self.top_level_boxes_to_parse = [b'ftyp', b'moov'] self.composite_boxes_to_parse = [b'moov', b'mvex'] self._ftyp = None self._mvhd = None self._trex = None self._trak = None
def __init__(self, segmentFile, scc_data, time_scale, tfdt): MP4Filter.__init__(self, segmentFile) self.top_level_boxes_to_parse = [b"styp", b"sidx", b"moof", b"mdat"] self.composite_boxes_to_parse = [b"moof", b"traf"] self.scc_data = scc_data self.time_scale = time_scale self.tfdt = tfdt self.trun_offset = 0 self.scc_map = []
def __init__(self, track_id, sequence_nr, sample_duration, tfdt_time, ttml_data): MP4Filter.__init__(self, data=TTML_MEDIA_TMPL) self.track_id = track_id self.sequence_nr = sequence_nr self.default_sample_duration = sample_duration self.tfdt_time = tfdt_time self.ttml_data = ttml_data self.top_level_boxes_to_parse = [b'styp', b'moof', b'mdat', b'sidx'] self.composite_boxes_to_parse = [b'moof', b'traf']
def __init__(self, lang="eng", track_id=TRACK_ID, timescale=TIMESCALE, creation_modfication_time=None, hdlr_name=None): "Filter to create an appropriate init segment." MP4Filter.__init__(self, data=TTML_INIT) self.lang = lang self.track_id = track_id self.timescale = timescale self.creation_modfication_time = creation_modfication_time # Measured from 1904-01-01 in seconds self.handler_name = hdlr_name self.top_level_boxes_to_parse = [b'moov'] self.composite_boxes_to_parse = [b'moov', b'trak', b'mdia', b'minf', b'dinf']
def __init__(self, filename=None, data=None): MP4Filter.__init__(self, filename, data) self.top_level_boxes_to_parse = [b'styp', b'moof', b'mdat'] self.trun_data_offset = None self.trun_data_offset_in_traf = None self.traf_start = None self.styp = None self.mfhd = None self.traf = None self.moof = None self.mdat = None
def __init__(self, file_name, seg_nr=None, seg_duration=1, offset=0, lmsg=False, track_timescale=None, scte35_per_minute=0, rel_path=None, is_ttml=False, default_sample_duration=None, insert_sidx=False, emsg_last_seg=False, now=False): MP4Filter.__init__(self, file_name) self.top_level_boxes_to_parse = [b'styp', b'sidx', b'moof', b'mdat'] self.composite_boxes_to_parse = [b'moof', b'traf'] self.seg_nr = seg_nr self.seg_duration = seg_duration self.offset = offset self.track_timescale = track_timescale self.rel_path = rel_path self.lmsg = lmsg self.size_change = 0 self.new_saio_value = None self.tfdt_value = None # For testing self.default_sample_duration = default_sample_duration self.insert_sidx = insert_sidx self.duration = None self.scte35_per_minute = scte35_per_minute self.is_ttml = is_ttml self.ttml_size = None self.emsg_last_seg = emsg_last_seg self.now = now if self.is_ttml: self.data = self.find_and_process_mdat(self.data)
def __init__(self, file_name=None, data=None): MP4Filter.__init__(self, file_name, data) self.top_level_boxes_to_parse = [b'moov'] self.composite_boxes_to_parse = [b'moov', b'trak', b'mdia', b'mvex'] self.movie_timescale = -1