Go to file
nu774 c5eec15549 prepend 1 sample zero padding in case of SBR and enc_delay is odd
This is required because odd enc_delay cannot be exactly expressed in
downsampled scale, and HE-AACv2 FDK encoder actually has odd enc_delay.
2013-10-30 02:09:23 +09:00
MSVC smart padding for better gapless playback 2013-10-30 02:09:08 +09:00
m4 initial commit 2013-01-05 01:10:05 +09:00
missings initial commit 2013-01-05 01:10:05 +09:00
src prepend 1 sample zero padding in case of SBR and enc_delay is odd 2013-10-30 02:09:23 +09:00
.gitattributes add .gitattributes 2013-01-06 18:25:49 +09:00
AUTHORS initial commit 2013-01-05 01:10:05 +09:00
COPYING initial commit 2013-01-05 01:10:05 +09:00
ChangeLog update ChangeLog 2013-10-25 00:09:27 +09:00
INSTALL initial commit 2013-01-05 01:10:05 +09:00
Makefile.am smart padding for better gapless playback 2013-10-30 02:09:08 +09:00
NEWS initial commit 2013-01-05 01:10:05 +09:00
README update README 2013-10-25 00:02:23 +09:00
config.rpath initial commit 2013-01-05 01:10:05 +09:00
configure.ac use fseeko64() on i686-pc-mingw32 2013-02-20 10:29:12 +09:00
git2changelog.py update ChangeLog and git2changelog.py 2013-10-19 12:54:50 +09:00
version.h bump version 2013-10-27 22:43:18 +09:00

README

==========================================================================
fdkaac - command line frontend encoder for libfdk-aac
==========================================================================

Prerequisites
-------------
You need libfdk-aac.
On Posix environment, you will also need GNU gettext (for iconv.m4) and
GNU autoconf/automake.

How to build on Posix environment
---------------------------------
First, you need to build libfdk-aac and install on your system.
Once you have done it, the following will do the task.
(MinGW build can be done the same way, and doesn't require gettext/iconv)

$ autoreconf -i
$ ./configure && make && make install

How to build on MSVC
--------------------
First you have to extract libfdk-aac source here, so that directory tree will
look like the following:
+- fdk-aac ---+-documentation
|             +-libAACdec
|             +-libAACenc
|             :
+- m4
+- missings
+- MSVC
+- src

MSVC solution for Visual Studio 2010 is under MSVC directory.

Available input format
----------------------
WAV, RF64, CAF, RAW, upto 32bit int / 64bit float format is supported.
Metadata in CAF info chunk can be read and copied to the resulting m4a.
This is especially useful and works well when you pipe from ffmpeg via CAF.
For example, you can copy tag from original "foo.flac" to "foo.m4a"
through the following pipeline:

$ ffmpeg -i foo.flac -f caf - | fdkaac -m3 - -o foo.m4a

Since FDK AAC encoder is implemented based on fixed point integer,
encoder itself handles 16bit input only.
Therefore, when feeding non-integer input, be careful so that input doesn't
exceed 0dBFS to avoid hard clips.
You might also want to apply dither/noise shape beforehand when your input
has higher resolution.

Note that fdkaac doesn't automatically resample for you
when input samplerate is not supported by AAC spec.

Tagging Options
---------------
Generic tagging options like --tag, --tag-from-file, --long-tag allows you
to set arbitrary tags.
Available tags and their fcc (four char code) for --tag and --tag-from-file
can be found at http://code.google.com/p/mp4v2/wiki/iTunesMetadata

For tags such as Artist where first char of fcc is copyright sign,
you can skip first char and just say like --tag="ART:Foo Bar" or
--tag-from-file=lyr:/path/to/your/lyrics.txt

Currently, --tag-from-file just stores file contents into m4a without any
character encoding / line terminater conversion.
Therefore, only use UTF-8 (without BOM) when setting text tags by this option.

On the other hand, --tag / --long-tag (and other command line arguments) are
converted from locale character encoding to UTF-8 on Posix environment.
On Windows, command line arguments are always treated as Unicode.

Tagging using JSON
------------------
With --tag-from-json, fdkaac can read JSON file and set tags from it.
By default, tags are assumed to be in the root object(dictionary) like this:

{
  "title": "No Expectations",
  "artist": "The Rolling Stones",
  "album": "Beggars Banquet",
  "track": 2
}

In this case, you can simply specify the filename like:
--tag-from-json=/path/to/json

If the object containing tags is placed somewhere else, you can optionally
specify the path of the object with dotted notation.

{
  "format" : {
    "filename" : "Middle Curse.flac",
    "nb_streams" : 1,
    "format_name" : "flac",
    "format_long_name" : "raw FLAC",
    "start_time" : "N/A",
    "duration" : "216.146667",
    "size" : "11851007.000000",
    "bit_rate" : "438628.000000",
    "tags" : {
      "ALBUM" : "Scary World Theory",
      "ARTIST" : "Lali Puna",
      "DATE" : "2001",
      "DISCID" : "9208CC0A",
      "TITLE" : "Middle Curse",
      "TRACKTOTAL" : "10",
      "track" : "2"
    }
  }
}

In this example, tags are placed under the object "format.tags".
("format" is a child of the root, and "tags" is a child of the "format").
In this case, you can say:
--tag-from-json=/path/to/json?format.tags

For your information, ffprobe of ffmpeg project (or avprobe of libav) can
output media information/metadata in json format like this.

Note that not all tags can be read/written this way.