cont refract
This commit is contained in:
@@ -4,7 +4,7 @@ import random
|
|||||||
import os
|
import os
|
||||||
import pathlib
|
import pathlib
|
||||||
import moviepy.editor
|
import moviepy.editor
|
||||||
import moviepy.video.io.ffmpeg_tools
|
import moviepy
|
||||||
import pymediainfo
|
import pymediainfo
|
||||||
|
|
||||||
|
|
||||||
@@ -18,6 +18,7 @@ class Args:
|
|||||||
help="number of screenshots, default 10", type=int)
|
help="number of screenshots, default 10", type=int)
|
||||||
parser.add_argument('-i', action='store', dest='input', help="input file", required=True)
|
parser.add_argument('-i', action='store', dest='input', help="input file", required=True)
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
# args.input = "D:/ReLive/Escape from Tarkov/2021.02.18-22.15.mp4"
|
||||||
|
|
||||||
|
|
||||||
def sample(fold, exname, max_time):
|
def sample(fold, exname, max_time):
|
||||||
@@ -28,9 +29,9 @@ def sample(fold, exname, max_time):
|
|||||||
print("sample")
|
print("sample")
|
||||||
sam = fold + "/sample" + exname
|
sam = fold + "/sample" + exname
|
||||||
if max_time <= 360:
|
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:
|
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):
|
def info(mfile, media_info):
|
||||||
|
|||||||
Reference in New Issue
Block a user