cont refract

This commit is contained in:
2022-02-14 23:07:30 +03:00
parent f551db96c3
commit 57dccf2739

View File

@@ -4,7 +4,7 @@ import random
import os
import pathlib
import moviepy.editor
import moviepy.video.io.ffmpeg_tools
import moviepy
import pymediainfo
@@ -18,6 +18,7 @@ class Args:
help="number of screenshots, default 10", type=int)
parser.add_argument('-i', action='store', dest='input', help="input file", required=True)
args = parser.parse_args()
# args.input = "D:/ReLive/Escape from Tarkov/2021.02.18-22.15.mp4"
def sample(fold, exname, max_time):
@@ -28,9 +29,9 @@ def sample(fold, exname, max_time):
print("sample")
sam = fold + "/sample" + exname
if max_time <= 360:
ffmpeg_tools.ffmpeg_extract_subclip(Args.args.input, max_time / 3, max_time * 2 / 3, targetname=sam)
moviepy.video.io.ffmpeg_tools.ffmpeg_extract_subclip(Args.args.input, max_time / 3, max_time * 2 / 3, targetname=sam)
else:
ffmpeg_tools.ffmpeg_extract_subclip(Args.args.input, max_time / 2 - 60, max_time / 2 + 60, targetname=sam)
moviepy.video.io.ffmpeg_tools.ffmpeg_extract_subclip(Args.args.input, max_time / 2 - 60, max_time / 2 + 60, targetname=sam)
def info(mfile, media_info):