I'm trying to convert video with ffmpeg on a remote computer using SSH. Sometimes I get disconnected or get a server timeout and the process is interrupted. I've tried a bash script with the following command:
ffmpeg -i input.mkv -threads 4 -c:v libx264 -crf 30 -preset slow output.mp4
but it's also interrupted when loose my connection in Putty.