unMcFucking

This commit is contained in:
Elghinnarisa
2022-09-09 19:50:39 +02:00
parent db2ff6ebfd
commit 19ad920d93
17 changed files with 459 additions and 39 deletions

View File

@@ -3,6 +3,7 @@ import sys
from pathlib import Path
import os
output_folder_name ="/bulk_convert_out/"
droppedFile = sys.argv[1]
droppedName = Path(droppedFile).name
@@ -12,27 +13,24 @@ duration = ""
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]
#vid:
#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)
for file in sys.argv:
i = 0
path = file
basename = os.path.basename(file)
print(file)
#arguments = ( "ffmpeg.exe ", " -i ", '"', each, '"',skipto, duration, " -map 0:v ", ",'"',"E:/Projects/python/ffmpeg_by_textfile/out_done/", basename, '"' )
args = 'ffmpeg.exe -i "{file}" -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 matroska "E:/Projects/python/ffmpeg_quality_testing/out/{basename}"'.format(file=file, basename=basename)
#arg_list = "".join(map(str, arguments))
args = 'ffmpeg.exe -i "{file}" -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 libopus -b:a 192k -map 0:s -c:s copy -f matroska "{output_path}{output_folder_name}{basename}"'.format(file=file, output_path=output_path, output_folder_name=output_folder_name, basename=basename)
print(args)
#print(each)
subprocess.run(args)
i += 1
k=input("press close to exit")