unMcFucking
This commit is contained in:
@@ -3,18 +3,26 @@ import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
import os
|
||||
|
||||
output_folder_name = "/quality_test_out/"
|
||||
droppedFile = sys.argv[1]
|
||||
droppedName = Path(droppedFile).name
|
||||
|
||||
skipto = " -ss "
|
||||
|
||||
#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)
|
||||
|
||||
#droppedFile = ["sam_overlord_bluraysource.mkv"]
|
||||
|
||||
lines = "-map 0:v -c:v libx265 -preset slow -crf 21 -x265-params level=51:no-sao:bframes=8:psy-rd=1.5:psy-rdoq=5:aq-mode=3:ref=6 -pix_fmt yuv420p10le -map 0:a -c:a copy -map 0:s -c:s copy"
|
||||
#org_lineslines = " -map 0:v -c:v libx264 -crf 0 -map 0:a -c:a copy -map 0:s -c:s copy"
|
||||
#-map 0:v -c:v libx265 -preset slow -crf 21 -x265-params level=51:no-sao:bframes=8:psy-rd=1.5:psy-rdoq=5:aq-mode=3:ref=6 -pix_fmt yuv420p10le -map 0:a -c:a copy -map 0:s -c:s copy -f
|
||||
del sys.argv[0]
|
||||
lines = "-map 0:v -c:v libx265 -preset slow -crf 20 -x265-params level=51:no-sao=1:bframes=8:psy-rd=1.5:psy-rdoq=5:aq-mode=3:ref=6 -pix_fmt yuv420p10le -map 0:a -c:a copy -map 0:s -c:s copy"
|
||||
#org_lineslines = " -map 0:v -c:v libx264 -crf 5 -map 0:a -c:a copy -map 0:s -c:s copy"
|
||||
|
||||
|
||||
|
||||
number_of_segments=int(input("Number of segments: "))
|
||||
@@ -42,8 +50,8 @@ for i, file in enumerate(sys.argv):
|
||||
|
||||
|
||||
for i in range(0, number_of_segments):
|
||||
|
||||
args = 'ffmpeg.exe -i "{file}" -ss {time} -t {segment_length} {lines} -f matroska "{file}{i}out.mkv"'.format(time=skip*i+time, segment_length=segment_length, file=file, lines=lines, i=i)
|
||||
basename = os.path.basename(file)
|
||||
args = 'ffmpeg.exe -i "{file}" -ss {time} -t {segment_length} {lines} -f matroska "{output_path}{output_folder_name}compare_{i}{basename}"'.format(time=skip*i+time, segment_length=segment_length, file=file, output_path=output_path, output_folder_name=output_folder_name, basename=basename, lines=lines, i=i)
|
||||
#args = 'ffmpeg.exe -i "{file}" -ss {time} -t {segment_length} {org_lineslines} -f matroska "{file}{i}ORIGINAL_COMP.mkv"'.format(time=skip*i+time, segment_length=segment_length, file=file, org_lineslines=org_lineslines, i=i)
|
||||
print(args)
|
||||
run = subprocess.Popen(args)
|
||||
|
||||
Reference in New Issue
Block a user