Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including
Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
10 years ago
This question already has answers here:
10 years ago.
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.
55.5k 19 19 gold badges 120 120 silver badges 179 179 bronze badges
May 29, 2013 at 15:36
31 1 1 silver badge 3 3 bronze badges
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.
May 29, 2013 at 15:50
729 4 4 silver badges 13 13 bronze badges
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our
Accept all cookies
Necessary cookies only