[FFmpeg-devel] FFMPEG DLL proposal

Michael Niedermayer michaelni
Wed Jan 21 17:10:17 CET 2009

On Wed, Jan 21, 2009 at 04:53:41PM +0100, Pierre Chatelier wrote:
> Hello,
> I would like to use FFMPEG "under the hood" in an application, to  
> quickly convert some movies. Unfortunately, the API is terrible to  
> learn and I won't do anything better than ffmpeg.exe can do. 

> But I do  
> not like the idea to embedd ffmpeg.exe, I would prefer a shared library.

so write a shared lib that calls ffmpeg.exe

> My idea is the following :
> 1-transform ffmpeg.c and cmdutils.c by removing all static variables.  
> This is easy : just replace all static variables with a big struct  
> named "context" that would be passed to any function.
> 2-replace main(int argc, char* argv[]) by ffmpeg_process(int argc,  
> char* argv[])
> 3-ffmpeg.c is now a single call to ffmpeg_process()
> Thus, we would have a DLL with a single public function  
> ffmpeg_process(), which could be used with parameters like on the  
> command line. What a relief !
> Why don't I do that myself ?
> Well... I did, but I have many problems.

yes, and the biggest does not seem related to programming, its your
philosophical dislike of calling an executable instead of a dll.
Or in other words if you cant come up with a single argument beyond
your feeling of dislike and relief then maybe these really are the
only arguments. And that would be a little weak to justify the work
mess and maintaince it would need

> I have performed step1 a few weeks ago. Since then many svn updates  
> did occur and I am totally desynchronized with ffmpeg.c and many  
> components.
> I can't manage to build the shared libraries by trying to add things  
> in the Makefiles... Too many macros, dependencies, CLI options to  
> GCC... I give up.
> In my opinion, this would be a benefit for everybody, if it was an  
> official new feature of FFmpeg, but this should be handled by the ones  
> maintaining ffmpeg.c and cmdutils.c.
> Any chance to see it soon ?

likely not and likely thats not limited to the short term

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you really think that XML is the answer, then you definitly missunderstood
the question -- Attila Kinali
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090121/fa7bf11b/attachment.pgp>

More information about the ffmpeg-devel mailing list