guidop21
guidop21

Reputation: 197

How to suspend and resume ffmpeg during encoding?

I am using FFMPEG to split a video into many 60 second video clips using a camera with the following command:

ffmpeg -f dshow -rtbufsize 2000M -i video="Game Capture HD60 S (Video) (#01)" -preset slow -codec:a libfdk_aac -b:a 128k -codec:v libx264
-pix_fmt yuv420p -b:v 1000k -minrate 500k -maxrate 2000k -bufsize 2000k -vf scale=854:480 -f segment -segment_time 60 -reset_timestamps 1 -flush_packets 1 "C:\Program Files (x86)\ffmpeg\test\clips\testfile_%02d.mp4"

I would also like to be able to do suspend and resume. How can I do? Thank you

Upvotes: 2

Views: 6408

Answers (1)

Jao
Jao

Reputation: 586

If you're using Linux/OS X you could use this Stack Exchange result.

A simple method is to suspend it with ctrl+z. Or you could get the PID with pgrep ffmpeg then use kill -s SIGSTOP to suspend.

Then resume with fg command or kill -s SIGCONT .

Upvotes: 4

Related Questions