diff --git a/srt2fcp.py b/srt2fcp.py index 8396b67..994e641 100755 --- a/srt2fcp.py +++ b/srt2fcp.py @@ -18,7 +18,7 @@ from PIL import Image base = os.path.abspath(os.path.dirname(__file__)) -generator_template = ''' +generator_template = ''' Text 3000 @@ -219,18 +219,18 @@ sequence_template = ''' 24 - Apple DV - PAL + Apple ProRes 422 Final Cut Pro Apple Inc. 7.0 - Apple DV - PAL - DV - PAL - dvcp + Apple ProRes 422 + Apple ProRes 422 + apcn appl - 1023 + 1024 0 0 0 @@ -294,6 +294,7 @@ class Fcp: fontsize = 18 font = 'Courier New' #font = 'Lucida Grande' + gid = 0 def __init__(self, size=None, font=None): if size is not None: @@ -329,8 +330,10 @@ class Fcp: }) def sub(self, start, end, text): - text = xml.sax.saxutils.escape('\n'.join(text).strip()).replace('\n', ' ') + self.gid += 1 + text = xml.sax.saxutils.escape('\n'.join(text).strip()).replace('\n', ' ') return generator_template % { + 'id': self.gid, 'start': start, 'end': end, 'duration': end-start,