[MPlayer-users] Strange results with mf://\*.png (more data)
Matthias Goerner
m.goerner at iu-bremen.de
Wed Nov 19 19:40:59 CET 2003
Dear list,
I had exactly the same problem with png's and figured out that it is a
bug in mplayer/mencoders mf-driver.
I solved the problem by replacing the control function in
libmpcodecs/vd_mpng.c by (which is actually copied from
libmpcodecs/vd_mtga.c):
static int control(sh_video_t *sh,int cmd,void* arg,...){
switch (cmd)
{
case VDCTRL_QUERY_FORMAT:
if (*((int *) arg) == out_fmt) return CONTROL_TRUE;
return CONTROL_FALSE;
}
return CONTROL_UNKNOWN;
}
This works fine for my applications. I will send a patch to
mplayer-dev-eng at mplayerhq.hu.
Matthias Goerner
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> Some more data on the problem (see below).
>
> 1) I'm using 1.0pre2 installed from rpm (from the official page) on
> Linux RH 7.2
> 2) Now the command line I'm using is:
> mencoder -ovc lavc -lavcopts vcodec=mpeg4:$opt -mf
> type=png:w=512:h=512:fps=25 -nosound -o output.avi mf://\*.png
> 3) The problem is not affected by the dimensions of the image
> 4) The problem seems related only to the PNG format. If I use JPEG the
> problem goes away
> 5) Seems that ImageMagick and mencoder do not love each other:
> If I convert to TGA, here is the message from mencoder:
> Unsupported TGA type! depth=0fps Trem: 0min 0mb A-V:0.000
> [0:0]
> Else, if I convert to SGI:
> Bad magic number in image. 0fps Trem: 0min 0mb A-V:0.000
> [0:0]
>
> Sure, you will ask: "why don't you use JPEG? It seem to work".
> Well, I don't want to loose quality in my frames using unneeded JPEG
> compression. Also the
> frames are chemistry ball and sticks, not well suited to JPEG
> compression.
>
> Any suggestion?
> Thanks a lot!
> mario
>
>
> ------------- Here the original problem ----------------
> I'm trying to create movies from a bunch of PNG frames.
> Sometimes (with alarming frequency I must add...) also a simple MPNG
> movie
> has wrong colors and is squeezed to the left leaving a black band on
> the right side.
> The squeezing factor seems something like 3/4.
>
> The command used to create the movie is:
>
> mencoder -ovc copy -nosound -o tmp.avi mf://\*.png
>
> and my ~/.mplayer/mencoder file contains only:
>
> mf=type=png
>
> The same behavior happens during the real MPEG4 compression. Also once
> happened that a movie returned
> to normal after a color change in the scene (from almost b&w to color).
>
> If you want to reproduce the problem, a set of 10 frames can be found in:
> http://www.cscs.ch/~mvalle/mencoder_bug.tar.gz
>
> Thanks a lot for your help!
> mario
>
More information about the MPlayer-users
mailing list