.\" Automatically generated by Pandoc 2.5 .\" .TH "FDKAAC" "1" "November, 2013" "" "" .hy .SH NAME .PP fdkaac \- command line frontend for libfdk\-aac encoder .SH SYNOPSIS .PP \f[B]fdkaac\f[R] OPTIONS [FILE] .SH DESCRIPTION .PP \f[B]fdkaac\f[R] reads linear PCM audio in either WAV, raw PCM, or CAF format, and encodes it into either M4A / AAC file. .PP If the input file is \[lq]\-\[rq], data is read from stdin. Likewise, if the output file is \[lq]\-\[rq], data is written to stdout if one of streamable AAC transport formats are selected by \f[B]\-f\f[R]. .PP When CAF input and M4A output is used, tags in CAF file are copied into the resulting M4A. .SH OPTIONS .TP .B \-h, \[en]help Show command help .TP .B \-o Output filename. .TP .B \-p, \[en]profile Target profile (MPEG4 audio object type, AOT) .RS .TP .B 2 MPEG\-4 AAC LC (default) .TP .B 5 MPEG\-4 HE\-AAC (SBR) .TP .B 29 MPEG\-4 HE\-AAC v2 (SBR+PS) .TP .B 23 MPEG\-4 AAC LD .TP .B 39 MPEG\-4 AAC ELD .RE .TP .B \-b, \[en]bitrate Target bitrate (for CBR) .TP .B \-m, \[en]bitrate\-mode Bitrate configuration mode. Available VBR quality value depends on other parameters such as profile, sample rate, or number of channels. .RS .TP .B 0 CBR (default) .TP .B 1\-5 VBR (higher value \-> higher bitrate) .RE .TP .B \-w, \[en]bandwidth Frequency bandwidth (lowpass cut\-off frequency) in Hz. Available on AAC LC only. .TP .B \-a, \[en]afterburner Configure afterburner mode. When enabled, quality is increased at the expense of additional computational workload. .RS .TP .B 0 Off .TP .B 1 On (default) .RE .TP .B \-L, \[en]lowdelay\-sbr Configure SBR activity on AAC ELD. .RS .TP .B \-1 Use ELD SBR auto configuration .TP .B 0 Disable SBR on ELD (default) .TP .B 1 Enable SBR on ELD .RE .TP .B \-s, \[en]sbr\-ratio Controls activation of downsampled SBR. .RS .TP .B 0 Use lib default (default) .TP .B 1 Use downsampled SBR (default for ELD+SBR) .TP .B 2 Use dual\-rate SBR (default for HE\-AAC) .PP Dual\-rate SBR is what is normally used for HE\-AAC, where AAC is encoded at half the sample rate of SBR, hence \[lq]dual rate\[rq]. On the other hand, downsampled SBR uses same sample rate for both of AAC and SBR (single rate), therefore downsampled SBR typically consumes more bitrate. .PP Downsampled SBR is newly introduced feature in FDK encoder library version 3.4.12. When libfdk\-aac in the system doesn\[cq]t support this, dual\-rate SBR will be used. When available, dual\-rate SBR is the default for HE\-AAC and downsampled SBR is the default for ELD+SBR. .PP Note that downsampled HE\-AAC is not so common as dual\-rate one. When downsampled HE\-AAC is selected, \f[B]fdkaac\f[R] is forced to choose explicit hierarchical SBR signaling, which (at least) iTunes doesn\[cq]t accept. .RE .TP .B \-f, \[en]transport\-format Transport format. Tagging and gapless playback is only available on M4A. Streaming to stdout is only available on others. .RS .TP .B 0 M4A (default) .TP .B 1 ADIF .TP .B 2 ADTS .TP .B 6 LATM MCP=1 .TP .B 7 LATM MCP=0 .TP .B 10 LOAS/LATM (LATM within LOAS) .RE .TP .B \-C, \[en]adts\-crc\-check Add CRC protection on ADTS header. .TP .B \-h, \[en]header\-period StreamMuxConfig/PCE repetition period in the transport layer. .TP .B \-G, \[en]gapless\-mode Method to declare amount of encoder delay (and padding) in M4A container. These values are mandatory for proper gapless playback on player side. .RS .TP .B 0 iTunSMPB (default) .TP .B 1 ISO standard (edts and sgpd) .TP .B 2 Both .RE .TP .B \[en]include\-sbr\-delay When specified, count SBR decoder delay in encoder delay. .RS .PP This is not iTunes compatible and will lead to gapless playback issue on LC only decoder, but this is the default behavior of FDK library. .PP Whether counting SBR decoder delay in encoder delay or not result in incompatibility in gapless playback. You should pick which one will work for your favorite player. .PP However, it\[cq]s better not to choose SBR at all if you want gapless playback. LC doesn\[cq]t have such issues. .RE .TP .B \-I, \[en]ignorelength Ignore length field of data chunk in input WAV file. .TP .B \-S, \[en]silent Don\[cq]t print progress messages. .TP .B \[en]moov\-before\-mdat Place moov box before mdat box in M4A container. This option might be important for some hardware players, that are known to refuse moov box placed after mdat box. .TP .B \-R, \[en]raw Regard input as raw PCM. .TP .B \[en]raw\-channels Specify number of channels of raw input (default: 2) .TP .B \[en]raw\-rate Specify sample rate of raw input (default: 44100) .TP .B \[en]raw\-format Specify sample format of raw input (default: \[lq]S16L\[rq]). \f[B]Spec\f[R] is as the following (case insensitive): .RS .TP .B 1st char \[en] type of sample \f[B]S\f[R] (igned) | \f[B]U\f[R] (nsigned) | \f[B]F\f[R] (loat) .TP .B 2nd part (in digits) bits per channel .TP .B Last char \[en] endianness (can be omitted) \f[B]L\f[R] (ittle, default) | \f[B]B\f[R] (ig) .RE .TP .B \[en]title Set title tag. .TP .B \[en]artist Set artist tag. .TP .B \[en]album Set album tag. .TP .B \[en]genre Set genre tag. .TP .B \[en]date Set date tag. .TP .B \[en]composer Set composer tag. .TP .B \[en]grouping Set grouping tag. .TP .B \[en]comment Set comment tag. .TP .B \[en]album\-artist Set album artist tag. .TP .B \[en]track Set track tag, with or without number of total tracks. .TP .B \[en]disk Set disk tag, with or without number of total discs. .TP .B \[en]tempo Set tempo (BPM) tag. .TP .B \[en]tag : Set iTunes predefined tag with explicit fourcc key and value. See for known predefined keys. You can omit first char of \f[B]fcc\f[R] when it is the copyright sign. .TP .B \[en]tag\-from\-file : Same as \[en]tag, but set content of file as tag value. .TP .B \[en]long\-tag : Set arbitrary tag as iTunes custom metadata. Stored in com.apple.iTunes field. .TP .B \[en]tag\-from\-json Read tags from JSON. By default, tags are assumed to be direct children of the root object in JSON. Optionally you can specify arbitrary dot notation to locate the object containing tags. .SH EXAMPLES .PP Encode WAV file into a M4A file. MPEG4 AAC LC, VBR quality 3: .IP .nf \f[C] fdkaac \-m3 foo.wav \f[R] .fi .PP Encode WAV file into a M4A file. MPEG4 HE\-AAC, bitrate 64kbps: .IP .nf \f[C] fdkaac \-p5 \-b64 foo.wav \f[R] .fi .PP Piping from \f[B]ffmpeg\f[R] (you need version supporting CAF output): .IP .nf \f[C] ffmpeg \-i foo.flac \-f caf \- | fdkaac \-b128 \- \-o foo.m4a \f[R] .fi .PP Import tags via json: .IP .nf \f[C] ffprobe \-v 0 \-of json \-show_format foo.flac >foo.json flac \-dc foo.flac | \[rs] fdkaac \- \-ox.m4a \-m2 \-\-import\-tag\-from\-json=foo.json?format.tags \f[R] .fi .SH NOTES .PP Upto 32bit integer or 64bit floating point format is supported as input. However, FDK library is implemented based on fixed point math and only supports 16bit integer PCM. Therefore, be wary of clipping. You might want to dither/noise shape beforehand when your input has higher resolution. .PP Following channel layouts are supported by the encoder. .TP .B 1ch C .TP .B 2ch L R .TP .B 3ch C L R .TP .B 4ch C L R Cs .TP .B 5ch C L R Ls Rs .TP .B 5.1ch C L R Ls Rs LFE .TP .B 7.1ch (front) C Lc Rc L R Ls Rs LFE .TP .B 7.1ch (rear) C L R Ls Rs Rls Rrs LFE .SH AUTHORS nu774 .