summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AutoImagesGPU2.py16
-rw-r--r--AutoVideosGPU.py10
-rw-r--r--AutoVideosGPU2.py16
-rw-r--r--ImportAutoImages.py1
-rw-r--r--ImportAutoVideos.py1
-rw-r--r--README.md4
6 files changed, 10 insertions, 38 deletions
diff --git a/AutoImagesGPU2.py b/AutoImagesGPU2.py
deleted file mode 100644
index d23f06f..0000000
--- a/AutoImagesGPU2.py
+++ /dev/null
@@ -1,16 +0,0 @@
-import os
-
-def removeIfExists(filename):
- if os.path.exists(filename):
- os.remove(filename)
-
-
-exitStatus = os.system('python AutoImagesGPU.py')
-
-SEGFAULT = 35584
-
-while exitStatus == SEGFAULT:
- exitStatus = os.system('python ImportAutoImages.py')
-
-removeIfExists('AutoImagesSettings.txt')
-removeIfExists('imageNumber.txt')
diff --git a/AutoVideosGPU.py b/AutoVideosGPU.py
index a088e65..e65f82d 100644
--- a/AutoVideosGPU.py
+++ b/AutoVideosGPU.py
@@ -98,8 +98,13 @@ def createVideo(width, height, videoLength, frameRate, functionLength,
except:
fourcc = cv2.VideoWriter_fourcc(*'XVID')
name = ' '.join([namemaker3.generate() for i in range(3)]) + '.avi'
- out = cv2.VideoWriter(directory+'/'+name,fourcc, frameRate, (width,height))
-
+ out = cv2.VideoWriter(directory+'/'+name, fourcc, frameRate, (width,height))
+ if not out.isOpened():
+ try:
+ fourcc = cv2.cv.CV_FOURCC(*'MJPG')
+ except:
+ fourcc = cv2.VideoWriter_fourcc(*'MJPG')
+ out = cv2.VideoWriter(directory+'/'+name, fourcc, frameRate, (width,height))
for t in range(int(videoLength*frameRate)):
clProgram = replace(clProgramTemplate2, '<FRAMENUMBER>', str(t))
@@ -120,6 +125,7 @@ def createVideo(width, height, videoLength, frameRate, functionLength,
out.write(output[:, :, ::-1])
out.release()
+
def createVideos():
diff --git a/AutoVideosGPU2.py b/AutoVideosGPU2.py
deleted file mode 100644
index b724c2d..0000000
--- a/AutoVideosGPU2.py
+++ /dev/null
@@ -1,16 +0,0 @@
-import os
-
-def removeIfExists(filename):
- if os.path.exists(filename):
- os.remove(filename)
-
-
-exitStatus = os.system('python AutoVideosGPU.py')
-
-SEGFAULT = 35584
-
-while exitStatus == SEGFAULT:
- exitStatus = os.system('python ImportAutoVideos.py')
-
-removeIfExists('AutoVideosSettings.txt')
-removeIfExists('videoNumber.txt')
diff --git a/ImportAutoImages.py b/ImportAutoImages.py
deleted file mode 100644
index 1643a4a..0000000
--- a/ImportAutoImages.py
+++ /dev/null
@@ -1 +0,0 @@
-import AutoImagesGPU
diff --git a/ImportAutoVideos.py b/ImportAutoVideos.py
deleted file mode 100644
index a371f51..0000000
--- a/ImportAutoVideos.py
+++ /dev/null
@@ -1 +0,0 @@
-import AutoVideosGPU
diff --git a/README.md b/README.md
index e34502b..3fc5798 100644
--- a/README.md
+++ b/README.md
@@ -40,11 +40,11 @@ cd /directory/where/AutoArt/is/
To run AutoImages:
```
-python AutoImagesGPU2.py
+python AutoImagesGPU.py
```
To run AutoVideos:
```
-python AutoVideosGPU2.py
+python AutoVideosGPU.py
```
To run AutoAudio:
```