#!/usr/bin/python3 import sys import bs4 import termcolor inside = False xml = '' for l in sys.stdin.readlines(): if l.startswith(''): inside = True elif l.startswith(' 235000000) note('Video frame rate', soup.Metadata.VideoFrameRate.text, lambda x: int(x) not in [24, 25, 30]) dcp_rate = int(soup.Metadata.VideoFrameRate.text) note('Audio channels', soup.Metadata.AudioChannels.text) bool_note('3D', soup.Metadata.ThreeD.text, lambda x: not x) bool_note('Encrypted', soup.Metadata.ThreeD.text, lambda x: not x) reel_types = ['single', 'by-video', 'by-length'] note('Reel type', reel_types[int(soup.ReelType.text)]) for c in soup.Metadata.Playlist.children: if isinstance(c, bs4.element.Tag): print() note(' Type', c.Type.text) note(' Position', dcp_time(c.Position)) if c.VideoFrameRate: note(' Video rate', c.VideoFrameRate.text) note(' Video length', content_time_from_frames(c.VideoLength, float(c.VideoFrameRate.text))) if c.AudioFrameRate: note(' Audio rate', c.AudioFrameRate.text) bool_note(' Reference video', c.ReferenceVideo, lambda x: not x) bool_note(' Reference audio', c.ReferenceAudio, lambda x: not x) bool_note(' Reference subtitle', c.ReferenceSubtitle, lambda x: not x)