print('%20s: %s' % (k, v))
def bool_note(k, v, highlight=None):
- v = 'yes' if v == 1 else 'no'
+ v = 'yes' if (v is not None and v.text == "1") else 'no'
note(k, v, highlight)
def dcp_time(s):
m -= h * 60
return '%s DCP_%02d:%02d:%02d.%02d' % (str(raw).ljust(8), h, m, s, f)
+
def content_time_from_frames(s, r):
raw = int(s.text)
f = raw
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)
+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 c in soup.Metadata.Playlist.children:
print()
note(' Type', c.Type.text)
note(' Position', dcp_time(c.Position))
+ note(' Trim start', c.TrimStart.text)
+ note(' Trim end', c.TrimEnd.text)
if c.VideoFrameRate:
note(' Video rate', c.VideoFrameRate.text)
note(' Video length', content_time_from_frames(c.VideoLength, float(c.VideoFrameRate.text)))