don't rely on stop

This commit is contained in:
rlx 2021-08-09 15:41:58 +00:00
parent 7c42f80690
commit 2f6f44ec96

2
pc.py
View file

@ -70,7 +70,7 @@ def read_images():
def save_data(): def save_data():
np.save(data_fn, data) np.save(data_fn, data)
src_fn = f'{src_dn}/{stop:08d}.jpg' src_fn = f'{src_dn}/{stop:08d}.jpg'
if not os.path.exists(src_fn): if not os.path.exists(src_dn):
os.makedirs(src_dn, exist_ok=True) os.makedirs(src_dn, exist_ok=True)
os.system(f'ffmpeg -i "{video_fn}" -q:v 1 "{src_dn}/%08d.jpg"') os.system(f'ffmpeg -i "{video_fn}" -q:v 1 "{src_dn}/%08d.jpg"')
cell_dn = f'{src_dn}_{cell_w}x{cell_h}' cell_dn = f'{src_dn}_{cell_w}x{cell_h}'