[MPlayer-users] Re: help w/ encoding an avi file from sequence of .png files

Dean S. Messing deanm at sharplabs.com
Sat Jan 25 19:44:02 CET 2003


Frederick Bruckman wrote:
 :: On Fri, 24 Jan 2003, Dean S. Messing wrote:
 :: 
 :: >   => mencoder *.png -mf on:w=325:h=407:fps=15:type=png -ovc rawrgb -o output.avi
 :: 
 :: The '*' (asterisk) has to be passed through to the program, so either
 :: escape it, as \*.png, or put the whole thing in single quotes, '*.png'.

Oh, how stupid of me!!!  I read \*.png in the doc as /*.png and said
"I wonder why it assumes the .png files are at root level."
Since mine were not I left it off thinking that mencoder would just
scarf up the file names after the shell expanded them.

Ok, so I now have a .avi file.  A step forward.  Thanks Frederick!

But I can't get it to play either with MPlayer or with Windoze Media
player.  The latter is (unfortunately) more important because I must
send this experimental sequence to my counterparts in Corporate
Headquarters.  They are all Windoze Weenies.

Below are the command lines and output from Mencoder and one attempt
(of many) to play it with Mplayer.  Note that the proper frame size is

325*407*3 = 396825

Why mplayer thinks a frame size shd. be 397232 is not clear to me.

====== begin mencoder commandline and output =======

   ==> mencoder \*.png -mf on:w=325:h=407:fps=15:type=png -ovc rawrgb -o output.avi

   Using GNU internationalization
   Original domain: messages
   Original dirname: /usr/share/locale
   Current domain: mplayer
   Current dirname: /usr/share/locale


   MEncoder CVS-030123-21:00-3.2.1 (C) 2000-2003 Arpad Gereoffy (see DOCS)

   CPU: Advanced Micro Devices Athlon 4 PM Palomino/Athlon MP Multiprocessor/Athlon XP eXtreme Performance (Family: 6, Stepping: 2)
   Detected cache-line size is 64 bytes
   CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
   Reading /home/deanm/.mplayer/codecs.conf: 49 audio & 130 video codecs
   File not found: 'frameno.avi'
   Reading config file /home/deanm/.mplayer/mencoder: No such file or directory
   success: format: 0  data: 0x0 - 0x0
   forced mf.
   [demuxer] mf support.
   [mf] search expr: *.png
   [mf] number of files: 120 (480)
   [V] filefmt:16  fourcc:0x474E504D  size:325x407  fps:15.00  ftime:=0.0667
   Opening video filter: [expand=-1:-1:-1:-1:1]
   Expand: -1 x -1, -1 ; -1  (-1=autodetect) osd: 1
   ==========================================================================
   Opening video decoder: [mpng] PNG Images decoder
   Selected video codec: [mpng] vfm:mpng (PNG images decoder)
   ==========================================================================
   Writing AVI header...
   VDec: vo config request - 325 x 407 (preferred csp: BGR 24-bit)
   VDec: using BGR 24-bit as output csp (no 1)
   Opening video filter: [flip]
   Movie-Aspect is undefined - no prescaling applied.
   Pos:   8.0s    120f ( 0%)  16fps Trem:   0min   0mb  A-V:0.000 [47619:0]
   Writing AVI index...
   Fixing AVI header...

   Video stream: 47619.000 kbit/s  (5952375 bps)  size: 47619000 bytes  8.000 secs  120 frames

====== end mencoder commandline and output =======

I note that the raw encoding is "BGR 24-bit", so:


====== begin mplayer commandline and output =======

   ==> mplayer   -vc rawbgr24 output.avi  -loop 0
   Using GNU internationalization
   Original domain: messages
   Original dirname: /usr/share/locale
   Current domain: mplayer
   Current dirname: /usr/share/locale


   MPlayer CVS-030123-21:00-3.2.1 (C) 2000-2003 Arpad Gereoffy (see DOCS)

   CPU: Advanced Micro Devices Athlon 4 PM Palomino/Athlon MP Multiprocessor/Athlon XP eXtreme Performance (Family: 6, Stepping: 2)
   Detected cache-line size is 64 bytes
   CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
   Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE SSE2

   Reading config file /etc/mplayer/mplayer.conf
   Reading config file /home/deanm/.mplayer/config
   Reading /home/deanm/.mplayer/codecs.conf: 49 audio & 130 video codecs
   font: can't open file: /home/deanm/.mplayer/font/font.desc
   font: can't open file: /usr/share/mplayer/font/font.desc
   Using Linux hardware RTC timing (1024Hz).
   Input config file /home/deanm/.mplayer/input.conf parsed : 0 binds

   Playing output.avi
   Cache fill:  0.00% (0 bytes)    AVI file format detected.
   AVI_NI: No audio stream found -> no sound.
   AVI: No audio stream found -> no sound.
   VIDEO:  []  325x407  24bpp  15.00 fps  47619.0 kbps (5812.9 kbyte/s)
   Clip info:
    Software: MEncoder CVS-030123-21:00-3.2.1 
   vo: X11 running at 1600x1200 with depth 24 and 32 bpp (":0" => local display)
   ==========================================================================
   Forced video codec: rawbgr24
   Opening video decoder: [raw] RAW Uncompressed Video
   VDec: vo config request - 325 x 407 (preferred csp: BGR 24-bit)
   VDec: using BGR 24-bit as output csp (no 0)
   Movie-Aspect is undefined - no prescaling applied.
   VO: [xv] 325x407 => 325x407 BGR 24-bit  [flip]
   Selected video codec: [rawbgr24] vfm:raw (RAW BGR24)
   ==========================================================================
   Audio: no sound
   Starting playback...
   Frame too small! (396825<397232) Wrong format?
   V:   0.0    1   0%  0%  0.0% 0 0 19%Frame too small! (396825<397232) Wrong format?
   V:   0.1    2   0%  0%  0.0% 0 0 49%Frame too small! (396825<397232) Wrong format?
   V:   0.1    3   0%  0%  0.0% 0 0 85%Frame too small! (396825<397232) Wrong format?

   MPlayer interrupted by signal 2 in module: enable_cache


   MPlayer interrupted by signal 2 in module: sleep_rtc

====== end mplayer commandline and output =======

While mplayer is "playing" I get an empty (black) window with the "Frame too
small" messages spewing out in the shell window.

The .png files were created from (24 bpp) .ppm files using ImageMagick
`convert' as follows:

    convert lady000.ppm -interlace plane  /tmp/foo1.png

Note that `-interlace plane' says to arrange the colour
planes sequentially instead of like rgbrgbrgb...

But this should make no difference to mencoder since
it simply decodes the .png.  If it got the interpretation
of r,g,b wrong then I might see garbage but as far as mplayer
is concerned, it should still play, right?

Anyway, I (blindly) tried "-vop scale",  on the commandline and got
some additional lines of output:

   Opening video filter: [flip]
   Movie-Aspect is undefined - no prescaling applied.
   SwScaler: using unscaled BGR 24-bit -> Planar YV12 special converter
   VO: [xv] 325x407 => 325x407 Planar YV12 
   Selected video codec: [rawbgr24] vfm:raw (RAW BGR24)
   ==========================================================================
   Audio: no sound
   Starting playback...
   Frame too small! (396825<397232) Wrong format?
   V:   0.0    1   0%  0%  0.0% 0 0 18%Frame too small! (396825<397232) Wrong format?
   V:   0.1    2   0%  0%  0.0% 0 0 40%Frame too small! (396825<397232) Wrong format?
   V:   0.1    3   0%  0%  0.0% 0 0 85%Frame too small! (396825<397232) Wrong format?

but still the same "Frame too small error."

So can you help me with the next step?


                      Dean S. Messing
                      Display Algorithms & Visual Optimization Lab
                      Information Systems Technologies Dept.
                      Sharp Laboratories of America
              E-Mail: deanm at sharplabs.com



More information about the MPlayer-users mailing list