#!/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, lambda x: not x) bool_note('Encrypted', soup.Metadata.ThreeD, lambda x: not x) reel_types = ['single', 'by-video', 'by-length'] note('Reel type', reel_types[int(soup.ReelType.text)]) for content in soup.Metadata.Playlist.children: if isinstance(content, bs4.element.Tag): print() note(' Type', content.Type.text) note(' Position', dcp_time(content.Position)) note(' Trim start', content.TrimStart.text) note(' Trim end', content.TrimEnd.text) if content.VideoFrameRate: note(' Video rate', content.VideoFrameRate.text) note(' Video length', content_time_from_frames(content.VideoLength, float(content.VideoFrameRate.text))) if content.AudioFrameRate: note(' Audio rate', content.AudioFrameRate.text) bool_note(' Reference video', content.ReferenceVideo, lambda x: not x) bool_note(' Reference audio', content.ReferenceAudio, lambda x: not x) bool_note(' Reference subtitle', content.ReferenceSubtitle, lambda x: not x) for stream in content.find_all('AudioStream'): note(' Audio stream length', stream.Length.text)