How to suspend FFmpeg from C ++ code?

I am writing a VisualC ++ program that has code that calls ffmpeg.exe to convert a video file. I wonder if it is possible to pause / resume the ffmpeg stream to convert a stream from C ++ code?

LR.

+4
source share
5 answers

All you have to do is pause and resume the ffmpeg child process itself.

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

The only easy way to do this is SuspendThread / ResumeThread.

See this article on coder for how to do this.

+3
source

There are no ways to control the conversion using ffmpeg.

However, if you switch to mencoder, you can do it.

+3
source

This is the equivalent for a Unix based command:

mike@krusty :~$ pidof ffmpeg 22730 mike@krusty :~$ sudo kill -STOP 22730 [sudo] password for mike: mike@krusty :~$ sudo kill -CONT 22730 
+2
source

No. This is a command line tool, and after starting it, you cannot pause it.

+1
source
+1
source

All Articles