0

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.

gronostaj
  • 55,965
  • 20
  • 120
  • 179
Qatarson
  • 31
  • 1
  • 3
  • Also: [How can I start a process over SSH such that it will continue to run after I disconnect?](http://superuser.com/questions/524586/how-can-i-start-a-process-over-ssh-such-that-it-will-continue-to-run-after-i-dis) – slhck May 29 '13 at 15:54

1 Answers1

0

Try screen. It's sort of a virtual terminal that runs your shell. You start by typing "screen [enter]" then it starts your favorite shell (bash?).

Start your script and press "[CTRL]-A-D" then screen goes to background while still running your shell and tasks and you can log off. Also works like this when connection drops.

Kenned
  • 729
  • 4
  • 13