[XviD-devel] How to change XviD encoder settings programmatically on Windows (DirectShow and other methods)

pete pross at xvid.org
Sat Jan 20 23:49:21 CET 2007


hi

On Sat, 20 Jan 2007 15:54:50 -0600 "Andreas Schuler"
<dres.schuler at gmail.com> wrote:
> I am using DirectShow within my application to encode and decode video. Now
> it would like to be able to set the target bit rate in particular from
> within my app without having to display the XviD codec property page.
> 
> The question is: Is there a COM interface (such as then one offered by the
> Theora encoder), which could be used to set the bit rate? Again the idea is
> not having to interact with the codec itself, but retrieve an interface from
> the XviD video compressor filter within the DirectShow graph.

there is no elegant method to set bitrate from an encoding application.
the following methods have been atempted by other people:

1) the xvid encoder is based on the video-for-windows api. when using an
vfw compressor filter (such as xvid) in directshow, the
IAMVfwCompressDialogs interface should be exposed. use the get/set state
functions provided by this interface to manipulate the xvid CONFIG
struct. the structure is defined in xvidcore/vfw/src/config.h.

2) registry. but can cause problems if there are multiple
instances of the xvid encoder.

-- pete



More information about the XviD-devel mailing list