[MPlayer-cygwin] How to get a mplayer with fontconfig?

John Brown johnbrown105 at hotmail.com
Mon Dec 3 10:55:02 CET 2007


RVM wrote:
> El Sábado, 1 de Diciembre de 2007 18:18, John Brown escribió:
>> I don't have any subtitle files, so I can't try it myself.
>>
>> Does fontconfig work for you otherwise? If you type fc-list, do you get a
>> list of fonts installed on your system? 
>
> Yes.
>
>>
>> Next, don't try to play your subtitles, but instead:
>>
>> mplayer -fontconfig -font "Courier New" x11.avi.
>>
>> Is your On Screen Display in Courier New?
>
> No, mplayer crashes immediately.
>
>> If both tests were successful, then fontconfig and freetype2 are OK
>> and you have another problem.
>>
>
> Today I compiled mplayer with cygwin, instead of mingw. It seemed to me that 
> it was a lot easier. The setup allows to install a lot of precompiled 
> packages, including fontconfig. (And to make things easier I only installed 
> packages from the setup).
>
> There was a problem with an undefined reference to `_llrint' but I found a 
> patch (http://article.gmane.org/gmane.comp.video.ffmpeg.devel/37442).
>
> This build works but it has exactly the same problem as the mingw build. It 
> crashed when trying to use fontconfig.
>
> This is with -fontconfig -font Arial, mplayer crashes immediately:
>
> $ gdb ./mplayer.exe
> (gdb) set args  "/home/ricardo/Mis documentos/Videos/3x11.avi" -fontconfig -fo
> nt Arial -v
> (gdb) run
> Starting program: /home/ricardo/Mis documentos/cygwin/mplayer/mplayer.exe 
> "/home
> /ricardo/Mis documentos/Videos/3x11.avi" -fontconfig -font Arial -v
> [various DLLs loaded]
> [Tries to open various configuration files]
>  
> Playing /home/ricardo/Mis documentos/Videos/3x11.avi.
> get_path('sub/') -> '/home/ricardo/.mplayer/sub/'
> [file] File size is 367501312 bytes
> [file format information that means nothing to me]
> get_path('sub/') -> '/home/ricardo/.mplayer/sub/'
> [file] File size is 51887 bytes
> STREAM: [file] /home/ricardo/Mis documentos/Videos/3x11.srt
> STREAM: Description: File
> STREAM: Author: Albeu
> STREAM: Comment: based on the code from ??? (probably Arpi)
> SUB: Detected subtitle file format: subviewer
> SUB: Read 643 subtitles.
> SUB: Added subtitle file (1): /home/ricardo/Mis documentos/Videos/3x11.srt
> checking primary surface
> 10 BGR16 supported
> testing supported overlay pixelformats
> 0 YV12  supported
> 3 YVU9  supported
> 4 YUY2  supported
> 5 UYVY  supported

> Your card supports 4 of 15 overlayformats
> [more information deleted]
> [1]+  Stopped                 gdb ./mplayer.exe
>  
> ricardo at avalon ~/Mis documentos/cygwin/mplayer
> $ fg 1
> gdb ./mplayer.exe
> ---Type  to continue, or q  to quit---
>  

> [ffmpeg] aspect_ratio: 1.772727
> VDec: vo config request - 624 x 352 (preferred colorspace: Planar YV12)
> Trying filter chain: vo
> VDec: using Planar YV12 as output csp (no 0)
> Movie-Aspect is 1.77:1 - prescaling to correct movie aspect.
> VO Config (624x352->624x352,flags=0,'MPlayer',0x32315659)
> VO: [directx] 624x352 => 624x352 Planar YV12
> VO: Description: Directx DDraw YUV/RGB/BGR renderer
> VO: Author: Sascha Sommer 
> overlay with format YV12  created
> *** [vo] Allocating (slices) mp_image_t, 624x352x12bpp YUV planar, 329472 
> bytes
> *** [vo] Allocating (slices) mp_image_t, 624x352x12bpp YUV planar, 329472 
> bytes
>  
> Program received signal SIGSEGV, Segmentation fault.
> 0x00983561 in FcFontSetMatch ()
> (gdb) bt
> #0  0x00983561 in FcFontSetMatch ()
> #1  0x009835bb in FcFontMatch ()
> #2  0x0057efb9 in load_font_ft (width=624, height=352, fontp=0xc90704,
>     font_name=0x1d6cc18 "Arial") at font_load_ft.c:1151
> #3  0x0057a890 in vo_update_osd (dxs=624, dys=352) at sub.c:1093
> #4  0x0057ca23 in vo_draw_text (dxs=624, dys=352,
>     draw_alpha=0x430d20 ) at sub.c:1228
> #5  0x00430fc5 in draw_osd () at vo_directx.c:185
> #6  0x00477226 in control (vf=0x1d88150, request=7, data=0x0) at vf_vo.c:94
> #7  0x00466f1e in filter_video (sh_video=0x1d7b1d0, frame=0x1d7fd30,
>     pts=0.041708331555128098) at dec_video.c:415
> #8  0x00407469 in main (argc=6, argv=0x1d61e88) at mplayer.c:2052
> (gdb)
>
> And this is with -ass, mplayer crashes when the first subtitle is about to 
> show:
>
> $ gdb ./mplayer.exe
> (gdb) set args  "/home/ricardo/Mis documentos/Videos/3x11.avi" -ass
> (gdb) run
> Starting program: /home/ricardo/Mis documentos/cygwin/mplayer/mplayer.exe 
> "/home
> /ricardo/Mis documentos/Videos/3x11.avi" -ass

> SUB: Detected subtitle file format: subviewer
> SUB: Read 643 subtitles.
> SUB: Added subtitle file (1): /home/ricardo/Mis documentos/Videos/3x11.srt
> [ass] auto-open
> [ass] Init
> [ass] Updating font cache.

>  
> [1]+  Stopped                 gdb ./mplayer.exe
>  
> ricardo at avalon ~/Mis documentos/cygwin/mplayer
> $ fg 1
> gdb ./mplayer.exe

> A:   0.5 V:   0.5 A-V: -0.007 ct: -0.005  14/ 14  2%  2%  3.0% 0 0
> Program received signal SIGSEGV, Segmentation fault.
> _select_font (priv=0x0, family=0x1dfe088 "Sans", bold=80, italic=0,
>     index=0x22b498, code=0) at ass_fontconfig.c:96
> 96              for (curf = 0; curf < fset->nfont; ++curf) {
> (gdb) bt
> #0  _select_font (priv=0x0, family=0x1dfe088 "Sans", bold=80, italic=0,
>     index=0x22b498, code=0) at ass_fontconfig.c:96
> #1  0x008c17db in fontconfig_select (priv=0x1d91958, family=0x1dfe088 "Sans",
>     bold=80, italic=0, index=0x22b498, code=0) at ass_fontconfig.c:157
> #2  0x008c2899 in add_face (fc_priv=0x22b3d0, font=0x1dfe088, ch=80)
>     at ass_font.c:126
> #3  0x01dfe088 in ?? ()
> #4  0x00000050 in ?? ()
> #5  0x00000000 in ?? ()
> (gdb) quit
> The program is running.  Exit anyway? (y or n) y
>
> I noticed the text that says:
> "Compiler did not align stack variables. Libavcodec has been miscompiled
> and may be very slow or crash. This is not a bug in libavcodec,
> but in the compiler. You may try recompiling using gcc>= 4.2.
> Do not report crashes to FFmpeg developers."
>
> The mingw build doesn't print this warning, but it has the same behavior and 
> crashes at the same point, so I think the crash is not related to that 
> warning. And just running 'mplayer.exe -font any_font.ttf' (so no fontconfig 
> used) works.

I get that message too, but it works, so I don't think that it is the cause of
your problem either.
My software:
gcc 3.4.5 (MinGW)
binutils 2.16.91
MPlayer svn 25096
fontconfig 2.4.2
freetype2 2.3.4

Try a different vo (gl2 or gl).

Also, you mentioned that mplayer's configure had problems detecting fonctconfig
and freetype. Do you remember what you did to fix the problems? I had a recent
problem, but I only had to edit the test for fontconfig in the configure script.
I did not have to do anything special to compile fontconfig or freetype.
>
> This is how mplayer was configured:
> ./configure --enable-static --enable-debug --enable-runtime-cpudetection 
> --codecsdir=codecs
>
> I attach the whole configure log, in case it's needed.
>


_________________________________________________________________
Share life as it happens with the new Windows Live.Download today it's FREE!
http://www.windowslive.com/share.html?ocid=TXT_TAGLM_Wave2_sharelife_112007


More information about the MPlayer-cygwin mailing list