pigoz / mplayerosx-builds

build scripts of mplayer2 for Mac OSX
35 stars 8 forks source link

Cannot get external subtitles to load #13

Closed ghost closed 12 years ago

ghost commented 12 years ago

Even though I specified a font for subfont.tff I still get the error message:

Fontconfig error: Cannot load default config file Fontconfig failed to select a font. Trying without fontconfig... Fontconfig failed to select a font. Trying without fontconfig...

I know nothing about creating a fontconfig file and do not know where to look for instruction.

Thanks

pigoz commented 12 years ago

http://www.mplayer2.org/docs/mplayer/ check the documentation (search for --font and --subfont). The last two examples in the --font option are fontconfig patterns. Fontconfig will pick up the font based on the name if you installed the font.

You can check an example in my config file also hosted here on GitHub: https://github.com/pigoz/dotfiles/blob/master/mplayer/config

ghost commented 12 years ago

i'm still getting the error. The full output is:

licHD.ORG] James$ sudo mplayer2 --subfont=~/.mplayer/subfont.ttf You.Are.The.Apple.Of.My.Eye.720p.BluRay.x264.DTS-HDChina.srt You.Are.The.Apple.Of.My.Eye.720p.BluRay.x264.DTS-HDChina.mkv Password: mplayer2 0926d52 (C) 2000-2012 MPlayer & mplayer2 teams Can't init Apple Remote.

Playing You.Are.The.Apple.Of.My.Eye.720p.BluRay.x264.DTS-HDChina.srt. Detected file format: SubRip subtitle format (libavformat) [srt @ 0x7fc753011200] Estimating duration from bitrate, this may be inaccurate LAVF: no audio or video headers found - broken file? Opening as detected format "libavformat" failed. Detected file format: SubRip subtitle format (libavformat) [srt @ 0x7fc755801a00] Estimating duration from bitrate, this may be inaccurate LAVF: no audio or video headers found - broken file? Opening as detected format "libavformat" failed. Failed to recognize file format.

Playing You.Are.The.Apple.Of.My.Eye.720p.BluRay.x264.DTS-HDChina.mkv. [mkv] Track ID 1: video (V_MPEG4/ISO/AVC), -vid 0 [mkv] Track ID 2: audio (A_DTS), -aid 0, -alang und [mkv] Will play video track 1. Detected file format: Matroska VIDEO: [avc1] 1280x544 24bpp 24.000 fps 0.0 kbps ( 0.0 kbyte/s) Load subtitles in . SUB: Added subtitle file (1): ./You.Are.The.Apple.Of.My.Eye.720p.BluRay.x264.DTS-HDChina.srt [gl] using extended formats. Use -vo gl:nomanyfmts if playback fails. Fontconfig error: Cannot load default config file [ass] No usable fontconfig configuration file found, using fallback.

Fontconfig error: Cannot load default config file

Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family Asking decoder to use 8 threads if supported.

Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)

Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders AUDIO: 48000 Hz, 2 ch, s16le, 1536.0 kbit/100.00% (ratio: 192000->192000)

Selected audio codec: [ffdca] afm: ffmpeg (FFmpeg DTS)

AO: [coreaudio] 48000Hz 2ch s16le (2 bytes per sample) Starting playback... Movie-Aspect is 2.35:1 - prescaling to correct movie aspect. VO: [gl] 1280x544 => 1280x544 Planar YV12 [ass] PlayResX undefined, setting to 384 Fontconfig error: Cannot load default config file Fontconfig failed to select a font. Trying without fontconfig... Fontconfig failed to select a font. Trying without fontconfig... A: 20.5 V: 20.4 A-V: 0.128 ct: 0.001 0/ 0 0% 5% 0.7% 2 0

Exiting... (Quit)

Do I need to recompile and install fontconfig?

ghost commented 12 years ago

I installed fontconfig through macports but am still getting the same error message.

pigoz commented 12 years ago

What OS are you using? If you are on mountain lion you may need XQuartz.

ghost commented 12 years ago

Thanks a lot. I am running mountain lion and had XQuartz but it turns out the it was a faulty install, I redownloaded and reinstalled the package and now the subtitles work. Thanks again.

pigoz commented 12 years ago

That's good to hear. In the next binary release I'm going to include fontconfig and freetype to the bundled libraries in order to avoid this kind of problems.