1.2 MiB
1.2 MiB
In [1]:
import os
from pathlib import Path
import numpy as np
import json
np.set_printoptions(precision=2, suppress=True)
from pathlib import Path
import numpy as np
# Importing packages
import matplotlib.pyplot as plt
%matplotlib inline
from jupyterthemes import jtplot
jtplot.style(grid=False)
pose_select = [0, 2, 5, 3, 6, 4, 7]
pose_weight = [1, 1, 1, 5, 5, 10, 10]
# filter by windows
def filter_peaks(x, input_peaks, nwind= 1*50):
peaks = input_peaks.copy()
peaks_filter = []
i = 1
prev_idx = peaks[0]
while i < len(peaks):
cur_idx = peaks[i]
# filter peak
while cur_idx - prev_idx <= nwind and i < len(peaks):
# compare ssim
if x[cur_idx] > x[prev_idx]:
prev_idx = cur_idx
# next
i += 1
if i < len(peaks):
cur_idx = peaks[i]
else:
break
# update
i += 1
# add to
peaks_filter.append(prev_idx)
prev_idx = cur_idx
# last value
if cur_idx - peaks_filter[-1] > nwind:
peaks_filter.append(prev_idx)
# peaks_filter.append(prev_idx)
return peaks_filter
def get_landmarks(idx, path_ldmks):
# get lmd_distance
path_json = path_ldmks.joinpath(f"frame-{idx:06d}_keypoints.json")
dict_json = json.loads(open(str(path_json), 'r').read())['people']
data_ldmk_pose = np.array(dict_json[0]["pose_keypoints"]).reshape(-1, 3)
# data_ldmk_face = np.array(dict_json[0]["face_keypoints"]).reshape(-1, 3)
# select & concate pose
data_ldmk_pose = data_ldmk_pose[pose_select, :2] # COCO-18 body pose
# data_ldmk_pose = data_ldmk_pose[:, :2] # 18 body pose
# data_ldmk_face = data_ldmk_face[:17, :2] # 70 landmarks pose
# data_ldmk = np.concatenate([data_ldmk_pose, data_ldmk_face], axis=0) # (88, 2)
# print(data_ldmk.shape)
data_ldmk = data_ldmk_pose
return data_ldmk In [2]:
fname = "4R3A0211" # bad data
path_root = Path("/mfs/lsen/DATA/Actor6/bg/processing2_0810")
path_video = path_root.joinpath(fname, "video")
path_ldmks = path_root.joinpath(fname, "openpose")
path_video.mkdir(parents=True, exist_ok=True)
path_frame = path_root.joinpath(fname, "frames")In [3]:
vpath_ldmks = sorted(path_ldmks.glob("frame-*_keypoints.json"), reverse=False)
# load pose
total_ldmks = []
for idx, ipath_ldmk in enumerate(vpath_ldmks):
if idx % 500 ==0: print(f"\t processing... {idx:05d}-th json ")
idata_peak = get_landmarks(idx, path_ldmks)
total_ldmks.append(idata_peak)
# print(idata_peak.shape)
total_ldmks = np.stack(total_ldmks, axis=0)
path_save_total = path_video.joinpath("openpose_total.npy")
np.save(path_save_total, total_ldmks) # (nseqs, N, 2)
print(total_ldmks.shape)processing... 00000-th json processing... 00500-th json processing... 01000-th json processing... 01500-th json processing... 02000-th json processing... 02500-th json processing... 03000-th json processing... 03500-th json processing... 04000-th json processing... 04500-th json processing... 05000-th json processing... 05500-th json processing... 06000-th json processing... 06500-th json processing... 07000-th json processing... 07500-th json processing... 08000-th json processing... 08500-th json processing... 09000-th json processing... 09500-th json processing... 10000-th json processing... 10500-th json processing... 11000-th json processing... 11500-th json processing... 12000-th json processing... 12500-th json processing... 13000-th json processing... 13500-th json processing... 14000-th json processing... 14500-th json processing... 15000-th json processing... 15500-th json processing... 16000-th json processing... 16500-th json processing... 17000-th json processing... 17500-th json processing... 18000-th json (18343, 7, 2)
In [4]:
# 平滑 插帧
from scipy.signal import savgol_filter
total_ldmks2 = savgol_filter(total_ldmks, window_length=5, polyorder=3, axis=0, mode='nearest')
path_save_total = path_video.joinpath("openpose_total_smooth.npy")
np.save(path_save_total, total_ldmks2) # (nseqs, N, 2)
print(total_ldmks2.shape)(18343, 7, 2)
In [5]:
# get velocity
# velocity = total_ldmks[1:] - total_ldmks[:-1] # (8321, 7, 2)
velocity = total_ldmks2[1:] - total_ldmks2[:-1] # (8321, 7, 2)
print(velocity.shape)
distance = np.sqrt(velocity[..., 0]**2 + velocity[..., 1]**2 ) # (8321, 7)
print(distance.shape)
pose_weight = [1, 1, 1, 5, 5, 10, 10]
weight_norm = np.array([pose_weight]) / np.sum(pose_weight) # (1, 7)
print(weight_norm.shape)
distance = distance * weight_norm # (8321, 7)
distance = np.mean(distance, axis=1) # (N) -> 1
print(distance.shape)(18342, 7, 2) (18342, 7) (1, 7) (18342,)
In [6]:
x = - distance[:10000]
height = -10
# Plot a simple line chart without any feature
plt.figure(figsize=(30,10))
plt.plot(range(x.shape[0]), x)
plt.plot(range(x.shape[0]), np.full(x.shape, height))
plt.ylim(-2, 0.1)
plt.show()In [7]:
# 获取一些候选Reference帧
# (1)windows窗内的 max velocity < 0.1
nwindow = int(0.1 * 50) # 0.5s
max_threold = 0.1
candidate_reference = set()
for i in range(nwindow//2, len(distance)-nwindow//2):
if max(distance[i-nwindow//2 : i+nwindow//2]) < max_threold:
_ = [candidate_reference.add(i) for i in range(i-nwindow//2, i+nwindow//2) ]
candidate_reference = sorted(list(candidate_reference))
print(f"size = {len(candidate_reference)}, ratio = {100*len(candidate_reference) / len(distance)} % ")
print(candidate_reference[:100])
print(distance[candidate_reference[:100]])
size = 2877, ratio = 15.685312397775597 % [8, 9, 10, 11, 101, 102, 103, 104, 105, 106, 119, 120, 121, 122, 123, 140, 141, 142, 143, 144, 145, 204, 205, 206, 207, 209, 210, 211, 212, 213, 311, 312, 313, 314, 315, 316, 317, 319, 320, 321, 322, 395, 396, 397, 398, 405, 406, 407, 408, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 512, 513, 514, 515, 516, 517, 518, 519, 551, 552, 553, 554, 621, 622, 623, 624, 625, 626, 627, 628, 652, 653, 654, 655, 656, 657, 658, 659, 660, 667, 668, 669, 670, 671, 700, 701, 702, 703, 715] [0.04 0.05 0.07 0.09 0.08 0.06 0.06 0.04 0.03 0.05 0.05 0.04 0.04 0.02 0.08 0.05 0.03 0.05 0.02 0.03 0.08 0.08 0.02 0.02 0.05 0.09 0.04 0.05 0.07 0.09 0.1 0.07 0.06 0.06 0.02 0.02 0.08 0.08 0.02 0.01 0.04 0.06 0.03 0.1 0.04 0.04 0.1 0.02 0.03 0.05 0.06 0.09 0.09 0.02 0.06 0.04 0.01 0. 0.01 0.04 0.07 0.05 0.04 0.02 0.05 0.03 0.09 0.02 0.1 0.05 0.01 0.03 0.09 0.06 0.06 0.07 0.06 0.04 0.01 0. 0.05 0.08 0.02 0. 0. 0. 0.02 0.09 0.01 0.05 0.07 0.02 0.03 0.02 0.1 0.02 0. 0.02 0.08 0.07]
In [18]:
# 根据候选帧 去计算一个平均的帧
# # ROUND-1: 根据Velocity初步计算一个候选Reference帧
# # (缺点:候选帧没有与Reference帧的相似距离信息)
# candidate_ldmks = total_ldmks[candidate_reference] # (nseqs, 7, 2)
# ROUND-2: 根据 candidate_reference_update2 重新计算一次 Reference 帧
# (迭代一次可以更加精确的优化Mean值)
candidate_ldmks = total_ldmks[candidate_reference_update2] # (nseqs, 7, 2)
mean_ldmks = np.mean(candidate_ldmks, axis=0) # (7, 2)
print(mean_ldmks.shape)
path_save_mean_ldmks = path_video.joinpath("mean_ldmks.npy")
np.save(path_save_mean_ldmks, mean_ldmks) # (7, 2)(7, 2)
In [19]:
# 根据这个平均值去计算,每一帧与其的相似度 (用 cos similarity)
# cacluate LMD-smilirity
total_LMD = []
vpath_ldmks = sorted(path_ldmks.glob("frame-*_keypoints.json"), reverse=False)
for k in range(len(vpath_ldmks)):
if k % 500 ==0: print(f"\t processing... {k:05d}-th json ")
kdata_ldmk = get_landmarks(k, path_ldmks)
# calculate LMD
idiff = (kdata_ldmk - mean_ldmks) * (kdata_ldmk - mean_ldmks) # (N, 2)
idiff = np.sqrt( idiff[:, 0] + idiff[:, 1]) * np.array(pose_weight) # (N, )
idistance = idiff.sum() / np.sum(pose_weight) # (N) -> 1
total_LMD.append(idistance)
# print(idistance)
# save
total_LMD = np.array(total_LMD)
path_save = path_video.joinpath(f"lmd_ref_mean.npy")
np.save(path_save, np.array(total_LMD))
print(f"total_LMD shape = {total_LMD.shape}, save to > {path_save}")
processing... 00000-th json processing... 00500-th json processing... 01000-th json processing... 01500-th json processing... 02000-th json processing... 02500-th json processing... 03000-th json processing... 03500-th json processing... 04000-th json processing... 04500-th json processing... 05000-th json processing... 05500-th json processing... 06000-th json processing... 06500-th json processing... 07000-th json processing... 07500-th json processing... 08000-th json processing... 08500-th json processing... 09000-th json processing... 09500-th json processing... 10000-th json processing... 10500-th json processing... 11000-th json processing... 11500-th json processing... 12000-th json processing... 12500-th json processing... 13000-th json processing... 13500-th json processing... 14000-th json processing... 14500-th json processing... 15000-th json processing... 15500-th json processing... 16000-th json processing... 16500-th json processing... 17000-th json processing... 17500-th json processing... 18000-th json total_LMD shape = (18343,), save to > /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/lmd_ref_mean.npy
In [22]:
x = - total_LMD[::20]
height = -10
# Plot a simple line chart without any feature
plt.figure(figsize=(30,10))
plt.plot(range(x.shape[0]), x)
plt.plot(range(x.shape[0]), np.full(x.shape, height))
plt.ylim(-400, 1)
plt.show()In [21]:
x = - total_LMD[:10000]
height = -50
peaks = np.array(candidate_reference)
peaks = peaks[peaks < 10000]
# Plot a simple line chart without any feature
plt.figure(figsize=(30,10))
plt.plot(range(x.shape[0]), x)
plt.plot(range(x.shape[0]), np.full(x.shape, height))
plt.plot(peaks, x[peaks], "o", color="r", label="peaks")
plt.ylim(-400, 1)
plt.xticks(peaks,rotation=90)
plt.show()In [23]:
# candidate_reference_update
# ===> 相似度要大于一定的值
min_ldm_threa = 50
candidate_reference_update = []
for icand in candidate_reference:
if total_LMD[icand] < min_ldm_threa:
candidate_reference_update.append(icand)
print("candidate_reference_update size = ", len(candidate_reference_update))candidate_reference_update size = 1641
In [24]:
x = - total_LMD[:10000]
height = -50
peaks = np.array(candidate_reference_update)
peaks = peaks[peaks < 10000]
# Plot a simple line chart without any feature
plt.figure(figsize=(30,10))
plt.plot(range(x.shape[0]), x)
plt.plot(range(x.shape[0]), np.full(x.shape, height))
plt.ylim(-200, 1)
plt.plot(peaks, x[peaks], "o", color="r", label="peaks")
plt.xticks(peaks,rotation=90)
plt.show()In [25]:
# 找一些最佳的点 (连续不动的地方)
# (1)连续不动 velocity < 阈值1
candidate_reference_update2 = []
nwind_local = 0.5 * 50
i = 0
while i < len(candidate_reference_update)-1:
idx_frame_curr = candidate_reference_update[i]
idx_frame_next = candidate_reference_update[i+1]
min_idx, min_lmd = idx_frame_curr, total_LMD[idx_frame_curr]
print(f"cur = {idx_frame_curr}")
# 若在
flag = False
while i < len(candidate_reference_update) -2 and idx_frame_next - idx_frame_curr < nwind_local: # 连续index
idx_frame_curr = candidate_reference_update[i]
idx_frame_next = candidate_reference_update[i+1]
if total_LMD[idx_frame_curr] < min_lmd:
min_idx, min_lmd = idx_frame_curr, total_LMD[idx_frame_curr]
print(f"while cur = {idx_frame_curr}")
i += 1
flag = True
print(f"\t add update point = {min_idx}")
candidate_reference_update2.append(min_idx)
if not flag: i += 1
print("candidate_reference_update2 size = ", len(candidate_reference_update2))
cur = 8 while cur = 8 while cur = 9 while cur = 10 while cur = 11 add update point = 9 cur = 204 while cur = 204 while cur = 205 while cur = 206 while cur = 207 while cur = 209 while cur = 210 while cur = 211 while cur = 212 while cur = 213 add update point = 205 cur = 395 while cur = 395 while cur = 396 while cur = 397 while cur = 398 while cur = 405 while cur = 406 while cur = 407 while cur = 408 while cur = 423 while cur = 424 while cur = 425 while cur = 426 while cur = 427 while cur = 428 while cur = 429 while cur = 430 while cur = 431 while cur = 432 while cur = 433 while cur = 434 add update point = 407 cur = 621 while cur = 621 while cur = 622 while cur = 623 while cur = 624 while cur = 625 while cur = 626 while cur = 627 while cur = 628 while cur = 652 while cur = 653 while cur = 654 while cur = 655 while cur = 656 while cur = 657 while cur = 658 while cur = 659 while cur = 660 while cur = 667 while cur = 668 while cur = 669 while cur = 670 while cur = 671 add update point = 669 cur = 700 while cur = 700 while cur = 701 while cur = 702 while cur = 703 while cur = 715 while cur = 716 while cur = 717 while cur = 718 while cur = 719 while cur = 726 while cur = 727 while cur = 728 while cur = 729 while cur = 730 while cur = 731 while cur = 732 while cur = 733 while cur = 734 while cur = 735 while cur = 741 while cur = 742 while cur = 743 while cur = 744 while cur = 745 while cur = 746 while cur = 747 while cur = 748 while cur = 750 while cur = 751 while cur = 752 while cur = 753 while cur = 754 while cur = 755 add update point = 703 cur = 913 while cur = 913 while cur = 914 while cur = 915 while cur = 916 while cur = 917 while cur = 918 add update point = 913 cur = 1019 while cur = 1019 while cur = 1020 while cur = 1021 while cur = 1022 while cur = 1023 while cur = 1024 while cur = 1025 while cur = 1026 while cur = 1027 add update point = 1027 cur = 1070 while cur = 1070 while cur = 1071 while cur = 1072 while cur = 1073 while cur = 1074 while cur = 1075 while cur = 1076 while cur = 1077 while cur = 1078 while cur = 1079 while cur = 1080 while cur = 1081 while cur = 1082 while cur = 1083 while cur = 1084 while cur = 1086 while cur = 1087 while cur = 1088 while cur = 1089 while cur = 1090 while cur = 1091 while cur = 1100 while cur = 1101 while cur = 1102 while cur = 1103 while cur = 1104 while cur = 1105 while cur = 1109 while cur = 1110 while cur = 1111 while cur = 1112 while cur = 1113 while cur = 1114 while cur = 1128 while cur = 1129 while cur = 1130 while cur = 1131 while cur = 1132 while cur = 1133 while cur = 1134 while cur = 1135 while cur = 1136 while cur = 1137 while cur = 1145 while cur = 1146 while cur = 1147 while cur = 1148 while cur = 1149 while cur = 1150 while cur = 1151 while cur = 1152 while cur = 1153 while cur = 1154 while cur = 1155 while cur = 1156 while cur = 1157 while cur = 1158 while cur = 1160 while cur = 1161 while cur = 1162 while cur = 1163 while cur = 1164 while cur = 1165 while cur = 1166 while cur = 1167 while cur = 1168 while cur = 1169 while cur = 1170 while cur = 1171 while cur = 1172 while cur = 1173 while cur = 1174 while cur = 1175 while cur = 1176 while cur = 1184 while cur = 1185 while cur = 1186 while cur = 1187 while cur = 1188 while cur = 1198 while cur = 1199 while cur = 1200 while cur = 1201 while cur = 1202 add update point = 1200 cur = 1340 while cur = 1340 while cur = 1341 while cur = 1342 while cur = 1343 while cur = 1362 while cur = 1363 while cur = 1364 while cur = 1365 add update point = 1342 cur = 1567 while cur = 1567 while cur = 1568 while cur = 1569 while cur = 1570 while cur = 1571 while cur = 1572 while cur = 1573 while cur = 1574 while cur = 1575 while cur = 1576 while cur = 1577 while cur = 1578 while cur = 1579 while cur = 1580 while cur = 1581 while cur = 1582 while cur = 1583 while cur = 1584 while cur = 1585 while cur = 1586 while cur = 1587 while cur = 1588 add update point = 1577 cur = 2133 while cur = 2133 while cur = 2134 while cur = 2135 while cur = 2136 while cur = 2137 while cur = 2150 while cur = 2151 while cur = 2152 while cur = 2153 while cur = 2154 while cur = 2155 while cur = 2156 add update point = 2135 cur = 2334 while cur = 2334 while cur = 2335 while cur = 2336 while cur = 2337 while cur = 2338 while cur = 2347 while cur = 2348 while cur = 2349 while cur = 2350 while cur = 2351 add update point = 2348 cur = 2391 while cur = 2391 while cur = 2392 while cur = 2393 while cur = 2394 while cur = 2395 while cur = 2396 while cur = 2397 while cur = 2398 while cur = 2399 while cur = 2400 while cur = 2401 while cur = 2402 while cur = 2403 while cur = 2405 while cur = 2406 while cur = 2407 while cur = 2408 while cur = 2409 while cur = 2415 while cur = 2416 while cur = 2417 while cur = 2418 while cur = 2419 add update point = 2403 cur = 2617 while cur = 2617 while cur = 2618 while cur = 2619 while cur = 2620 while cur = 2635 while cur = 2636 while cur = 2637 while cur = 2638 while cur = 2639 while cur = 2640 while cur = 2645 while cur = 2646 while cur = 2647 while cur = 2648 while cur = 2649 add update point = 2646 cur = 2862 while cur = 2862 while cur = 2863 while cur = 2864 while cur = 2865 while cur = 2866 while cur = 2867 while cur = 2868 while cur = 2886 while cur = 2887 while cur = 2888 while cur = 2889 add update point = 2864 cur = 3099 while cur = 3099 while cur = 3100 while cur = 3101 while cur = 3102 while cur = 3103 while cur = 3104 while cur = 3128 while cur = 3129 while cur = 3130 while cur = 3131 while cur = 3132 while cur = 3133 add update point = 3133 cur = 3358 while cur = 3358 while cur = 3359 while cur = 3360 while cur = 3361 while cur = 3370 while cur = 3371 while cur = 3372 while cur = 3373 while cur = 3392 while cur = 3393 while cur = 3394 while cur = 3395 while cur = 3396 while cur = 3397 while cur = 3398 while cur = 3399 while cur = 3400 add update point = 3358 cur = 3591 while cur = 3591 while cur = 3592 while cur = 3593 while cur = 3594 while cur = 3595 add update point = 3595 cur = 3626 while cur = 3626 while cur = 3627 while cur = 3628 while cur = 3629 while cur = 3630 while cur = 3631 while cur = 3632 while cur = 3633 while cur = 3634 while cur = 3635 while cur = 3636 while cur = 3637 while cur = 3638 while cur = 3646 while cur = 3647 while cur = 3648 while cur = 3649 while cur = 3650 while cur = 3651 while cur = 3652 while cur = 3653 while cur = 3654 while cur = 3656 while cur = 3657 while cur = 3658 while cur = 3659 while cur = 3660 while cur = 3661 while cur = 3662 while cur = 3663 while cur = 3670 while cur = 3671 while cur = 3672 while cur = 3673 while cur = 3674 while cur = 3675 while cur = 3676 while cur = 3677 while cur = 3678 while cur = 3679 while cur = 3680 while cur = 3681 while cur = 3682 while cur = 3684 while cur = 3685 while cur = 3686 while cur = 3687 while cur = 3688 while cur = 3689 while cur = 3690 while cur = 3691 while cur = 3692 while cur = 3693 while cur = 3694 while cur = 3695 while cur = 3696 while cur = 3697 while cur = 3698 while cur = 3699 while cur = 3700 while cur = 3701 while cur = 3702 while cur = 3703 while cur = 3704 while cur = 3705 while cur = 3706 while cur = 3707 add update point = 3682 cur = 3735 while cur = 3735 while cur = 3736 while cur = 3737 while cur = 3738 while cur = 3746 while cur = 3747 while cur = 3748 while cur = 3749 while cur = 3750 while cur = 3751 while cur = 3762 while cur = 3763 while cur = 3764 while cur = 3765 while cur = 3766 while cur = 3789 while cur = 3790 while cur = 3791 while cur = 3792 while cur = 3799 while cur = 3800 while cur = 3801 while cur = 3802 add update point = 3735 cur = 3976 while cur = 3976 while cur = 3977 while cur = 3978 while cur = 3979 while cur = 3994 while cur = 3995 while cur = 3996 while cur = 3997 while cur = 4007 while cur = 4008 while cur = 4009 while cur = 4010 while cur = 4011 while cur = 4012 while cur = 4013 while cur = 4014 while cur = 4015 while cur = 4016 while cur = 4017 while cur = 4018 while cur = 4019 while cur = 4020 add update point = 3994 cur = 4210 while cur = 4210 while cur = 4211 while cur = 4212 while cur = 4213 while cur = 4233 while cur = 4234 while cur = 4235 while cur = 4236 while cur = 4237 while cur = 4244 while cur = 4245 while cur = 4246 while cur = 4247 add update point = 4212 cur = 4431 while cur = 4431 while cur = 4432 while cur = 4433 while cur = 4434 while cur = 4435 while cur = 4436 while cur = 4437 while cur = 4440 while cur = 4441 while cur = 4442 while cur = 4443 while cur = 4452 while cur = 4453 while cur = 4454 while cur = 4455 while cur = 4456 while cur = 4457 while cur = 4458 while cur = 4459 while cur = 4460 while cur = 4461 while cur = 4462 while cur = 4463 while cur = 4464 while cur = 4465 while cur = 4466 while cur = 4488 while cur = 4489 while cur = 4490 while cur = 4491 add update point = 4466 cur = 4664 while cur = 4664 while cur = 4665 while cur = 4666 while cur = 4667 add update point = 4664 cur = 4835 while cur = 4835 while cur = 4836 while cur = 4837 while cur = 4838 while cur = 4839 while cur = 4848 while cur = 4849 while cur = 4850 while cur = 4851 while cur = 4852 while cur = 4853 while cur = 4854 while cur = 4855 while cur = 4863 while cur = 4864 while cur = 4865 while cur = 4866 while cur = 4867 while cur = 4868 while cur = 4869 while cur = 4870 add update point = 4854 cur = 5065 while cur = 5065 while cur = 5066 while cur = 5067 while cur = 5068 while cur = 5069 while cur = 5071 while cur = 5072 while cur = 5073 while cur = 5074 while cur = 5075 while cur = 5076 while cur = 5077 while cur = 5078 while cur = 5079 while cur = 5080 while cur = 5081 while cur = 5082 while cur = 5083 while cur = 5084 while cur = 5085 while cur = 5086 while cur = 5088 while cur = 5089 while cur = 5090 while cur = 5091 while cur = 5092 while cur = 5093 while cur = 5094 while cur = 5095 while cur = 5096 while cur = 5098 while cur = 5099 while cur = 5100 while cur = 5101 while cur = 5102 while cur = 5103 while cur = 5104 while cur = 5105 while cur = 5106 while cur = 5107 while cur = 5108 while cur = 5109 while cur = 5111 while cur = 5112 while cur = 5113 while cur = 5114 while cur = 5115 while cur = 5125 while cur = 5126 while cur = 5127 while cur = 5128 while cur = 5129 while cur = 5130 add update point = 5075 cur = 5310 while cur = 5310 while cur = 5311 while cur = 5312 while cur = 5313 while cur = 5314 while cur = 5315 while cur = 5316 while cur = 5317 while cur = 5318 while cur = 5319 while cur = 5321 while cur = 5322 while cur = 5323 while cur = 5324 while cur = 5325 while cur = 5330 while cur = 5331 while cur = 5332 while cur = 5333 while cur = 5334 while cur = 5347 while cur = 5348 while cur = 5349 while cur = 5350 while cur = 5351 while cur = 5352 while cur = 5353 while cur = 5354 while cur = 5355 while cur = 5356 while cur = 5357 while cur = 5358 while cur = 5359 while cur = 5360 while cur = 5361 while cur = 5363 while cur = 5364 while cur = 5365 while cur = 5366 while cur = 5370 while cur = 5371 while cur = 5372 while cur = 5373 while cur = 5374 while cur = 5375 while cur = 5376 while cur = 5377 while cur = 5378 while cur = 5379 while cur = 5381 while cur = 5382 while cur = 5383 while cur = 5384 while cur = 5385 while cur = 5386 while cur = 5388 while cur = 5389 while cur = 5390 while cur = 5391 while cur = 5392 add update point = 5366 cur = 5586 while cur = 5586 while cur = 5587 while cur = 5588 while cur = 5589 while cur = 5590 while cur = 5591 while cur = 5592 while cur = 5593 while cur = 5594 while cur = 5595 while cur = 5597 while cur = 5598 while cur = 5599 while cur = 5600 while cur = 5601 while cur = 5602 while cur = 5603 while cur = 5604 while cur = 5605 while cur = 5606 while cur = 5607 while cur = 5612 while cur = 5613 while cur = 5614 while cur = 5615 while cur = 5616 while cur = 5618 while cur = 5619 while cur = 5620 while cur = 5621 while cur = 5627 while cur = 5628 while cur = 5629 while cur = 5630 add update point = 5628 cur = 5830 while cur = 5830 while cur = 5831 while cur = 5832 while cur = 5833 while cur = 5841 while cur = 5842 while cur = 5843 while cur = 5844 while cur = 5845 while cur = 5846 while cur = 5847 while cur = 5848 while cur = 5849 while cur = 5850 while cur = 5851 while cur = 5852 while cur = 5865 while cur = 5866 while cur = 5867 while cur = 5868 while cur = 5878 while cur = 5879 while cur = 5880 while cur = 5881 while cur = 5882 while cur = 5883 add update point = 5850 cur = 6100 while cur = 6100 while cur = 6101 while cur = 6102 while cur = 6103 while cur = 6120 while cur = 6121 while cur = 6122 while cur = 6123 add update point = 6123 cur = 6305 while cur = 6305 while cur = 6306 while cur = 6307 while cur = 6308 while cur = 6312 while cur = 6313 while cur = 6314 while cur = 6315 while cur = 6316 while cur = 6317 while cur = 6318 while cur = 6319 while cur = 6320 add update point = 6308 cur = 6366 while cur = 6366 while cur = 6367 while cur = 6368 while cur = 6369 while cur = 6370 while cur = 6371 add update point = 6371 cur = 6551 while cur = 6551 while cur = 6552 while cur = 6553 while cur = 6554 while cur = 6555 add update point = 6553 cur = 6604 while cur = 6604 while cur = 6605 while cur = 6606 while cur = 6607 while cur = 6608 while cur = 6609 while cur = 6610 while cur = 6611 while cur = 6615 while cur = 6616 while cur = 6617 while cur = 6618 while cur = 6619 while cur = 6620 while cur = 6621 while cur = 6622 while cur = 6625 while cur = 6626 while cur = 6627 while cur = 6628 while cur = 6629 while cur = 6630 while cur = 6631 while cur = 6632 while cur = 6633 while cur = 6634 while cur = 6635 add update point = 6604 cur = 6787 while cur = 6787 while cur = 6788 while cur = 6789 while cur = 6790 while cur = 6791 while cur = 6792 while cur = 6793 while cur = 6794 while cur = 6795 while cur = 6796 while cur = 6797 while cur = 6798 while cur = 6799 while cur = 6800 while cur = 6801 while cur = 6802 while cur = 6804 while cur = 6805 while cur = 6806 while cur = 6807 while cur = 6808 while cur = 6809 while cur = 6810 while cur = 6811 while cur = 6830 while cur = 6831 while cur = 6832 while cur = 6833 while cur = 6834 while cur = 6835 while cur = 6836 while cur = 6837 while cur = 6838 while cur = 6839 while cur = 6840 add update point = 6810 cur = 7029 while cur = 7029 while cur = 7030 while cur = 7031 while cur = 7032 while cur = 7033 while cur = 7034 while cur = 7035 while cur = 7036 while cur = 7037 while cur = 7038 while cur = 7039 while cur = 7040 while cur = 7041 while cur = 7042 while cur = 7043 while cur = 7044 while cur = 7045 while cur = 7050 while cur = 7051 while cur = 7052 while cur = 7053 while cur = 7054 while cur = 7055 while cur = 7056 while cur = 7059 while cur = 7060 while cur = 7061 while cur = 7062 while cur = 7063 add update point = 7043 cur = 7287 while cur = 7287 while cur = 7288 while cur = 7289 while cur = 7290 while cur = 7296 while cur = 7297 while cur = 7298 while cur = 7299 while cur = 7300 while cur = 7315 while cur = 7316 while cur = 7317 while cur = 7318 while cur = 7319 while cur = 7320 while cur = 7321 while cur = 7322 while cur = 7331 while cur = 7332 while cur = 7333 while cur = 7334 add update point = 7319 cur = 7503 while cur = 7503 while cur = 7504 while cur = 7505 while cur = 7506 while cur = 7507 while cur = 7508 while cur = 7509 while cur = 7510 while cur = 7511 while cur = 7512 while cur = 7513 while cur = 7514 while cur = 7516 while cur = 7517 while cur = 7518 while cur = 7519 while cur = 7520 while cur = 7521 while cur = 7522 while cur = 7523 while cur = 7524 while cur = 7525 while cur = 7526 while cur = 7527 while cur = 7528 while cur = 7530 while cur = 7531 while cur = 7532 while cur = 7533 while cur = 7534 while cur = 7535 while cur = 7548 while cur = 7549 while cur = 7550 while cur = 7551 while cur = 7552 while cur = 7553 while cur = 7565 while cur = 7566 while cur = 7567 while cur = 7568 add update point = 7567 cur = 7785 while cur = 7785 while cur = 7786 while cur = 7787 while cur = 7788 add update point = 7787 cur = 7964 while cur = 7964 while cur = 7965 while cur = 7966 while cur = 7967 while cur = 7968 while cur = 7984 while cur = 7985 while cur = 7986 while cur = 7987 while cur = 7988 while cur = 7989 while cur = 7990 while cur = 8006 while cur = 8007 while cur = 8008 while cur = 8009 while cur = 8010 while cur = 8011 while cur = 8012 while cur = 8026 while cur = 8027 while cur = 8028 while cur = 8029 while cur = 8030 while cur = 8031 while cur = 8032 while cur = 8033 while cur = 8036 while cur = 8037 while cur = 8038 while cur = 8039 while cur = 8040 while cur = 8043 while cur = 8044 while cur = 8045 while cur = 8046 while cur = 8047 while cur = 8048 while cur = 8049 while cur = 8050 add update point = 8006 cur = 8209 while cur = 8209 while cur = 8210 while cur = 8211 while cur = 8212 while cur = 8213 while cur = 8214 while cur = 8215 while cur = 8216 while cur = 8217 while cur = 8218 while cur = 8219 while cur = 8220 while cur = 8221 while cur = 8222 while cur = 8223 while cur = 8224 while cur = 8225 while cur = 8226 while cur = 8239 while cur = 8240 while cur = 8241 while cur = 8242 while cur = 8243 while cur = 8244 while cur = 8245 while cur = 8246 while cur = 8251 while cur = 8252 while cur = 8253 while cur = 8254 while cur = 8256 while cur = 8257 while cur = 8258 while cur = 8259 while cur = 8260 while cur = 8261 while cur = 8262 while cur = 8264 while cur = 8265 while cur = 8266 while cur = 8267 while cur = 8268 while cur = 8269 while cur = 8270 while cur = 8271 while cur = 8272 while cur = 8273 while cur = 8274 while cur = 8276 while cur = 8277 while cur = 8278 while cur = 8279 add update point = 8279 cur = 8463 while cur = 8463 while cur = 8464 while cur = 8465 while cur = 8466 while cur = 8467 while cur = 8468 while cur = 8469 while cur = 8470 while cur = 8471 while cur = 8472 while cur = 8473 while cur = 8474 while cur = 8475 while cur = 8476 while cur = 8477 add update point = 8477 cur = 8514 while cur = 8514 while cur = 8515 while cur = 8516 while cur = 8517 add update point = 8517 cur = 8691 while cur = 8691 while cur = 8692 while cur = 8693 while cur = 8694 while cur = 8703 while cur = 8704 while cur = 8705 while cur = 8706 while cur = 8707 while cur = 8708 while cur = 8709 while cur = 8710 while cur = 8711 while cur = 8712 while cur = 8713 while cur = 8714 while cur = 8715 while cur = 8716 while cur = 8717 while cur = 8718 while cur = 8719 while cur = 8720 add update point = 8691 cur = 8745 while cur = 8745 while cur = 8746 while cur = 8747 while cur = 8748 while cur = 8749 add update point = 8745 cur = 8976 while cur = 8976 while cur = 8977 while cur = 8978 while cur = 8979 while cur = 8980 while cur = 8990 while cur = 8991 while cur = 8992 while cur = 8993 while cur = 8994 add update point = 8990 cur = 9209 while cur = 9209 while cur = 9210 while cur = 9211 while cur = 9212 while cur = 9213 while cur = 9214 while cur = 9215 while cur = 9216 while cur = 9217 add update point = 9212 cur = 9418 while cur = 9418 while cur = 9419 while cur = 9420 while cur = 9421 while cur = 9422 while cur = 9438 while cur = 9439 while cur = 9440 while cur = 9441 add update point = 9440 cur = 9642 while cur = 9642 while cur = 9643 while cur = 9644 while cur = 9645 while cur = 9646 while cur = 9647 while cur = 9648 while cur = 9649 while cur = 9650 while cur = 9651 add update point = 9642 cur = 9855 while cur = 9855 while cur = 9856 while cur = 9857 while cur = 9858 while cur = 9859 while cur = 9860 while cur = 9861 while cur = 9863 while cur = 9864 while cur = 9865 while cur = 9866 while cur = 9867 while cur = 9877 while cur = 9878 while cur = 9879 while cur = 9880 while cur = 9881 while cur = 9882 while cur = 9883 while cur = 9884 while cur = 9885 while cur = 9886 while cur = 9887 while cur = 9888 while cur = 9889 while cur = 9890 while cur = 9891 while cur = 9892 while cur = 9893 while cur = 9903 while cur = 9904 while cur = 9905 while cur = 9906 while cur = 9907 while cur = 9908 while cur = 9909 while cur = 9914 while cur = 9915 while cur = 9916 while cur = 9917 while cur = 9918 add update point = 9886 cur = 10108 while cur = 10108 while cur = 10109 while cur = 10110 while cur = 10111 while cur = 10112 while cur = 10113 add update point = 10108 cur = 10140 while cur = 10140 while cur = 10141 while cur = 10142 while cur = 10143 while cur = 10144 add update point = 10142 cur = 10617 while cur = 10617 while cur = 10618 while cur = 10619 while cur = 10620 while cur = 10621 add update point = 10620 cur = 10865 while cur = 10865 while cur = 10866 while cur = 10867 while cur = 10868 while cur = 10870 while cur = 10871 while cur = 10872 while cur = 10873 add update point = 10871 cur = 11301 while cur = 11301 while cur = 11302 while cur = 11303 while cur = 11304 while cur = 11305 while cur = 11306 while cur = 11307 while cur = 11308 while cur = 11309 while cur = 11310 while cur = 11317 while cur = 11318 while cur = 11319 while cur = 11320 while cur = 11321 while cur = 11322 while cur = 11327 while cur = 11328 while cur = 11329 while cur = 11330 add update point = 11327 cur = 11534 while cur = 11534 while cur = 11535 while cur = 11536 while cur = 11537 add update point = 11536 cur = 11691 while cur = 11691 while cur = 11692 while cur = 11693 while cur = 11694 while cur = 11695 while cur = 11696 while cur = 11699 while cur = 11700 while cur = 11701 while cur = 11702 add update point = 11701 cur = 11919 while cur = 11919 while cur = 11920 while cur = 11921 while cur = 11922 while cur = 11923 while cur = 11924 while cur = 11925 while cur = 11941 while cur = 11942 while cur = 11943 while cur = 11944 while cur = 11945 while cur = 11946 while cur = 11947 while cur = 11948 while cur = 11949 while cur = 11950 while cur = 11965 while cur = 11966 while cur = 11967 while cur = 11968 while cur = 11969 while cur = 11970 while cur = 11971 while cur = 11972 add update point = 11966 cur = 12388 while cur = 12388 while cur = 12389 while cur = 12390 while cur = 12391 while cur = 12400 while cur = 12401 while cur = 12402 while cur = 12403 while cur = 12404 while cur = 12405 while cur = 12406 while cur = 12407 while cur = 12413 while cur = 12414 while cur = 12415 while cur = 12416 while cur = 12417 while cur = 12418 while cur = 12419 while cur = 12420 while cur = 12421 while cur = 12422 while cur = 12423 while cur = 12424 while cur = 12425 while cur = 12426 while cur = 12427 while cur = 12428 while cur = 12429 while cur = 12430 while cur = 12431 while cur = 12432 while cur = 12433 add update point = 12388 cur = 12608 while cur = 12608 while cur = 12609 while cur = 12610 while cur = 12611 while cur = 12612 while cur = 12613 while cur = 12614 while cur = 12615 while cur = 12616 while cur = 12623 while cur = 12624 while cur = 12625 while cur = 12626 while cur = 12627 while cur = 12634 while cur = 12635 while cur = 12636 while cur = 12637 while cur = 12638 while cur = 12639 while cur = 12640 while cur = 12641 while cur = 12642 add update point = 12608 cur = 12821 while cur = 12821 while cur = 12822 while cur = 12823 while cur = 12824 while cur = 12825 while cur = 12826 while cur = 12832 while cur = 12833 while cur = 12834 while cur = 12835 while cur = 12836 while cur = 12837 while cur = 12838 while cur = 12839 while cur = 12840 while cur = 12841 while cur = 12842 while cur = 12850 while cur = 12851 while cur = 12852 while cur = 12853 while cur = 12854 while cur = 12855 add update point = 12853 cur = 13043 while cur = 13043 while cur = 13044 while cur = 13045 while cur = 13046 while cur = 13047 while cur = 13050 while cur = 13051 while cur = 13052 while cur = 13053 while cur = 13055 while cur = 13056 while cur = 13057 while cur = 13058 while cur = 13059 while cur = 13060 while cur = 13061 while cur = 13062 while cur = 13063 while cur = 13064 while cur = 13065 while cur = 13066 while cur = 13067 while cur = 13068 while cur = 13069 while cur = 13074 while cur = 13075 while cur = 13076 while cur = 13077 while cur = 13078 add update point = 13078 cur = 13502 while cur = 13502 while cur = 13503 while cur = 13504 while cur = 13505 while cur = 13506 while cur = 13507 while cur = 13508 while cur = 13516 while cur = 13517 while cur = 13518 while cur = 13519 while cur = 13520 while cur = 13521 while cur = 13522 while cur = 13524 while cur = 13525 while cur = 13526 while cur = 13527 while cur = 13529 while cur = 13530 while cur = 13531 while cur = 13532 while cur = 13533 while cur = 13534 while cur = 13535 add update point = 13531 cur = 13682 while cur = 13682 while cur = 13683 while cur = 13684 while cur = 13685 while cur = 13691 while cur = 13692 while cur = 13693 while cur = 13694 while cur = 13712 while cur = 13713 while cur = 13714 while cur = 13715 while cur = 13716 while cur = 13717 while cur = 13718 while cur = 13719 while cur = 13720 while cur = 13721 while cur = 13722 while cur = 13723 while cur = 13724 while cur = 13725 while cur = 13726 while cur = 13730 while cur = 13731 while cur = 13732 while cur = 13733 while cur = 13734 while cur = 13735 while cur = 13743 while cur = 13744 while cur = 13745 while cur = 13746 while cur = 13748 while cur = 13749 while cur = 13750 while cur = 13751 while cur = 13752 while cur = 13753 while cur = 13754 while cur = 13755 while cur = 13756 while cur = 13757 while cur = 13768 while cur = 13769 while cur = 13770 while cur = 13771 while cur = 13772 while cur = 13773 while cur = 13774 while cur = 13775 add update point = 13745 cur = 14176 while cur = 14176 while cur = 14177 while cur = 14178 while cur = 14179 while cur = 14182 while cur = 14183 while cur = 14184 while cur = 14185 while cur = 14186 while cur = 14188 while cur = 14189 while cur = 14190 while cur = 14191 while cur = 14192 while cur = 14193 while cur = 14194 while cur = 14195 while cur = 14196 while cur = 14197 while cur = 14198 while cur = 14199 while cur = 14200 while cur = 14201 while cur = 14202 add update point = 14178 cur = 14375 while cur = 14375 while cur = 14376 while cur = 14377 while cur = 14378 while cur = 14379 while cur = 14380 while cur = 14381 while cur = 14382 add update point = 14375 cur = 14412 while cur = 14412 while cur = 14413 while cur = 14414 while cur = 14415 while cur = 14416 while cur = 14417 while cur = 14418 while cur = 14419 while cur = 14420 while cur = 14421 while cur = 14422 while cur = 14423 while cur = 14424 while cur = 14425 while cur = 14426 while cur = 14427 while cur = 14429 while cur = 14430 while cur = 14431 while cur = 14432 while cur = 14433 while cur = 14434 while cur = 14435 while cur = 14436 while cur = 14437 while cur = 14452 while cur = 14453 while cur = 14454 while cur = 14455 while cur = 14461 while cur = 14462 while cur = 14463 while cur = 14464 while cur = 14465 while cur = 14466 while cur = 14467 add update point = 14430 cur = 14695 while cur = 14695 while cur = 14696 while cur = 14697 while cur = 14698 while cur = 14699 while cur = 14700 add update point = 14695 cur = 15178 while cur = 15178 while cur = 15179 while cur = 15180 while cur = 15181 while cur = 15182 while cur = 15183 add update point = 15178 cur = 15336 while cur = 15336 while cur = 15337 while cur = 15338 while cur = 15339 while cur = 15340 add update point = 15339 cur = 15530 while cur = 15530 while cur = 15531 while cur = 15532 while cur = 15533 while cur = 15534 while cur = 15535 while cur = 15536 while cur = 15537 while cur = 15538 while cur = 15539 while cur = 15540 while cur = 15541 while cur = 15542 while cur = 15543 while cur = 15544 while cur = 15545 while cur = 15546 while cur = 15547 while cur = 15552 while cur = 15553 while cur = 15554 while cur = 15555 while cur = 15556 while cur = 15557 while cur = 15558 while cur = 15560 while cur = 15561 while cur = 15562 while cur = 15563 while cur = 15564 while cur = 15565 while cur = 15566 while cur = 15567 while cur = 15568 while cur = 15571 while cur = 15572 while cur = 15573 while cur = 15574 while cur = 15575 while cur = 15576 while cur = 15582 while cur = 15583 while cur = 15584 while cur = 15585 while cur = 15586 while cur = 15587 while cur = 15588 while cur = 15589 while cur = 15590 while cur = 15591 while cur = 15592 while cur = 15593 while cur = 15594 while cur = 15595 while cur = 15596 while cur = 15597 while cur = 15598 while cur = 15599 add update point = 15566 cur = 15782 while cur = 15782 while cur = 15783 while cur = 15784 while cur = 15785 while cur = 15786 while cur = 15787 while cur = 15795 while cur = 15796 while cur = 15797 while cur = 15798 add update point = 15796 cur = 15951 while cur = 15951 while cur = 15952 while cur = 15953 while cur = 15954 while cur = 15955 while cur = 15956 while cur = 15957 while cur = 15958 while cur = 15959 add update point = 15956 cur = 16211 while cur = 16211 while cur = 16212 while cur = 16213 while cur = 16214 add update point = 16211 cur = 16400 while cur = 16400 while cur = 16401 while cur = 16402 while cur = 16403 while cur = 16404 while cur = 16405 while cur = 16412 while cur = 16413 while cur = 16414 while cur = 16415 while cur = 16416 while cur = 16417 while cur = 16418 while cur = 16419 add update point = 16401 cur = 16790 while cur = 16790 while cur = 16791 while cur = 16792 while cur = 16793 while cur = 16794 while cur = 16795 while cur = 16796 while cur = 16797 while cur = 16798 while cur = 16799 add update point = 16794 cur = 16828 while cur = 16828 while cur = 16829 while cur = 16830 while cur = 16831 while cur = 16832 while cur = 16833 add update point = 16829 cur = 17040 while cur = 17040 while cur = 17041 while cur = 17042 while cur = 17043 while cur = 17044 while cur = 17045 while cur = 17046 while cur = 17047 while cur = 17048 while cur = 17049 while cur = 17050 add update point = 17040 cur = 17259 while cur = 17259 while cur = 17260 while cur = 17261 while cur = 17262 while cur = 17263 add update point = 17259 cur = 17492 while cur = 17492 while cur = 17493 while cur = 17494 while cur = 17495 while cur = 17496 while cur = 17497 while cur = 17498 while cur = 17504 while cur = 17505 while cur = 17506 while cur = 17507 while cur = 17508 while cur = 17509 while cur = 17510 while cur = 17511 while cur = 17512 while cur = 17513 while cur = 17514 while cur = 17515 while cur = 17516 while cur = 17517 while cur = 17518 while cur = 17519 while cur = 17520 while cur = 17521 while cur = 17529 while cur = 17530 while cur = 17531 while cur = 17532 while cur = 17533 while cur = 17534 while cur = 17535 while cur = 17536 while cur = 17544 while cur = 17545 while cur = 17546 while cur = 17547 while cur = 17548 add update point = 17494 cur = 17944 while cur = 17944 while cur = 17945 while cur = 17946 while cur = 17947 while cur = 17948 while cur = 17949 while cur = 17950 while cur = 17951 while cur = 17962 while cur = 17963 while cur = 17964 while cur = 17965 add update point = 17951 cur = 18167 while cur = 18167 while cur = 18168 while cur = 18169 while cur = 18170 while cur = 18171 while cur = 18172 while cur = 18173 while cur = 18174 while cur = 18195 while cur = 18196 while cur = 18197 while cur = 18198 while cur = 18199 while cur = 18200 while cur = 18201 while cur = 18202 while cur = 18203 while cur = 18204 while cur = 18205 while cur = 18206 while cur = 18207 while cur = 18208 while cur = 18209 while cur = 18210 while cur = 18211 while cur = 18212 while cur = 18213 while cur = 18217 while cur = 18218 add update point = 18218 cur = 18219 add update point = 18219 candidate_reference_update2 size = 83
In [26]:
x = - total_LMD[:10000]
height = -70
peaks = np.array(candidate_reference_update2)
peaks = peaks[peaks < 10000]
# Plot a simple line chart without any feature
plt.figure(figsize=(30,10))
plt.plot(range(x.shape[0]), x)
plt.plot(range(x.shape[0]), np.full(x.shape, height))
plt.ylim(-200, 1)
plt.plot(peaks, x[peaks], "o", color="r", label="peaks")
plt.xticks(peaks,rotation=90)
plt.show()In [ ]:
In [27]:
import tempfile
import os
def concate_video(path_frames, idx_beg, idx_end, path_save):
# write to a input.txt
file_tmp = tempfile.NamedTemporaryFile(suffix='.txt')
files = [ str(path_frames.joinpath(f"frame-{i:06d}.jpg")) for i in range(idx_beg, idx_end)]
with open(file_tmp.name, 'w') as f:
for ifiles in files:
f.write(f"file {ifiles} \n")
# with open(file_tmp.name, 'r') as f:
# read = f.readlines()
# print(read)
# concate to a video
cmd = f"ffmpeg -y -r 50 -f concat -safe 0 -i {str(file_tmp.name)} -c:v libx264 -pix_fmt yuv420p -loglevel error {str(path_save)}"
print(cmd)
os.system(cmd)
print(f"frame=[{idx_beg},{idx_end}] duration={(idx_end - idx_beg)/50}s. save video to {path_save}")
In [28]:
# cut video
ipath_video_save = path_video.joinpath(f"video_split_ref_mean_update2")
ipath_video_save.mkdir(parents=True, exist_ok=True)
peaks_filter = candidate_reference_update2
# ipath_video_log = path_video.joinpath(f"video_split_ref_mean2.manifest")
# dict_manifest = {}
for i in range(0, len(peaks_filter)-1):
# if i > 15: break
idx_beg = peaks_filter[i]
idx_end = peaks_filter[i+1]
nsize = idx_end - idx_beg + 1
# filter small video
if nsize < 50 * 1: continue # < 1s
duration = nsize/50
duration_pad = nsize//50 + 1
nframe_pad = duration_pad * 50 - nsize
print(f"frame=[{idx_beg},{idx_end}] nframes = {nsize}, duration={duration}, duration_pad = {duration_pad}, need padding {nframe_pad / 2}")
# make 32 padding
# resampling
ipath_save = ipath_video_save.joinpath(f"split_{i:02d}_{idx_beg:05d}_{idx_end:05d}.mp4")
concate_video(path_frame, idx_beg, idx_end, ipath_save)frame=[9,205] nframes = 197, duration=3.94, duration_pad = 4, need padding 1.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpr0o621_f.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_00_00009_00205.mp4 frame=[9,205] duration=3.92s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_00_00009_00205.mp4 frame=[205,407] nframes = 203, duration=4.06, duration_pad = 5, need padding 23.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpzqxsym4k.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_01_00205_00407.mp4 frame=[205,407] duration=4.04s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_01_00205_00407.mp4 frame=[407,669] nframes = 263, duration=5.26, duration_pad = 6, need padding 18.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmp31v79kw_.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_02_00407_00669.mp4 frame=[407,669] duration=5.24s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_02_00407_00669.mp4 frame=[703,913] nframes = 211, duration=4.22, duration_pad = 5, need padding 19.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpeh0cotom.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_04_00703_00913.mp4 frame=[703,913] duration=4.2s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_04_00703_00913.mp4 frame=[913,1027] nframes = 115, duration=2.3, duration_pad = 3, need padding 17.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpz1sr4_sv.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_05_00913_01027.mp4 frame=[913,1027] duration=2.28s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_05_00913_01027.mp4 frame=[1027,1200] nframes = 174, duration=3.48, duration_pad = 4, need padding 13.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmp45zytrh_.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_06_01027_01200.mp4 frame=[1027,1200] duration=3.46s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_06_01027_01200.mp4 frame=[1200,1342] nframes = 143, duration=2.86, duration_pad = 3, need padding 3.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmp9land_tk.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_07_01200_01342.mp4 frame=[1200,1342] duration=2.84s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_07_01200_01342.mp4 frame=[1342,1577] nframes = 236, duration=4.72, duration_pad = 5, need padding 7.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmp8chnzw_8.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_08_01342_01577.mp4 frame=[1342,1577] duration=4.7s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_08_01342_01577.mp4 frame=[1577,2135] nframes = 559, duration=11.18, duration_pad = 12, need padding 20.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpb8wpxw_h.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_09_01577_02135.mp4 frame=[1577,2135] duration=11.16s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_09_01577_02135.mp4 frame=[2135,2348] nframes = 214, duration=4.28, duration_pad = 5, need padding 18.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmp0208uwwj.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_10_02135_02348.mp4 frame=[2135,2348] duration=4.26s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_10_02135_02348.mp4 frame=[2348,2403] nframes = 56, duration=1.12, duration_pad = 2, need padding 22.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpz9eef9tx.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_11_02348_02403.mp4 frame=[2348,2403] duration=1.1s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_11_02348_02403.mp4 frame=[2403,2646] nframes = 244, duration=4.88, duration_pad = 5, need padding 3.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpkbvf0ido.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_12_02403_02646.mp4 frame=[2403,2646] duration=4.86s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_12_02403_02646.mp4 frame=[2646,2864] nframes = 219, duration=4.38, duration_pad = 5, need padding 15.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpawnims5q.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_13_02646_02864.mp4 frame=[2646,2864] duration=4.36s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_13_02646_02864.mp4 frame=[2864,3133] nframes = 270, duration=5.4, duration_pad = 6, need padding 15.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpexynbgqg.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_14_02864_03133.mp4 frame=[2864,3133] duration=5.38s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_14_02864_03133.mp4 frame=[3133,3358] nframes = 226, duration=4.52, duration_pad = 5, need padding 12.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmp5a3k4ez_.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_15_03133_03358.mp4 frame=[3133,3358] duration=4.5s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_15_03133_03358.mp4 frame=[3358,3595] nframes = 238, duration=4.76, duration_pad = 5, need padding 6.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmp2faigy4r.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_16_03358_03595.mp4 frame=[3358,3595] duration=4.74s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_16_03358_03595.mp4 frame=[3595,3682] nframes = 88, duration=1.76, duration_pad = 2, need padding 6.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpbc647n32.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_17_03595_03682.mp4 frame=[3595,3682] duration=1.74s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_17_03595_03682.mp4 frame=[3682,3735] nframes = 54, duration=1.08, duration_pad = 2, need padding 23.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpmmrp7fyd.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_18_03682_03735.mp4 frame=[3682,3735] duration=1.06s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_18_03682_03735.mp4 frame=[3735,3994] nframes = 260, duration=5.2, duration_pad = 6, need padding 20.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpip6dginv.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_19_03735_03994.mp4 frame=[3735,3994] duration=5.18s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_19_03735_03994.mp4 frame=[3994,4212] nframes = 219, duration=4.38, duration_pad = 5, need padding 15.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmp6bhpx4tp.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_20_03994_04212.mp4 frame=[3994,4212] duration=4.36s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_20_03994_04212.mp4 frame=[4212,4466] nframes = 255, duration=5.1, duration_pad = 6, need padding 22.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmp1gvogse3.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_21_04212_04466.mp4 frame=[4212,4466] duration=5.08s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_21_04212_04466.mp4 frame=[4466,4664] nframes = 199, duration=3.98, duration_pad = 4, need padding 0.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpaxvim33a.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_22_04466_04664.mp4 frame=[4466,4664] duration=3.96s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_22_04466_04664.mp4 frame=[4664,4854] nframes = 191, duration=3.82, duration_pad = 4, need padding 4.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpm3ikm05z.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_23_04664_04854.mp4 frame=[4664,4854] duration=3.8s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_23_04664_04854.mp4 frame=[4854,5075] nframes = 222, duration=4.44, duration_pad = 5, need padding 14.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpy5zn_d55.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_24_04854_05075.mp4 frame=[4854,5075] duration=4.42s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_24_04854_05075.mp4 frame=[5075,5366] nframes = 292, duration=5.84, duration_pad = 6, need padding 4.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpxmit5ggx.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_25_05075_05366.mp4 frame=[5075,5366] duration=5.82s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_25_05075_05366.mp4 frame=[5366,5628] nframes = 263, duration=5.26, duration_pad = 6, need padding 18.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpvk3kum13.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_26_05366_05628.mp4 frame=[5366,5628] duration=5.24s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_26_05366_05628.mp4 frame=[5628,5850] nframes = 223, duration=4.46, duration_pad = 5, need padding 13.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpnn2u87n0.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_27_05628_05850.mp4 frame=[5628,5850] duration=4.44s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_27_05628_05850.mp4 frame=[5850,6123] nframes = 274, duration=5.48, duration_pad = 6, need padding 13.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpmgxcja3h.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_28_05850_06123.mp4 frame=[5850,6123] duration=5.46s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_28_05850_06123.mp4 frame=[6123,6308] nframes = 186, duration=3.72, duration_pad = 4, need padding 7.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpp0cgzi7i.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_29_06123_06308.mp4 frame=[6123,6308] duration=3.7s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_29_06123_06308.mp4 frame=[6308,6371] nframes = 64, duration=1.28, duration_pad = 2, need padding 18.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpts36zd13.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_30_06308_06371.mp4 frame=[6308,6371] duration=1.26s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_30_06308_06371.mp4 frame=[6371,6553] nframes = 183, duration=3.66, duration_pad = 4, need padding 8.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmp8cvbwnr2.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_31_06371_06553.mp4 frame=[6371,6553] duration=3.64s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_31_06371_06553.mp4 frame=[6553,6604] nframes = 52, duration=1.04, duration_pad = 2, need padding 24.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpdjpmviv1.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_32_06553_06604.mp4 frame=[6553,6604] duration=1.02s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_32_06553_06604.mp4 frame=[6604,6810] nframes = 207, duration=4.14, duration_pad = 5, need padding 21.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpqcnumm8x.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_33_06604_06810.mp4 frame=[6604,6810] duration=4.12s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_33_06604_06810.mp4 frame=[6810,7043] nframes = 234, duration=4.68, duration_pad = 5, need padding 8.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpzyv98rg_.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_34_06810_07043.mp4 frame=[6810,7043] duration=4.66s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_34_06810_07043.mp4 frame=[7043,7319] nframes = 277, duration=5.54, duration_pad = 6, need padding 11.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpj0ifkvz_.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_35_07043_07319.mp4 frame=[7043,7319] duration=5.52s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_35_07043_07319.mp4 frame=[7319,7567] nframes = 249, duration=4.98, duration_pad = 5, need padding 0.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpeqyg__89.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_36_07319_07567.mp4 frame=[7319,7567] duration=4.96s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_36_07319_07567.mp4 frame=[7567,7787] nframes = 221, duration=4.42, duration_pad = 5, need padding 14.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpkgrbijrs.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_37_07567_07787.mp4 frame=[7567,7787] duration=4.4s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_37_07567_07787.mp4 frame=[7787,8006] nframes = 220, duration=4.4, duration_pad = 5, need padding 15.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmp53nfsp6r.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_38_07787_08006.mp4 frame=[7787,8006] duration=4.38s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_38_07787_08006.mp4 frame=[8006,8279] nframes = 274, duration=5.48, duration_pad = 6, need padding 13.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpsjyp3goh.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_39_08006_08279.mp4 frame=[8006,8279] duration=5.46s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_39_08006_08279.mp4 frame=[8279,8477] nframes = 199, duration=3.98, duration_pad = 4, need padding 0.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpnu3lxkpm.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_40_08279_08477.mp4 frame=[8279,8477] duration=3.96s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_40_08279_08477.mp4 frame=[8517,8691] nframes = 175, duration=3.5, duration_pad = 4, need padding 12.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpais_r443.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_42_08517_08691.mp4 frame=[8517,8691] duration=3.48s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_42_08517_08691.mp4 frame=[8691,8745] nframes = 55, duration=1.1, duration_pad = 2, need padding 22.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpzj3e7ayn.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_43_08691_08745.mp4 frame=[8691,8745] duration=1.08s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_43_08691_08745.mp4 frame=[8745,8990] nframes = 246, duration=4.92, duration_pad = 5, need padding 2.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpr0lu7mvi.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_44_08745_08990.mp4 frame=[8745,8990] duration=4.9s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_44_08745_08990.mp4 frame=[8990,9212] nframes = 223, duration=4.46, duration_pad = 5, need padding 13.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmprq2o_8pc.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_45_08990_09212.mp4 frame=[8990,9212] duration=4.44s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_45_08990_09212.mp4 frame=[9212,9440] nframes = 229, duration=4.58, duration_pad = 5, need padding 10.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmp0xe6qmwc.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_46_09212_09440.mp4 frame=[9212,9440] duration=4.56s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_46_09212_09440.mp4 frame=[9440,9642] nframes = 203, duration=4.06, duration_pad = 5, need padding 23.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmp2gkw2mza.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_47_09440_09642.mp4 frame=[9440,9642] duration=4.04s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_47_09440_09642.mp4 frame=[9642,9886] nframes = 245, duration=4.9, duration_pad = 5, need padding 2.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmp5w9qxn1g.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_48_09642_09886.mp4 frame=[9642,9886] duration=4.88s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_48_09642_09886.mp4 frame=[9886,10108] nframes = 223, duration=4.46, duration_pad = 5, need padding 13.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmp6h_jsgop.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_49_09886_10108.mp4 frame=[9886,10108] duration=4.44s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_49_09886_10108.mp4 frame=[10142,10620] nframes = 479, duration=9.58, duration_pad = 10, need padding 10.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpj06vaq1h.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_51_10142_10620.mp4 frame=[10142,10620] duration=9.56s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_51_10142_10620.mp4 frame=[10620,10871] nframes = 252, duration=5.04, duration_pad = 6, need padding 24.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpjy5y5wyg.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_52_10620_10871.mp4 frame=[10620,10871] duration=5.02s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_52_10620_10871.mp4 frame=[10871,11327] nframes = 457, duration=9.14, duration_pad = 10, need padding 21.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpemos3l_m.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_53_10871_11327.mp4 frame=[10871,11327] duration=9.12s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_53_10871_11327.mp4 frame=[11327,11536] nframes = 210, duration=4.2, duration_pad = 5, need padding 20.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmptw2oa_i7.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_54_11327_11536.mp4 frame=[11327,11536] duration=4.18s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_54_11327_11536.mp4 frame=[11536,11701] nframes = 166, duration=3.32, duration_pad = 4, need padding 17.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmprnyoevoz.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_55_11536_11701.mp4 frame=[11536,11701] duration=3.3s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_55_11536_11701.mp4 frame=[11701,11966] nframes = 266, duration=5.32, duration_pad = 6, need padding 17.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpbh746uc1.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_56_11701_11966.mp4 frame=[11701,11966] duration=5.3s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_56_11701_11966.mp4 frame=[11966,12388] nframes = 423, duration=8.46, duration_pad = 9, need padding 13.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpv2pyng52.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_57_11966_12388.mp4 frame=[11966,12388] duration=8.44s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_57_11966_12388.mp4 frame=[12388,12608] nframes = 221, duration=4.42, duration_pad = 5, need padding 14.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmp0cyjwboa.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_58_12388_12608.mp4 frame=[12388,12608] duration=4.4s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_58_12388_12608.mp4 frame=[12608,12853] nframes = 246, duration=4.92, duration_pad = 5, need padding 2.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmp4x1_m1q2.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_59_12608_12853.mp4 frame=[12608,12853] duration=4.9s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_59_12608_12853.mp4 frame=[12853,13078] nframes = 226, duration=4.52, duration_pad = 5, need padding 12.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpj03moi46.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_60_12853_13078.mp4 frame=[12853,13078] duration=4.5s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_60_12853_13078.mp4 frame=[13078,13531] nframes = 454, duration=9.08, duration_pad = 10, need padding 23.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpq9yf41bw.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_61_13078_13531.mp4 frame=[13078,13531] duration=9.06s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_61_13078_13531.mp4 frame=[13531,13745] nframes = 215, duration=4.3, duration_pad = 5, need padding 17.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmp6kr6zmuw.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_62_13531_13745.mp4 frame=[13531,13745] duration=4.28s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_62_13531_13745.mp4 frame=[13745,14178] nframes = 434, duration=8.68, duration_pad = 9, need padding 8.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpfucjlkdn.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_63_13745_14178.mp4 frame=[13745,14178] duration=8.66s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_63_13745_14178.mp4 frame=[14178,14375] nframes = 198, duration=3.96, duration_pad = 4, need padding 1.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmp1a0iwk78.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_64_14178_14375.mp4 frame=[14178,14375] duration=3.94s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_64_14178_14375.mp4 frame=[14375,14430] nframes = 56, duration=1.12, duration_pad = 2, need padding 22.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmp2ma423be.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_65_14375_14430.mp4 frame=[14375,14430] duration=1.1s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_65_14375_14430.mp4 frame=[14430,14695] nframes = 266, duration=5.32, duration_pad = 6, need padding 17.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpwrkdy2eo.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_66_14430_14695.mp4 frame=[14430,14695] duration=5.3s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_66_14430_14695.mp4 frame=[14695,15178] nframes = 484, duration=9.68, duration_pad = 10, need padding 8.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpuc77mp30.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_67_14695_15178.mp4 frame=[14695,15178] duration=9.66s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_67_14695_15178.mp4 frame=[15178,15339] nframes = 162, duration=3.24, duration_pad = 4, need padding 19.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmp7gveqb8v.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_68_15178_15339.mp4 frame=[15178,15339] duration=3.22s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_68_15178_15339.mp4 frame=[15339,15566] nframes = 228, duration=4.56, duration_pad = 5, need padding 11.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpu7vvplkv.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_69_15339_15566.mp4 frame=[15339,15566] duration=4.54s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_69_15339_15566.mp4 frame=[15566,15796] nframes = 231, duration=4.62, duration_pad = 5, need padding 9.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmp447e1_1g.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_70_15566_15796.mp4 frame=[15566,15796] duration=4.6s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_70_15566_15796.mp4 frame=[15796,15956] nframes = 161, duration=3.22, duration_pad = 4, need padding 19.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpvwtiu9vs.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_71_15796_15956.mp4 frame=[15796,15956] duration=3.2s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_71_15796_15956.mp4 frame=[15956,16211] nframes = 256, duration=5.12, duration_pad = 6, need padding 22.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmp06pppnrq.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_72_15956_16211.mp4 frame=[15956,16211] duration=5.1s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_72_15956_16211.mp4 frame=[16211,16401] nframes = 191, duration=3.82, duration_pad = 4, need padding 4.5 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpf0oyfea_.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_73_16211_16401.mp4 frame=[16211,16401] duration=3.8s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_73_16211_16401.mp4 frame=[16401,16794] nframes = 394, duration=7.88, duration_pad = 8, need padding 3.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpgpvhdpho.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_74_16401_16794.mp4 frame=[16401,16794] duration=7.86s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_74_16401_16794.mp4 frame=[16829,17040] nframes = 212, duration=4.24, duration_pad = 5, need padding 19.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpdzxt0it9.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_76_16829_17040.mp4 frame=[16829,17040] duration=4.22s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_76_16829_17040.mp4 frame=[17040,17259] nframes = 220, duration=4.4, duration_pad = 5, need padding 15.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpzkkauhrf.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_77_17040_17259.mp4 frame=[17040,17259] duration=4.38s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_77_17040_17259.mp4 frame=[17259,17494] nframes = 236, duration=4.72, duration_pad = 5, need padding 7.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpyghsmtid.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_78_17259_17494.mp4 frame=[17259,17494] duration=4.7s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_78_17259_17494.mp4 frame=[17494,17951] nframes = 458, duration=9.16, duration_pad = 10, need padding 21.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmpcwgnayvx.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_79_17494_17951.mp4 frame=[17494,17951] duration=9.14s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_79_17494_17951.mp4 frame=[17951,18218] nframes = 268, duration=5.36, duration_pad = 6, need padding 16.0 ffmpeg -y -r 50 -f concat -safe 0 -i /tmp/tmp2eus6f1d.txt -c:v libx264 -pix_fmt yuv420p -loglevel error /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_80_17951_18218.mp4 frame=[17951,18218] duration=5.34s. save video to /mfs/lsen/DATA/Actor6/bg/processing2_0810/4R3A0211/video/video_split_ref_mean_update2/split_80_17951_18218.mp4
In [ ]: