1

I'm trying to pause a screencast made with ffmpeg under Linux, giving the command:

kill -s SIGSTOP <PID>

resuming then it with the command:

kill -s SIGCONT <PID>

to finally interrupt it with the command:

kill <PID>

but the resulting file keeps the duration of the pause command in the timeline. For a better explanation of the problem, I realized a video: as you can see, there are 14 seconds in which the timeline is locked (from 29th to 43th second), the same duration of the command to pause the screencast (kill -s SIGSTOP <PID>).

Is there any way to not include it in the final video output? The unique one that I thought is to cut the final output, "labeling" the pause command in such a way to know where to cut...

Thank you

3
  • I'm unable to test at this time, but try fixing the timestamps: -vf setpts=N/FRAME_RATE/TB (that's an output option). Other stuff... You can use kill -s SIGSTOP $(pgrep ffmpeg) assuming you're running one ffmpeg process. As for your command: you don't need -re, -movflags faststart, -profile:v, -level, -r, -an. Replace -s with -video_size. Replace -b:v 32M with -crf 0.
    – llogan
    Commented Jan 9, 2019 at 1:18
  • Hello, @llogan, thanks for your reply. For now I'm launching the screencast with a script that stores the pid of the process, as you can see in the notification at the beginning of the video. For now I start and stop the process with different files.desktop linked to the scripts. I used the ps ax | grep ffmpeg command only for this demo to explain the problem. The setting for the ffmpeg command has been a long test to find a good compromise between quality, framerate, smooth mouse movement, synchronized voice and a not too big output... I will try your suggestions! Cheers Commented Jan 9, 2019 at 2:25
  • Did setpts help?
    – llogan
    Commented Jan 10, 2019 at 17:44

0

You must log in to answer this question.

Browse other questions tagged .