From 1adf9e4acabb0f715a45c2386784a642bc8c1699 Mon Sep 17 00:00:00 2001 From: Zen <46526140+master-of-zen@users.noreply.github.com> Date: Wed, 8 Jan 2020 02:20:18 +0200 Subject: [PATCH] Create main.py --- main.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 main.py diff --git a/main.py b/main.py new file mode 100644 index 0000000..1f70c65 --- /dev/null +++ b/main.py @@ -0,0 +1,16 @@ +import os +import subprocess + + +def get_cpu_count(): + return os.cpu_count() + + +def get_ram(): + return round((os.sysconf('SC_PAGE_SIZE') * os.sysconf('SC_PHYS_PAGES')) / (1024. ** 3), 3) + + +cmd = 'scenedetect --input my_video.mp4 --output my_video_scenes --stats my_video.stats.csv detect-content list-scenes' + +d = subprocess.call(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) +