Reputation: 2500
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.
Upvotes: 6
Views: 3763
Reputation: 21
This is an equivalent for Unix based command:
mike@krusty:~$ pidof ffmpeg
22730
mike@krusty:~$ sudo kill -STOP 22730
[sudo] password for mike:
mike@krusty:~$ sudo kill -CONT 22730
Upvotes: 2
Reputation: 79457
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.
Upvotes: 3
Reputation: 64213
There are no ways to controls the conversion using ffmpeg.
However, if you switch you mencoder, you will be able to do it.
Upvotes: 3
Reputation: 76778
No. This is a command-line tool, and once it is started, you cannot pause it.
Upvotes: 1