enable libass

Any suggestions that you have about the builds.

Re: enable libass

Postby Zeranoe » Mon Aug 20, 2012 6:37 pm

nille02 wrote:except the env vars ( FC_CONFIG_DIR and FC_CONFIG_FILE ) everything are compile options for fontconfig.

So that fontconfig can proper work you has to set 2 environment variables. The First is FC_CONFIG_DIR with the Path where you place the config File. The second is FC_CONFIG_FILE with the full path and filename from the config file.

This is my example.
FC_CONFIG_DIR=F:\Work Area\ffmpeg64\bin\fonts
FC_CONFIG_FILE=F:\Work Area\ffmpeg64\bin\fonts\fonts.conf

If fontconfig can't find an valid configuration file you can't use the ass video filter

Thats why i suggest to compile fontconfig with the default path for windows, where he can find the fonts (include the current path ./ ).


How about ../presets because I would rather have all the configure/preset files in one location.
User avatar
Zeranoe
Site Admin
 
Posts: 552
Joined: Sat May 07, 2011 7:12 pm

Re: enable libass

Postby rogerdpack » Mon Aug 20, 2012 6:44 pm

maybe the distro could also include some "default font" as well?
rogerdpack
 
Posts: 1455
Joined: Fri Aug 05, 2011 9:56 pm

Re: enable libass

Postby nille02 » Mon Aug 20, 2012 6:58 pm

Zeranoe wrote:How about ../presets because I would rather have all the configure/preset files in one location.


I think thats not an Problem, but then your ffmpeg build must set the environment variables (Or write in the Readme that the user has to set this Variables). I thinks its easer to compile fontconfig with the important defaults path, then you don't need any configuration file (and if the user want some special options he can use the env variable to override the default settings).

In you fontconfig source folder there is also an default configuration file ( font.conf.in ) maybe its enough if you add this to the config an rebuild it.

Code: Select all
<dir>./</dir>
   
<dir>WINDOWSFONTDIR</dir>

<cachedir>WINDOWSTEMPDIR_FONTCONFIG_CACHE</cachedir>
nille02
 
Posts: 23
Joined: Tue Aug 14, 2012 3:47 pm

Re: enable libass

Postby camelotmsl » Mon Sep 10, 2012 8:04 pm

save the below code in the ffmpeg folder as "fonts.conf" and set enviroment as:

FC_CONFIG_DIR=C:\Program Files\ffmpeg
FONTCONFIG_FILE=fonts.conf
FONTCONFIG_PATH=C:\Program Files\ffmpeg

(amend the path to the ffmpeg folder on your system)

Code: Select all
<?xml version="1.0"?>
<fontconfig>

<dir>C:\WINDOWS\Fonts</dir>

<match target="pattern">
   <test qual="any" name="family"><string>mono</string></test>
   <edit name="family" mode="assign"><string>monospace</string></edit>
</match>

<match target="pattern">
   <test qual="all" name="family" mode="not_eq"><string>sans-serif</string></test>
   <test qual="all" name="family" mode="not_eq"><string>serif</string></test>
   <test qual="all" name="family" mode="not_eq"><string>monospace</string></test>
   <edit name="family" mode="append_last"><string>sans-serif</string></edit>
</match>

<alias>
   <family>Times</family>
   <prefer><family>Times New Roman</family></prefer>
   <default><family>serif</family></default>
</alias>
<alias>
   <family>Helvetica</family>
   <prefer><family>Arial</family></prefer>
   <default><family>sans</family></default>
</alias>
<alias>
   <family>Courier</family>
   <prefer><family>Courier New</family></prefer>
   <default><family>monospace</family></default>
</alias>
<alias>
   <family>serif</family>
   <prefer><family>Times New Roman</family></prefer>
</alias>
<alias>
   <family>sans</family>
   <prefer><family>Arial</family></prefer>
</alias>
<alias>
   <family>monospace</family>
   <prefer><family>Andale Mono</family></prefer>
</alias>
<match target="pattern">
   <test name="family" mode="eq">
      <string>Courier New</string>
   </test>
   <edit name="family" mode="prepend">
      <string>monospace</string>
   </edit>
</match>
<match target="pattern">
   <test name="family" mode="eq">
      <string>Courier</string>
   </test>
   <edit name="family" mode="prepend">
      <string>monospace</string>
   </edit>
</match>

</fontconfig>
camelotmsl
 
Posts: 1
Joined: Mon Sep 10, 2012 7:44 pm

Re: enable libass

Postby sylvioruiz » Sun Mar 03, 2013 6:02 pm

The config file above has a little mistake, the "mode" attribute for the "test" tags must be replaced by "compare", otherwise you will receive messages like these:

Fontconfig error: line 12: invalid attribute 'mode'
Fontconfig error: Cannot load default config file

Then ...
[Parsed_ass_0 @ 02638340] No usable fontconfig configuration file found, using fallback.

:D The text below replaces the previous :

<?xml version="1.0"?>
<fontconfig>

<dir>C:\WINDOWS\Fonts</dir>

<match target="pattern">
<test qual="any" name="family"><string>mono</string></test>
<edit name="family" mode="assign"><string>monospace</string></edit>
</match>

<match target="pattern">
<test qual="all" name="family" compare="not_eq"><string>sans-serif</string></test>
<test qual="all" name="family" compare="not_eq"><string>serif</string></test>
<test qual="all" name="family" compare="not_eq"><string>monospace</string></test>
<edit name="family" mode="append_last"><string>sans-serif</string></edit>
</match>

<alias>
<family>Times</family>
<prefer><family>Times New Roman</family></prefer>
<default><family>serif</family></default>
</alias>
<alias>
<family>Helvetica</family>
<prefer><family>Arial</family></prefer>
<default><family>sans</family></default>
</alias>
<alias>
<family>Courier</family>
<prefer><family>Courier New</family></prefer>
<default><family>monospace</family></default>
</alias>
<alias>
<family>serif</family>
<prefer><family>Times New Roman</family></prefer>
</alias>
<alias>
<family>sans</family>
<prefer><family>Arial</family></prefer>
</alias>
<alias>
<family>monospace</family>
<prefer><family>Andale Mono</family></prefer>
</alias>
<match target="pattern">
<test name="family" compare="eq">
<string>Courier New</string>
</test>
<edit name="family" mode="prepend">
<string>monospace</string>
</edit>
</match>
<match target="pattern">
<test name="family" compare="eq">
<string>Courier</string>
</test>
<edit name="family" mode="prepend">
<string>monospace</string>
</edit>
</match>

</fontconfig>
sylvioruiz
 
Posts: 1
Joined: Sun Mar 03, 2013 5:53 pm

Re: enable libass

Postby rogerdpack » Mon Mar 25, 2013 1:08 pm

what is a burek build?
rogerdpack
 
Posts: 1455
Joined: Fri Aug 05, 2011 9:56 pm

Re: enable libass

Postby Mad0987M » Sat Apr 13, 2013 1:41 pm

I tried all the above configuration file, and setting environment variables too, but none of them work on my XP OS receiving error message "No usable fontconfig configuration file found, using fallback"

At the moment I have to use a long conversion procedure, involving:

1) splitting video and audio from my source video, through ffmpeg (converting them as needed);
2) hardcoding video and sub, through mencoder (I have an old copy of it);
3) converting hardsubbed video and muxing with audio, through ffmpeg (just copying video results in black output)

This way I get a lowered quality video (three times conversion) plus about a 3.5 time consumption ratio instead of 1.

If somebody can really help me I can post commandline, and outputs, and a sample of one of my .ssa files

I'm using one of the last static build of ffmpeg 32bit
Mad0987M
 
Posts: 4
Joined: Sat Apr 13, 2013 1:20 pm

Re: enable libass

Postby nille02 » Sat Apr 13, 2013 4:06 pm

I have set the Environment variables as an System variable. Try open an command Promt and Enter "set" without " then you should see all Varables and the Important both.
Code: Select all
FC_CONFIG_DIR=F:\Work Area\WorkArea\ffmpeg64\bin\fonts
FC_CONFIG_FILE=F:\Work Area\WorkArea\ffmpeg64\bin\fonts\fonts.conf


You can also create an batch File an set these Variables manual.

Again this is my Config File.
Code: Select all
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/fonts.conf file to configure system font access -->
<fontconfig>

<!--
   DO NOT EDIT THIS FILE.
   IT WILL BE REPLACED WHEN FONTCONFIG IS UPDATED.
   LOCAL CHANGES BELONG IN 'local.conf'.

   The intent of this standard configuration file is to be adequate for
   most environments.  If you have a reasonably normal environment and
   have found problems with this configuration, they are probably
   things that others will also want fixed.  Please submit any
   problems to the fontconfig bugzilla system located at fontconfig.org

   Note that the normal 'make install' procedure for fontconfig is to
   replace any existing fonts.conf file with the new version.  Place
   any local customizations in local.conf which this file references.

   Keith Packard
-->

<!-- Font directory list -->

   <dir>./</dir>
   <dir>WINDOWSFONTDIR</dir>
   <dir>~/.fonts</dir>

<!--
  Accept deprecated 'mono' alias, replacing it with 'monospace'
-->
   <match target="pattern">
      <test qual="any" name="family">
         <string>mono</string>
      </test>
      <edit name="family" mode="assign">
         <string>monospace</string>
      </edit>
   </match>

<!--
  Accept alternate 'sans serif' spelling, replacing it with 'sans-serif'
-->
   <match target="pattern">
      <test qual="any" name="family">
         <string>sans serif</string>
      </test>
      <edit name="family" mode="assign">
         <string>sans-serif</string>
      </edit>
   </match>

<!--
  Accept deprecated 'sans' alias, replacing it with 'sans-serif'
-->
   <match target="pattern">
      <test qual="any" name="family">
         <string>sans</string>
      </test>
      <edit name="family" mode="assign">
         <string>sans-serif</string>
      </edit>
   </match>

<!--
  Load local system customization file
-->
   <include ignore_missing="yes">conf.d</include>

<!-- Font cache directory list -->

   <cachedir>WINDOWSTEMPDIR_FONTCONFIG_CACHE</cachedir>
   <cachedir>~/.fontconfig</cachedir>

   <config>
<!--
  These are the default Unicode chars that are expected to be blank
  in fonts.  All other blank chars are assumed to be broken and
  won't appear in the resulting charsets
 -->
      <blank>
         <int>0x0020</int>   <!-- SPACE -->
         <int>0x00A0</int>   <!-- NO-BREAK SPACE -->
         <int>0x00AD</int>   <!-- SOFT HYPHEN -->
         <int>0x034F</int>   <!-- COMBINING GRAPHEME JOINER -->
         <int>0x0600</int>   <!-- ARABIC NUMBER SIGN -->
         <int>0x0601</int>   <!-- ARABIC SIGN SANAH -->
         <int>0x0602</int>   <!-- ARABIC FOOTNOTE MARKER -->
         <int>0x0603</int>   <!-- ARABIC SIGN SAFHA -->
         <int>0x06DD</int>   <!-- ARABIC END OF AYAH -->
         <int>0x070F</int>   <!-- SYRIAC ABBREVIATION MARK -->
         <int>0x115F</int>   <!-- HANGUL CHOSEONG FILLER -->
         <int>0x1160</int>   <!-- HANGUL JUNGSEONG FILLER -->
         <int>0x1680</int>   <!-- OGHAM SPACE MARK -->
         <int>0x17B4</int>   <!-- KHMER VOWEL INHERENT AQ -->
         <int>0x17B5</int>   <!-- KHMER VOWEL INHERENT AA -->
         <int>0x180E</int>   <!-- MONGOLIAN VOWEL SEPARATOR -->
         <int>0x2000</int>   <!-- EN QUAD -->
         <int>0x2001</int>   <!-- EM QUAD -->
         <int>0x2002</int>   <!-- EN SPACE -->
         <int>0x2003</int>   <!-- EM SPACE -->
         <int>0x2004</int>   <!-- THREE-PER-EM SPACE -->
         <int>0x2005</int>   <!-- FOUR-PER-EM SPACE -->
         <int>0x2006</int>   <!-- SIX-PER-EM SPACE -->
         <int>0x2007</int>   <!-- FIGURE SPACE -->
         <int>0x2008</int>   <!-- PUNCTUATION SPACE -->
         <int>0x2009</int>   <!-- THIN SPACE -->
         <int>0x200A</int>   <!-- HAIR SPACE -->
         <int>0x200B</int>   <!-- ZERO WIDTH SPACE -->
         <int>0x200C</int>   <!-- ZERO WIDTH NON-JOINER -->
         <int>0x200D</int>   <!-- ZERO WIDTH JOINER -->
         <int>0x200E</int>   <!-- LEFT-TO-RIGHT MARK -->
         <int>0x200F</int>   <!-- RIGHT-TO-LEFT MARK -->
         <int>0x2028</int>   <!-- LINE SEPARATOR -->
         <int>0x2029</int>   <!-- PARAGRAPH SEPARATOR -->
         <int>0x202A</int>   <!-- LEFT-TO-RIGHT EMBEDDING -->
         <int>0x202B</int>   <!-- RIGHT-TO-LEFT EMBEDDING -->
         <int>0x202C</int>   <!-- POP DIRECTIONAL FORMATTING -->
         <int>0x202D</int>   <!-- LEFT-TO-RIGHT OVERRIDE -->
         <int>0x202E</int>   <!-- RIGHT-TO-LEFT OVERRIDE -->
         <int>0x202F</int>   <!-- NARROW NO-BREAK SPACE -->
         <int>0x205F</int>   <!-- MEDIUM MATHEMATICAL SPACE -->
         <int>0x2060</int>   <!-- WORD JOINER -->
         <int>0x2061</int>   <!-- FUNCTION APPLICATION -->
         <int>0x2062</int>   <!-- INVISIBLE TIMES -->
         <int>0x2063</int>   <!-- INVISIBLE SEPARATOR -->
         <int>0x206A</int>   <!-- INHIBIT SYMMETRIC SWAPPING -->
         <int>0x206B</int>   <!-- ACTIVATE SYMMETRIC SWAPPING -->
         <int>0x206C</int>   <!-- INHIBIT ARABIC FORM SHAPING -->
         <int>0x206D</int>   <!-- ACTIVATE ARABIC FORM SHAPING -->
         <int>0x206E</int>   <!-- NATIONAL DIGIT SHAPES -->
         <int>0x206F</int>   <!-- NOMINAL DIGIT SHAPES -->
         <int>0x2800</int>   <!-- BRAILLE PATTERN BLANK -->
         <int>0x3000</int>   <!-- IDEOGRAPHIC SPACE -->
         <int>0x3164</int>   <!-- HANGUL FILLER -->
         <int>0xFEFF</int>   <!-- ZERO WIDTH NO-BREAK SPACE -->
         <int>0xFFA0</int>   <!-- HALFWIDTH HANGUL FILLER -->
         <int>0xFFF9</int>   <!-- INTERLINEAR ANNOTATION ANCHOR -->
         <int>0xFFFA</int>   <!-- INTERLINEAR ANNOTATION SEPARATOR -->
         <int>0xFFFB</int>   <!-- INTERLINEAR ANNOTATION TERMINATOR -->
      </blank>
<!--
  Rescan configuration every 30 seconds when FcFontSetList is called
 -->
      <rescan>
         <int>30</int>
      </rescan>
   </config>

</fontconfig>
nille02
 
Posts: 23
Joined: Tue Aug 14, 2012 3:47 pm

Re: enable libass

Postby Mad0987M » Sun Apr 14, 2013 1:03 am

Nille,
I put my variables in a batchfile:
Code: Select all
set FC_CONFIG_DIR=Q:\Film\Conv
set FC_CONFIG_FILE=Q:\Film\Conv\fonts3.conf

I ran "set" and those variables were present

I copied the contents of YOUR config file and saved as "fonts3.conf"

My dir "Q:\Film\Conv" contains FFmpeg.exe (static build)

I ran the following command:
Code: Select all
ffmpeg -i "Video_SeasonEpisode.mp4" -map 0:1 -vcodec mpeg2video -f vob -filter:v "pad=720:548:0:72:000000,scale=640:480,ass=VideoSeasonEpisode.ssa" -aspect 4:3 -q:v 4 -map 0:0 -acodec mp2 -ac 2 -ar 48000 -ab 192k "Video_SeasonEpisode.mpg"


I get the following specific messages:
...
Fontconfig error: Cannot load default config file
[Parsed_ass_2 @ 003f42c0] No usable fontconfig configuration file found, using fallback.
Fontconfig error: Cannot load default config file
[Parsed_ass_2 @ 003f42c0] Added subtitle file: 'VideoSeasonEpisode.ssa' (8 styles, 685 events)
...


Then follows usual processing message.
The resulting file got converted, but NO subtitles at all

I tried also the following command:
Code: Select all
ffmpeg -i "Video_SeasonEpisode.mp4" -map 0:1 -vcodec mpeg2video -f vob -filter:v "ass=VideoSeasonEpisode.ssa" -aspect 4:3 -q:v 4 Video.mpg


And obtained the very same error messages, file converted, and again NO subtitles at all.

I really don't know what to think.
Mad0987M
 
Posts: 4
Joined: Sat Apr 13, 2013 1:20 pm

Re: enable libass

Postby nille02 » Sun Apr 14, 2013 5:58 am

create in the conv Folder and folder called fonts and move the config file to this and rename the config file from fonts3.conf to fonts.conf i Dont know why but ffmpeg/fontconfig want this on a way like this or it didnt work.

Code: Select all
F:\Work Area\WorkArea\ffmpeg64\bin
12.04.2013 23:01:40 A-----         23.942.144  ffmpeg.exe
12.04.2013 23:01:40 A-----         23.876.096  ffplay.exe
12.04.2013 23:01:40 A-----         23.883.264  ffprobe.exe
14.04.2013 07:56:50 -D----                     fonts
                          ------------------- 
                                   71.980.563  4 Dateien

F:\Work Area\WorkArea\ffmpeg64\bin\fonts
23.08.2012 19:30:06 A-----              5.311  fonts.conf
                          ------------------- 
                                        5.311  1 Dateien

nille02
 
Posts: 23
Joined: Tue Aug 14, 2012 3:47 pm

PreviousNext

Return to Builds Suggestions

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest