diff --git a/srt2fcp.py b/srt2fcp.py
index 7521591..61576c7 100755
--- a/srt2fcp.py
+++ b/srt2fcp.py
@@ -3,14 +3,15 @@
import sys
import os
from optparse import OptionParser
-import tempfile
-import shutil
-import math
-import time
import json
-import urllib.request
-import urllib.parse
+import math
+import shutil
+import tempfile
+import time
import urllib.error
+import urllib.parse
+import urllib.request
+import uuid
import xml.sax.saxutils
import ox
@@ -172,7 +173,7 @@ generator_template = '''
video
- BAA51DEC-ECB0-4879-9910-8E83B0EF7C1B
+ $(uuid)s
'''
@@ -184,7 +185,7 @@ fcp_footer = ''''''
sequence_template = '''
- 72DC4146-6224-4400-BAAC-2AB6E0D3D292
+ $(uuid)s
add
%(id)s
%(duration)s
@@ -325,6 +326,7 @@ class Fcp:
subs.append((start, end, value.split('\n')))
self.sequences.append(sequence_template % {
'id': os.path.splitext(os.path.basename(srt))[0],
+ 'uuid': str(uuid.uuid1()).upper(),
'duration': duration,
'subs': '\n'.join([self.sub(*s) for s in subs])
})
@@ -334,6 +336,7 @@ class Fcp:
text = xml.sax.saxutils.escape('\n'.join(text).strip()).replace('\n', '
')
return generator_template % {
'id': self.gid,
+ 'uuid': str(uuid.uuid1()).upper(),
'start': start,
'end': end,
'duration': end-start,