unMcFucking
This commit is contained in:
@@ -3,15 +3,22 @@ import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
import os
|
||||
regex = re.compile("Stream #0:\d(\(\w*\))?: Audio:.*")
|
||||
|
||||
|
||||
output_folder_name = "/screenshots/"
|
||||
droppedFile = sys.argv[1]
|
||||
droppedName = Path(droppedFile).name
|
||||
|
||||
#droppedFile = ['sam_overlord_bluraysource.mkv']
|
||||
#droppedFile = ['test_source.mkv']
|
||||
|
||||
#get path of script location and remove the tail
|
||||
head_tail = os.path.split(sys.argv[0])
|
||||
output_path = head_tail[0]
|
||||
del sys.argv[0]
|
||||
|
||||
#check if output folder exists, otherwise create it
|
||||
isExist = os.path.exists(output_path+output_folder_name)
|
||||
if not isExist:
|
||||
os.makedirs(output_path+output_folder_name)
|
||||
|
||||
number_of_ss=int(input("Number of ss: "))
|
||||
print(number_of_ss)
|
||||
|
||||
@@ -34,7 +41,8 @@ for i, file in enumerate(sys.argv):
|
||||
skip = ((duration_percent * 90) - (duration_percent* 15)) / (number_of_ss -1)
|
||||
for i in range(0, number_of_ss):
|
||||
|
||||
args = 'ffmpeg.exe -ss {time} -i "{file}" -frames:v 1 -q:v 1 "{file}{i}.jpg"'.format(time=skip*i+time, file=file, i=i)
|
||||
basename = os.path.basename(file)
|
||||
args = 'ffmpeg.exe -ss {time} -i "{file}" -frames:v 1 -q:v 1 "{output_path}{output_folder_name}{basename}{i}.jpg"'.format(time=skip*i+time, file=file, output_path=output_path, output_folder_name=output_folder_name, basename=basename, i=i)
|
||||
print(args)
|
||||
run = subprocess.Popen(args)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user