diff --git a/scripts/dispatcher.py b/scripts/dispatcher.py index fcff56e..249d71a 100644 --- a/scripts/dispatcher.py +++ b/scripts/dispatcher.py @@ -394,7 +394,8 @@ def _extract_on_remote_host(job_id: int, worker: dict, src_host: str, src_path: dur = 0.0 frames_est = max(1, int(dur * FPS)) - _ssh_via(worker, src_host, f"mkdir -p {shlex.quote(remote_tmp)}") + _ssh_via(worker, src_host, + f"rm -f {shlex.quote(exit_file)}" + f" && rm -rf {shlex.quote(remote_tmp)}" + f" && mkdir -p {shlex.quote(remote_tmp)}") bg = ( f"rm -f {shlex.quote(exit_file)}; " f"ffmpeg -hide_banner -loglevel error -i {shlex.quote(src_path)} "