Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to pause FFmpeg from C++ code?

I'm writing a VisualC++ program which have code invoke ffmpeg.exe to convert video file. I wonder is it possible to pause/resume ffmpeg converting thread from C++ code?

LR.

like image 714
jAckOdE Avatar asked Jul 01 '11 06:07

jAckOdE


2 Answers

All you need to do is suspend and resume the ffmpeg child process itself.

The main problem is: there is no SuspendProcess API function. And there is no documented or safe way of doing this.

The only simple way of doing this is via SuspendThread/ResumeThread.

See this article on codeproject about how to do it.

like image 75
sashoalm Avatar answered Sep 18 '22 02:09

sashoalm


There are no ways to controls the conversion using ffmpeg.

However, if you switch you mencoder, you will be able to do it.

like image 35
BЈовић Avatar answered Sep 19 '22 02:09

BЈовић