compress update 02

This commit is contained in:
13339479676 2022-01-26 08:27:35 +08:00
parent 371b89c04b
commit 030621b170
1 changed files with 5 additions and 4 deletions

View File

@ -15,10 +15,6 @@ from utils.ows_path import increment_path
ROOT_PATH = sys.path[0] # 项目根目录
COMPRESS_SUFFIX = ['zip', 'tar'] # 压缩文件格式
# 帧保存路径管理
COMPRESS_PATH = increment_path(
Path(f"./CompressFrames") / "compress", exist_ok=False) # 增量运行
COMPRESS_PATH.mkdir(parents=True, exist_ok=True) # 创建目录
# 判断压缩文件格式
@ -30,6 +26,11 @@ def is_compressFile(compressStyle):
# webcam压缩
def webcam_compress(compressStyle, is_autoCompressName, compressName, preCompressFilePath, compressMode):
# 帧压缩文件保存路径管理
COMPRESS_PATH = increment_path(
Path(f"./CompressFrames") / "compress", exist_ok=False) # 增量运行
COMPRESS_PATH.mkdir(parents=True, exist_ok=True) # 创建目录
if (is_autoCompressName):
# 自动命名
compressNameTmp = str(preCompressFilePath).split('/')[-1] # 获取帧目录名称