[MPlayer-cygwin] Problems compiling mencoder with MinGW + crashes

Stefan Gürtler Stefan.guertler at stud.tum.de
Mon Jun 21 12:03:13 CEST 2004


Hi there.
A small update on the MinGW compiling / mencoder usage issue.

Problem number one solved. Renaming/copying the /urs/local/lib/xvidcore.a to
/urs/local/lib/libxvidcore.a enables static building with xvid support.


Stefan at CF ~/MPlayer-20040620
$ ls -l /usr/local/lib/
total 1106
-rw-r--r--    1 Stefan   Administ   370234 Jun 15 19:24 libmp3lame.a
-rw-r--r--    1 Stefan   Administ      750 Jun 15 19:24 libmp3lame.la
-rw-r--r--    1 Stefan   Administ   493812 Jun 21 08:21 libxvidcore.a
-rwxr-xr-x    1 Stefan   Administ   450587 Jun 21 08:21 libxvidcore.dll
-rw-r--r--    1 Stefan   Administ   493812 Jun 15 18:26 xvidcore.a
-rwxr-xr-x    1 Stefan   Administ   450587 Jun 15 18:26 xvidcore.dll

Stefan at CF ~/MPlayer-20040620
$


Stefan at CF ~/MPlayer-20040620
$
./configure --enable-static  --with-extraincdir=/usr/local/include --with-ex
tralibdir=/usr/local/lib --disable-mp3lib
...
Checking for XviD ... yes
Checking for DivX4 compatibility in XviD ... no
Checking for DivX4linux/DivX5linux/OpenDivX decore ... no
Checking for libmp3lame (for mencoder) ... yes
Checking for DivX4linux encore (for mencoder) ... no
Checking for mencoder ... yes
...
  Enabled optional drivers:
    Input: ftp network edl tv matroska(internal) mpdvdkit2
    Codecs: xvid libavcodec faad2(internal) libmpeg2 liba52
    Audio output: win32 mpegpes(file)
    Video output: winvidix cvidix directx mpegpes(file) opengl tga
  Disabled optional drivers:
    Input: tv-v4l2 tv-v4l tv-bsdbt848 live.com cdda dvdread vcd dvb smb
    Codecs: qtx opendivx libdv real xanim dshow/dmo win32 mp3lib libtheora
libvo                                             rbis libmad liblzo gif
    Audio output: sgi sun alsa esd arts oss dxr2 nas sdl macosx
    Video output: xvidix bl zr zr2 dxr3 dxr2 sdl vesa gif89a jpeg png fbdev
svga                                              caca aa ggi xmga mga dga
xvmc xv x11 directfb tdfx_vid tdfxfb 3dfx quartz

...

Now lets test if i am still able to crash mencoder with -oac lame and -avc
lavc -lavcopts ....

$ mencoder.exe /d/Filme/RahXephon.avi -nosound -ovc lavc -o test.avi ERROR!
$ mencoder.exe /d/Filme/RahXephon.avi -oac copy -ovc lavc -o test.avi ERROR!
$ mencoder.exe /d/Filme/RahXephon.avi -oac copy -ovc lavc -lavcopts
vcodec=mpeg4 -o test.avi ERROR!
$ mencoder.exe /d/Filme/RahXephon.avi -oac copy -ovc lavc -lavcopts
vcodec=mjpeg -o test.avi ERROR!
What happens when trying to use xvid?
$ mencoder.exe /d/Filme/RahXephon.avi -oac copy -ovc xvid -xvidencopts
fixed_quant=3 -o test.av OK!
And xvid together with lame?
mencoder.exe /d/Filme/RahXephon.avi -oac mp3lame -lameopts preset=96 -ovc
xvid -xvidencopts fixed_quant=3 -o test.avi OK!
But has a loud clicking sound at the beginning. Sound disturbance remains
even when omitting lameopts or setting lameopts to cpb:br=96.

Ooops. RahXephon.avi's height is not modolo 16 (352 x 236). Maybe that keeps
lavc from encoding?
So crop it to have the next smaller heigth with % 16, that is 224. So i
add -vf crop=352:224,scale and tested it with mplayer playback.
Result for Playbakc: Works fine, cropping is actually done.

$ mencoder.exe /d/Filme/RahXephon.avi -vf crop=352:224,scale -oac copy -ovc
lavc -lavcopts vcodec=mpeg4 -o test.avi -v
...
audiocodec: framecopy (format=55 chans=2 rate=48000 bits=0 bps=8000
sample=1)
Writing AVI header...
ODML: Aspect information not (yet?) available or unspecified, not writing
vprp header.
[ffmpeg] aspect_ratio: 0,000000
VDec: vo config request - 352 x 236 (preferred csp: Planar YV12)
Trying filter chain: crop scale expand lavc
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO Config (352x236->352x236,flags=0,'MPlayer',0x32315659)
REQ: flags=0x441  req=0x400
SwScaler: using unscaled Planar YV12 -> Planar YV12 special converter
REQ: flags=0x401  req=0x0
REQ: flags=0x401  req=0x0
videocodec: libavcodec (352x224 fourcc=58564944 [DIVX])
*** [lavc] Allocating mp_image_t, 352x224x12bpp YUV planar, 118272 bytes
*** [expand] Direct Rendering mp_image_t, 352x224x12bpp YUV planar, 118272
bytes
*** [scale] Allocating (slices) mp_image_t, 352x224x12bpp YUV planar, 118272
bytes
*** [crop] Allocating (slices) mp_image_t, 352x240x12bpp YUV planar, 126720
bytes
+ ERROR!

Same with -vf crop=352:224:0:0,scale
Still no good. But the last line makes me suspicious. [crop]
...352x240x12bpp... why 240?
If mencoder wants height 240 so badly, i will provide it with 240:
mencoder.exe /d/Filme/RahXephon.avi -vf crop=352:240,scale -oac copy -ovc
lavc -lavcopts vcodec=mpeg4 -o test.avi -v OK ?!?
Why that? Problem with expected aspect ratio?

Lets try with more sophisticated lavcopts, including two passes:
$ mencoder.exe /d/Filme/RahXephon.avi -vf crop=352:240,scale -oac copy -ovc
lavc -lavcopts vcodec=mpeg4:mbd=1:vpass=1:vqscal
e=2 -o test.avi -v ERROR!
Now lets try with crop=252:224 again.
mencoder.exe /d/Filme/RahXephon.avi -vf crop=352:224,scale -oac copy -ovc
lavc -lavcopts vcodec=mpeg4:mbd=1:vpass=1:vqscal
e=2 -o test.avi -v OK?!?
Looks like mencoder enjoys confusing me. Now lets do the second pass
$ mencoder.exe /d/Filme/RahXephon.avi -vf crop=352:224,scale -oac copy -ovc
lavc -lavcopts vcodec=mpeg4:mbd=1:vpass=2:vqscal
e=2 -o test.avi -v OK!

Now lets try with a source that is %16 to get rid of the scaling issue:
The file should be perfect. It is from a DVD rip made with AutoGK. Infos as
given by mplayer.
However it is an amorphic encode.
Playing d:/Filme/AI_MPEG4/AI_AutoGK.avi.
AVI file format detected.
VIDEO:  [XVID]  640x352  12bpp  25,000 fps  1293,7 kbps (157,9 kbyte/s)
$ mencoder.exe /d/Filme/AI_MPEG4/AI_AutoGK.avi -vf crop=352:240,scale -oac
copy -ovc lavc -lavcopts vcodec=mpeg4:mbd=1:vpass
=1:vqscale=2 -endpos 10 -o test.avi OK!
$ mencoder.exe /d/Filme/AI_MPEG4/AI_AutoGK.avi -vf crop=352:240,scale -oac
copy -ovc lavc -lavcopts vcodec=mpeg4:mbd=1:vpass
=2:vqscale=2 -o test.avi ERROR!
$ mencoder.exe /d/Filme/AI_MPEG4/AI_AutoGK.avi -vf crop=352:240,scale -oac
copy -ovc lavc -lavcopts vcodec=mpeg4:mbd=1:vpass
=2:vbitrate=1000 -o test.avi ERROR!
Oops, i have forgotten to take out the -vf corp
$ mencoder.exe /d/Filme/AI_MPEG4/AI_AutoGK.avi -oac copy -ovc lavc -lavcopts
vcodec=mpeg4:mbd=1:vpass=1:vqscale=2 -endpos 15
 -o test.avi -v ERROR!
$ mencoder.exe /d/Filme/AI_MPEG4/AI_AutoGK.avi -oac copy -ovc lavc -o
test.avi ERROR!

So lets try a file with dimensions %16 that is not amorphicly encoded.
AVI file format detected.
VIDEO:  [XVID]  640x480  24bpp  23,976 fps  873,1 kbps (106,6 kbyte/s)

$ mencoder.exe source.avi -ofps 23.976 -oac copy -ovc lavc -o test.avi
ERROR!
$ mencoder.exe source.avi -ofps 23.976 -oac mp3lame -lameopts preset=96 -ovc
lavc -o test.avi ERROR!
What about xvid with this source?
$ mencoder.exe source.avi -ofps 23.976 -oac mp3lame -lameopts preset=96 -ovc
xvid -xvidencopts fixed_quant=3 -endpos 15 -o test.avi OK!
That sucks! Or shall i say, lavc sucks with this compile!
I try to compile mplayer without xvid and -enable-static now to see if it
gets any better.

Stefan




More information about the MPlayer-cygwin mailing list