mirror of
https://github.com/linyqh/NarratoAI.git
synced 2025-12-15 06:19:13 +00:00
refactor(app): 优化视频合并服务
- 移除了未使用的日志设置代码 - 替换 logging 为 loguru 库以简化日志记录 - 删除了多余的类型导入 - 移除了处理视频时不必要的日志信息
This commit is contained in:
parent
2914cd924d
commit
c2711b97c7
@ -9,14 +9,11 @@
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import subprocess
|
|
||||||
import logging
|
|
||||||
from enum import Enum
|
|
||||||
from typing import List, Optional, Tuple, Dict, Any
|
|
||||||
import shutil
|
import shutil
|
||||||
|
import subprocess
|
||||||
# 设置日志
|
from enum import Enum
|
||||||
logger = logging.getLogger(__name__)
|
from typing import List, Optional, Tuple
|
||||||
|
from loguru import logger
|
||||||
|
|
||||||
|
|
||||||
class VideoAspect(Enum):
|
class VideoAspect(Enum):
|
||||||
@ -221,7 +218,6 @@ def process_single_video(
|
|||||||
|
|
||||||
# 执行命令
|
# 执行命令
|
||||||
try:
|
try:
|
||||||
logger.info(f"处理视频 {input_path} -> {output_path}")
|
|
||||||
subprocess.run(command, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
subprocess.run(command, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
return output_path
|
return output_path
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user