aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow.py
diff options
context:
space:
mode:
authortassaron2017-07-09 01:10:06 -0400
committertassaron2017-07-09 01:10:06 -0400
commit94d4acc1f4f4abe4029e8f9c050932b67cae8cec (patch)
treed7d128e0a9f23d4df50800e82f42231a21923cb9 /src/mainwindow.py
parentf027fd43537eb60f682b51a5018caee471bf33e2 (diff)
more comments + warnings for outdated dependencies
Diffstat (limited to 'src/mainwindow.py')
-rw-r--r--src/mainwindow.py34
1 files changed, 33 insertions, 1 deletions
diff --git a/src/mainwindow.py b/src/mainwindow.py
index 1c6bbc4..165b5bd 100644
--- a/src/mainwindow.py
+++ b/src/mainwindow.py
@@ -6,6 +6,7 @@
'''
from PyQt5 import QtCore, QtGui, uic, QtWidgets
from PyQt5.QtWidgets import QMenu, QShortcut
+from PIL import Image
from queue import Queue
import sys
import os
@@ -17,7 +18,7 @@ import core
import preview_thread
import video_thread
from presetmanager import PresetManager
-from toolkit import LoadDefaultSettings, disableWhenEncoding
+from toolkit import LoadDefaultSettings, disableWhenEncoding, checkOutput
class PreviewWindow(QtWidgets.QLabel):
@@ -269,6 +270,37 @@ class MainWindow(QtWidgets.QMainWindow):
self.openProject(self.currentProject, prompt=False)
self.drawPreview(True)
+ # verify Pillow version
+ if not self.settings.value("pilMsgShown") \
+ and 'post' not in Image.PILLOW_VERSION:
+ self.showMessage(
+ msg="You are using the standard version of the "
+ "Python imaging library (Pillow %s). Upgrade "
+ "to the Pillow-SIMD fork to enable hardware accelerations "
+ "and export videos faster." % Image.PILLOW_VERSION
+ )
+ self.settings.setValue("pilMsgShown", True)
+
+ # verify Ffmpeg version
+ if not self.settings.value("ffmpegMsgShown"):
+ try:
+ with open(os.devnull, "w") as f:
+ ffmpegVers = checkOutput(
+ ['ffmpeg', '-version'], stderr=f
+ )
+ goodVersion = str(ffmpegVers).split()[2].startswith('3')
+ except:
+ goodVersion = False
+ else:
+ goodVersion = True
+
+ if not goodVersion:
+ self.showMessage(
+ msg="You're using an old version of Ffmpeg. "
+ "Some features may not work as expected."
+ )
+ self.settings.setValue("ffmpegMsgShown", True)
+
# Setup Hotkeys
QtWidgets.QShortcut("Ctrl+S", self.window, self.saveCurrentProject)
QtWidgets.QShortcut("Ctrl+A", self.window, self.openSaveProjectDialog)