[修复] 运动片段分割 ffmpeg 调用缺可执行文件 - args 首元素补 ffmpeg 路径(此前被当成可执行文件导致全部分割失败)
This commit is contained in:
@@ -246,9 +246,9 @@ class VideoProcessor:
|
||||
vmeta = None
|
||||
|
||||
vrow = self.db.get_video_by_filename(filename)
|
||||
is_motion_clip = bool(vrow and vrow.get('motion_event_id'))
|
||||
camera_name = (vrow or {}).get('camera_name') or ''
|
||||
event_start = (vrow or {}).get('event_start_time') or ''
|
||||
is_motion_clip = bool(vrow and vrow['motion_event_id'])
|
||||
camera_name = vrow['camera_name'] if vrow else ''
|
||||
event_start = vrow['event_start_time'] if vrow else ''
|
||||
if not event_start and self.parse_start:
|
||||
event_start = _parse_event_start_from_filename(filename)
|
||||
if event_start:
|
||||
@@ -380,7 +380,7 @@ class VideoProcessor:
|
||||
音频按配置保留(pcm_alaw -> aac 转码)或丢弃(-an)。"""
|
||||
import shutil
|
||||
ffmpeg = shutil.which('ffmpeg') or 'ffmpeg'
|
||||
args = ['-y', '-hide_banner', '-loglevel', 'error',
|
||||
args = [ffmpeg, '-y', '-hide_banner', '-loglevel', 'error',
|
||||
'-ss', f'{offset:.3f}', '-i', src_path, '-t', f'{dur:.3f}',
|
||||
'-c:v', 'copy']
|
||||
if self.motion_keep_audio:
|
||||
|
||||
Reference in New Issue
Block a user