[FFmpeg-devel] [RFC] ffmpeg.c refactoring
Wed Jun 11 10:24:25 CEST 2008
Ralf Terdic wrote:
> On Wednesday 11 June 2008 09:00:34 Michael Niedermayer wrote:
>> ive said this in the past to other people, what you want is:
>> IIRC noone yet had a argument against that, so until one does, the way
>> ffmpeg.c is implemented is correct.
> Invoking ffmpeg in a shell is no viable option in a server environment.
> Forking a process for each invocation is too expensive, so if possible, you
> want to stay within the same thread, or at least within the same process.
In the past, I worked on a project where ffmpeg was used by forking a new
process and calling exec() as Michael is suggesting.
If you consider the CPU time needed for encoding or transcoding a file,
you see that the fork() overhead is not even measurable in this case
(believe me, I did a lot of tests and measurements about it).
So, your "Invoking ffmpeg in a shell is no viable option in a server
environment" argument does not apply.
More information about the ffmpeg-devel