def __init__(self, f): FLV.__init__(self, f) self.metadata = None self.keyframes = FLVObject() self.keyframes.filepositions = [] self.keyframes.times = [] self.no_video = True self.audio_tag_number = 0 self.first_media_tag_offset = None
def __init__(self, f): FLV.__init__(self, f) try: st_size = os.stat(self.f.name)[6] except: print '[-] Could not stat() original file' return self.buffer = self.f.read(st_size) self.f.seek(0L)
def __init__(self, f): FLV.__init__(self, f) self.metadata = None self.keyframes = FLVObject() self.keyframes.filepositions = [] self.keyframes.times = [] self.no_video = True # If the FLV file has no video, there are no keyframes. We want to put # some info in the metadata anyway -- Flash players use keyframe # information as a seek table. In audio-only FLV files you can usually # seek to the beginning of any tag (this is not entirely true for AAC). # Most players still work if you just provide "keyframe" info that's # really a table of every Nth audio tag, even with AAC. # Because of that, until we see a video tag we make every Nth # IndexingAudioTag store its offset and timestamp. self.audio_tag_number = 0 self.audio_seekpoints = FLVObject() self.audio_seekpoints.filepositions = [] self.audio_seekpoints.times = [] self.metadata_tag_start = None self.metadata_tag_end = None self.first_media_tag_offset = None