Create main.py

This commit is contained in:
Zen 2020-01-08 02:20:18 +02:00
parent 7979946238
commit 1adf9e4aca

16
main.py Normal file
View file

@ -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)