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

Andreas Schuler dres.schuler at gmail.com
Sun Jan 21 00:00:38 CET 2007


Thanks Pete,

Yeah, I saw the interface on the filter, but didn't know you could pass a
struct in there. Follow up question: is there a way to initialize the
structure? I mean I only want to change the bit rate and leave all the other
settings as they are (just like when I would go through the dialog itself
and only change that setting).

Also, has anyone done this before in managed code, like C# before? I should
be able to handle it but would greatly appreciate if someone has some
pointers.

Andreas

-----Original Message-----
From: xvid-devel-bounces at xvid.org [mailto:xvid-devel-bounces at xvid.org]On
Behalf Of pete
Sent: Saturday, January 20, 2007 4:49 PM
To: xvid-devel at xvid.org
Subject: Re: [XviD-devel] How to change XviD encoder
settingsprogrammatically on Windows (DirectShow and other methods)

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

_______________________________________________
XviD-devel mailing list
XviD-devel at xvid.org
http://list.xvid.org/mailman/listinfo/xvid-devel



More information about the XviD-devel mailing list