[Ffmpeg-devel] Differences between mencoder and ffmpegwhenencoding using x264

Wolfram Gloger wmglo
Mon Feb 27 11:51:28 CET 2006


Hi,

> I started looking at this.  The libavcodec side of it is easy enough.
> The problem is making ffmpeg.c use it.  More specifically, it sets all
> the parameters in AVCodecContext before deciding which codec to use.

I've looked at this yesterday and well -- ffmpeg.c shouldn't do this,
if only for preparation of the day when per-codec parameters arrive..

I would suggest for ffmpeg.c:

1. When parsing options and recognizing them as codec options, don't
   do anything with them except storing them in opt_names[],
   opt_args[] arrays (this is already partially the case right
   now, opt_names[] already exists).

2. For each input and output file, store an index into opt_names
   which is one past the last option valid _for this file_
   (important for per-file options)

3. avcodec_open() gets three new parameters, or at least a new
   variant like:

int avcodec_open(AVCodecContext *s, AVCodec *codec,
                 const char *opt_names[], const char *opt_args[], int opt_n)

   In the future, this could also set options in contexts derived from
   AVCodecContext, e.g. when a "parent" pointer is added to AVClass.

Unfortunately, I won't have time to actually implement this before
next week.

Regards,
Wolfram.





More information about the ffmpeg-devel mailing list