This commit is contained in:
Elghinnarisa
2022-09-09 20:18:34 +02:00
parent 19ad920d93
commit d4d12e2d41
12 changed files with 54 additions and 30 deletions

View File

@@ -12,9 +12,12 @@ skipto = " -ss "
#droppedFile = "test.mkv"
del sys.argv[0]
for i, each in enumerate(sys.argv):
#skip first part of sys.argv since it points to script location
arguments = sys.argv[1:]
for i, each in enumerate(arguments):
arg_list = 'ffprobe.exe -i "{each}"'.format(each=each)
@@ -36,7 +39,7 @@ x = (int(x) for x in input ("Enter tracks to keep: ").split())
track = "".join(" -map 0:a:{}".format(y) for y in x)
for each in sys.argv:
for each in arguments:
path = each
basename = os.path.basename(path)

View File

@@ -16,7 +16,10 @@ print(droppedName)
#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]
#skip first part of sys.argv since it points to script location
arguments = sys.argv[1:]
#check if output folder exists, otherwise create it
isExist = os.path.exists(output_path+output_folder_name)
@@ -24,7 +27,7 @@ if not isExist:
os.makedirs(output_path+output_folder_name)
for file in sys.argv:
for file in arguments:
basename = os.path.basename(file)
print(file)

View File

@@ -15,7 +15,10 @@ print(droppedName)
#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]
#skip first part of sys.argv since it points to script location
arguments = sys.argv[1:]
#check if output folder exists, otherwise create it
isExist = os.path.exists(output_path+output_folder_name)
@@ -23,7 +26,7 @@ if not isExist:
os.makedirs(output_path+output_folder_name)
for file in sys.argv:
for file in arguments:
basename = os.path.basename(file)
print(file)

View File

@@ -10,9 +10,12 @@ skipto = " -ss "
#droppedFile = "test.mkv"
count = 0
del sys.argv[0]
for each in sys.argv:
#skip first part of sys.argv since it points to script location
arguments = sys.argv[1:]
for each in arguments:
i = 0
print(each)

View File

@@ -12,6 +12,9 @@ droppedName = Path(droppedFile).name
#get path of script location and remove the tail
head_tail = os.path.split(sys.argv[0])
output_path = head_tail[0]
#skip first part of sys.argv since it points to script location
arguments = sys.argv[1:]
#check if output folder exists, otherwise create it

View File

@@ -1,8 +0,0 @@
import subprocess, sys
import os
folder_path=os.getcwd()
p = subprocess.Popen(["powershell.exe", "dir"])
res=p.communicate()

View File

@@ -11,7 +11,10 @@ droppedName = Path(droppedFile).name
#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]
#skip first part of sys.argv since it points to script location
arguments = sys.argv[1:]
#check if output folder exists, otherwise create it
isExist = os.path.exists(output_path+output_folder_name)
@@ -28,7 +31,7 @@ lines = "-map 0:v -c:v libx265 -preset slow -crf 20 -x265-params level=51:no-sao
number_of_segments=int(input("Number of segments: "))
segment_length=int(input("How long should each segment be(seconds)? "))
for i, file in enumerate(sys.argv):
for i, file in enumerate(arguments):
arg_list = 'ffprobe.exe -show_entries format=duration -i "{file}"'.format(file=file)
print(arg_list)

View File

@@ -10,7 +10,10 @@ droppedName = Path(droppedFile).name
#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]
#skip first part of sys.argv since it points to script location
arguments = sys.argv[1:]
#check if output folder exists, otherwise create it
isExist = os.path.exists(output_path+output_folder_name)
@@ -27,7 +30,7 @@ org_lineslines = " -map 0:v -c:v libx264 -crf 5 -map 0:a -c:a copy -map 0:s -c:s
number_of_segments=int(input("Number of segments: "))
segment_length=int(input("How long should each segment be(seconds)? "))
for i, file in enumerate(sys.argv):
for i, file in enumerate(arguments):
arg_list = 'ffprobe.exe -show_entries format=duration -i "{file}"'.format(file=file)
print(arg_list)

View File

@@ -12,7 +12,9 @@ droppedName = Path(droppedFile).name
#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]
#skip first part of sys.argv since it points to script location
arguments = sys.argv[1:]
#check if output folder exists, otherwise create it
isExist = os.path.exists(output_path+output_folder_name)
@@ -22,7 +24,7 @@ if not isExist:
number_of_ss=int(input("Number of ss: "))
print(number_of_ss)
for i, file in enumerate(sys.argv):
for i, file in enumerate(arguments):
arg_list = 'ffprobe.exe -show_entries format=duration -i "{file}"'.format(file=file)
print(arg_list)

View File

@@ -15,7 +15,10 @@ droppedName = Path(droppedFile).name
#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]
#skip first part of sys.argv since it points to script location
arguments = sys.argv[1:]
#check if output folder exists, otherwise create it
isExist = os.path.exists(output_path+output_folder_name)
@@ -28,7 +31,7 @@ if not isExist:
for i, file in enumerate(sys.argv):
for i, file in enumerate(arguments):
arg_list = 'ffprobe.exe -i "{file}"'.format(file=file)
cmd = subprocess.Popen(arg_list, stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding='UTF-8')

View File

@@ -15,7 +15,10 @@ droppedName = Path(droppedFile).name
#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]
#skip first part of sys.argv since it points to script location
arguments = sys.argv[1:]
#check if output folder exists, otherwise create it
isExist = os.path.exists(output_path+output_folder_name)
@@ -28,7 +31,7 @@ if not isExist:
for i, file in enumerate(sys.argv):
for i, file in enumerate(arguments):
arg_list = 'ffprobe.exe -i "{file}"'.format(file=file)
cmd = subprocess.Popen(arg_list, stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding='UTF-8')
@@ -51,7 +54,7 @@ audio_track = "".join(" -map 0:a:{}".format(y) for y in x)
z = (int(z) for z in input ("Enter subtitle tracks to keep: ").split())
subtitle_track = "".join(" -map 0:s:{}".format(y) for y in z)
for file in sys.argv:
for file in arguments:
basename = os.path.basename(file)

View File

@@ -12,9 +12,12 @@ skipto = " -ss "
#droppedFile = "test.mkv"
del sys.argv[0]
for i, each in enumerate(sys.argv):
#skip first part of sys.argv since it points to script location
arguments = sys.argv[1:]
for i, each in enumerate(arguments):
arg_list = 'ffprobe.exe -i "{each}"'.format(each=each)