<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../../general.ent">
  %general-entities;

  <!ENTITY faac-download-http "&sourceforge-repo;/faac/faac-&faac-version;.tar.bz2">
  <!ENTITY faac-download-ftp  " ">
  <!ENTITY faac-md5sum        "c5dde68840cefe46532089c9392d1df0">
  <!ENTITY faac-size          "519 KB">
  <!ENTITY faac-buildsize     "20 MB">
  <!ENTITY faac-time          "0.4 SBU">
]>

<sect1 id="faac" xreflabel="FAAC-&faac-version;">
  <?dbhtml filename="faac.html"?>

  <sect1info>
    <othername>$LastChangedBy: bdubbs $</othername>
    <date>$Date: 2015-02-23 00:16:54 -0500 (Mon, 23 Feb 2015) $</date>
  </sect1info>

  <title>FAAC-&faac-version;</title>

  <indexterm zone="faac">
    <primary sortas="a-faac">faac</primary>
  </indexterm>

  <sect2 role="package">
    <title>Introduction to FAAC</title>

    <para><application>FAAC</application> is an encoder for a lossy sound
    compression scheme specified in MPEG-2 Part 7 and MPEG-4 Part 3 standards
    and known as Advanced Audio Coding (AAC). This encoder is useful for
    producing files that can be played back on iPod. Moreover, iPod does not
    understand other sound compression schemes in video files.</para>

    &lfs77_checked;

    <bridgehead renderas="sect3">Package Information</bridgehead>
    <itemizedlist spacing="compact">
      <listitem>
        <para>Download (HTTP): <ulink url="&faac-download-http;"/></para>
      </listitem>
      <listitem>
        <para>Download (FTP): <ulink url="&faac-download-ftp;"/></para>
      </listitem>
      <listitem>
        <para>Download MD5 sum: &faac-md5sum;</para>
      </listitem>
      <listitem>
        <para>Download size: &faac-size;</para>
      </listitem>
      <listitem>
        <para>Estimated disk space required: &faac-buildsize;</para>
      </listitem>
      <listitem>
        <para>Estimated build time: &faac-time;</para>
      </listitem>
    </itemizedlist>

    <bridgehead renderas="sect3">Additional Downloads</bridgehead>
    <itemizedlist spacing="compact">
      <listitem>
        <para>Required patch: <ulink
        url="&patch-root;/faac-&faac-version;-glibc_fixes-1.patch"/></para>
      </listitem>
    </itemizedlist>

    <bridgehead renderas="sect3">FAAC Dependencies</bridgehead>

    <bridgehead renderas="sect4">Optional</bridgehead>
    <para>libmp4v2 from
    <ulink url="http://mpeg4ip.sourceforge.net/">mpeg4ip</ulink> (untested,
    as of 2007-09-28, development of the project is stopped;
    an internal version of the library is used if the external one
    is not found).</para>

    <para condition="html" role="usernotes">User Notes:
    <ulink url="&blfs-wiki;/faac"/></para>

  </sect2>

  <sect2 role="installation">
    <title>Installation of FAAC</title>

    <para>Install <application>FAAC</application> by running the
    following commands:</para>

<screen><userinput>patch -Np1 -i ../faac-&faac-version;-glibc_fixes-1.patch &amp;&amp;
sed -i -e '/obj-type/d' -e '/Long Term/d' frontend/main.c &amp;&amp;
./configure --prefix=/usr --disable-static &amp;&amp;
make</userinput></screen>

    <para>This package does not come with a test suite. However, basic
    functionality can be tested by encoding a sample WAV file (the sample
    file is installed by the <xref linkend="alsa-utils"/> package:</para>

<screen><userinput>./frontend/faac -o Front_Left.mp4 /usr/share/sounds/alsa/Front_Left.wav</userinput></screen>

    <para>Then, decode the result using the <command>faad</command> program
    from the <xref linkend="faad2"/> package and play back the decoded file
    (requires the <command>aplay</command> program from the
    <xref linkend="alsa-utils"/> package:</para>

<screen><userinput>faad Front_Left.mp4
aplay Front_Left.wav</userinput></screen>

    <para><command>aplay</command> should identify the file as
    <quote>Signed 16 bit Little Endian, Rate 48000 Hz, Stereo</quote>, and you
    should hear the words <quote>front left</quote>.</para>

    <para>Now, as the <systemitem class="username">root</systemitem> user:</para>

<screen role="root"><userinput>make install</userinput></screen>

  </sect2>

  <sect2 role="commands">
    <title>Command Explanations</title>

    <!-- <para><command>./bootstrap</command>: This command runs GNU Autotools
    to create the <command>configure</command> script and other required
    build files.</para> -->

    <!-- Note to editors: remove this sed if the new release re-enables the
     option (look for "#if 0" near "case OBJTYPE_FLAG:", this is line
     697 in frontend/main.c as of FAAC-1.26) or fixes the documentation
     so that it doesn't mention the disabled option. -->

    <para><command>sed -i ...</command>: This command removes documentation
    for the <option>--obj-type</option> parameter from the
    <command>faac --long-help</command> command output. This parameter
    is already disabled in FAAC-&faac-version; due to sound quality issues
    with object types other than <quote>Low Complexity</quote>.</para>

    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
      href="../../xincludes/static-libraries.xml"/>

    <!-- 1.28: This is still broken, it causes a segfault. -->

    <para><option>--enable-drm</option>: This option is supposed to enable
    support for encoding files for
    <ulink url="http://www.drm.org/">Digital Radio Mondiale</ulink>, but
    actually breaks the base functionality of the package (e.g., the resulting
    <command>faac</command> program produces files that cannot be decoded
    by <xref linkend="faad2"/>, even if compiled with DRM support).
    Don't use it.</para>

  </sect2>

  <sect2>
    <title>Other AAC encoders</title>

    <para>The quality of <application>FAAC</application> is not up
    to par with the best AAC encoders currently available. Also, it only
    supports AAC and not High Efficiency AAC (also known as aacPlus), which
    provides better quality at low bitrates by means of using the
    <quote>spectral band replication</quote> technology. There are the
    following alternative programs for producing AAC and HE-AAC streams:</para>

    <itemizedlist>
      <listitem>
        <para><ulink url="http://www.nero.com/eng/nero-aac-codec.html">Nero AAC Codec</ulink>:
        available only in the binary form, the command-line AAC and HE-AAC encoders
        for Linux are in the same archive as the Windows application.</para>
      </listitem>
      <listitem>
        <para><ulink url="http://www.3gpp.org/ftp/Specs/html-info/26410.htm">3GPP
        Enhanced aacPlus general audio codec</ulink>:
        available in the source form, can encode only HE-AAC up to 48 kbps
        out of the box, but the maximum bitrate can be changed by editing
        the tuning table in the
        <filename>FloatFR_sbrenclib/src/sbr_main.c</filename> file.</para>
      </listitem>
    </itemizedlist>

    <para>Note, however, that iPod supports only Low Complexity AAC profile,
    which is the default in FAAC, but may not be the default in Nero AAC Encoder
    and is completely unavailable in the 3GPP encoder.</para>

  </sect2>
  <sect2 role="content">
    <title>Contents</title>

    <segmentedlist>
      <segtitle>Installed Program</segtitle>
      <segtitle>Installed Libraries</segtitle>
      <segtitle>Installed Directories</segtitle>

      <seglistitem>
        <seg>faac</seg>
        <seg>libfaac.so and libmp4v2.so</seg>
        <seg>None</seg>
      </seglistitem>
    </segmentedlist>

    <variablelist>
      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
      <?dbfo list-presentation="list"?>
      <?dbhtml list-presentation="table"?>

      <varlistentry id="faac-prog">
        <term><command>faac</command></term>
        <listitem>
          <para>is a command-line AAC encoder.</para>
          <indexterm zone="faac faac-prog">
            <primary sortas="b-faac">faac</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="libfaac">
        <term><filename class='libraryfile'>libfaac.so</filename></term>
        <listitem>
          <para>contains functions for encoding AAC streams.</para>
          <indexterm zone="faac libfaac">
            <primary sortas="c-libfaac">libfaac.so</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="libmp4v2">
        <term><filename class='libraryfile'>libmp4v2.so</filename></term>
        <listitem>
          <para>contains functions for creating and manipulating MP4 files.</para>
          <indexterm zone="faac libmp4v2">
            <primary sortas="c-libmp4v2">libmp4v2.so</primary>
          </indexterm>
        </listitem>
      </varlistentry>

    </variablelist>

  </sect2>

</sect1>
