Update main.py
This commit is contained in:
parent
1adf9e4aca
commit
d1184b123d
13
main.py
13
main.py
|
@ -1,5 +1,12 @@
|
|||
#!/usr/bin/python3
|
||||
"""
|
||||
mkvmerge required (python-pymkv)
|
||||
"""
|
||||
|
||||
import sys
|
||||
import os
|
||||
import subprocess
|
||||
import scenedetect
|
||||
|
||||
|
||||
def get_cpu_count():
|
||||
|
@ -10,7 +17,7 @@ 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)
|
||||
def split_video(input_vid):
|
||||
cmd2 = f'scenedetect -i {input_vid} --output output detect-content list-scenes split-video -c'
|
||||
subprocess.call(cmd2, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
|
||||
|
|
Loading…
Reference in a new issue