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
  • 58,482

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