[MPlayer-users] libmpcodec and libavcodec~~

boku boku0712 at gmail.com
Thu Dec 27 07:02:47 CET 2007


On 12/27/07, RC <cooleyr at gmail.com> wrote:
> On Thu, 27 Dec 2007 10:11:56 +0800
> boku <boku0712 at gmail.com> wrote:
>
> > BTW, if my codec includes decoding of mpeg1/2/4 and h264.
> > How can I do to replace those built-in codec like ffmpeg with my
> > codec? I can see there's a match procedues for choosing which codec is
> > suitable in Mplayer.
> > Are there any steps or codes I should notice to make the replacement?
>
> To add a decoder to MPlayer (and Mencoder), you have to add an entry to
> codecs.conf and codecs.conf.h.  codecs.conf is used if you copy it into
> your config path (eg. $HOME/mplayer/, /usr/local/etc/mplayer/, etc.).
> codecs.conf.h is built-in when MPlayer is compiled, and is used if
> codecs.conf isn't found.
>
> In both files, the codec highest in the file, which supports your
> video's format, will be used by default.  The others can always be used
> instead by specifying them with -vc or -vfm (or -ac or -afm).  So, just
> add your (eg. MPEG-4) codec to codecs.conf(.h) above the one that is
> currently default, and yours will be used.
>
RC, Thanks a lot!
Another problem is where the output frame data is.
Such as in vd_ffmpeg.c(), the output seems stored
and returned from the bottom decoder struct like AVFrame->data[*]
But what if the returned is YUV packed data such as YUV422 packed data.
Do I just need to config the pix_fmt to YUYV422 and
save the packed buffer into AVFrame pic->data[0] then
it can be displayed correctly by the upper layer?
Thank you~
BR,



More information about the MPlayer-users mailing list