Skip to content

Commit

Permalink
lavc: remove libfaac wrapper
Browse files Browse the repository at this point in the history
There is really no need for two aac wrappers, we already have
libfdk-aac which is better. Not to mention that faac doesn't
even support HEv1, or HEv2. It's also under a license which is
unusable for distribution, so it would only be useful to people
who will compile their own ffmpeg, only use it themselves (which
at that point should just use fdk-aac).

Signed-off-by: Josh de Kock <josh@itanimul.li>
  • Loading branch information
jdek authored and Rostislav Pehlivanov committed Oct 1, 2016
1 parent 449f263 commit dc0f711
Show file tree
Hide file tree
Showing 11 changed files with 6 additions and 368 deletions.
1 change: 1 addition & 0 deletions Changelog
Expand Up @@ -36,6 +36,7 @@ version <next>:
- sdl2 support for ffplay
- sdl1 output device and sdl1 support removed
- extended mov edit list support
- libfaac encoder removed


version 3.1:
Expand Down
2 changes: 0 additions & 2 deletions LICENSE.md
Expand Up @@ -115,8 +115,6 @@ The Fraunhofer FDK AAC and OpenSSL libraries are under licenses which are
incompatible with the GPLv2 and v3. To the best of our knowledge, they are
compatible with the LGPL.

The FAAC library is incompatible with all versions of GPL and LGPL.

The NVENC library, while its header file is licensed under the compatible MIT
license, requires a proprietary binary blob at run time, and is deemed to be
incompatible with the GPL. We are not certain if it is compatible with the
Expand Down
6 changes: 0 additions & 6 deletions configure
Expand Up @@ -225,7 +225,6 @@ External library support:
and libraw1394 [no]
--enable-libebur128 enable libebur128 for EBU R128 measurement,
needed for loudnorm filter [no]
--enable-libfaac enable AAC encoding via libfaac [no]
--enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
--enable-libflite enable flite (voice synthesis) support via libflite [no]
--enable-libfontconfig enable libfontconfig, useful for drawtext filter [no]
Expand Down Expand Up @@ -1488,7 +1487,6 @@ EXTERNAL_LIBRARY_LIST="
libcelt
libdc1394
libebur128
libfaac
libfdk_aac
libflite
libfontconfig
Expand Down Expand Up @@ -2773,8 +2771,6 @@ pcm_mulaw_at_encoder_select="audio_frame_queue"
chromaprint_muxer_deps="chromaprint"
h264_videotoolbox_encoder_deps="videotoolbox_encoder pthreads"
libcelt_decoder_deps="libcelt"
libfaac_encoder_deps="libfaac"
libfaac_encoder_select="audio_frame_queue"
libfdk_aac_decoder_deps="libfdk_aac"
libfdk_aac_encoder_deps="libfdk_aac"
libfdk_aac_encoder_select="audio_frame_queue"
Expand Down Expand Up @@ -5072,7 +5068,6 @@ die_license_disabled gpl x11grab

die_license_disabled nonfree cuda
die_license_disabled nonfree cuvid
die_license_disabled nonfree libfaac
die_license_disabled nonfree libnpp
enabled gpl && die_license_disabled_gpl nonfree libfdk_aac
enabled gpl && die_license_disabled_gpl nonfree openssl
Expand Down Expand Up @@ -5682,7 +5677,6 @@ enabled libcelt && require libcelt celt/celt.h celt_decode -lcelt0 &&
die "ERROR: libcelt must be installed and version must be >= 0.11.0."; }
enabled libcaca && require_pkg_config caca caca.h caca_create_canvas
enabled libebur128 && require ebur128 ebur128.h ebur128_relative_threshold -lebur128
enabled libfaac && require2 libfaac "stdint.h faac.h" faacEncGetVersion -lfaac
enabled libfdk_aac && { use_pkg_config fdk-aac "fdk-aac/aacenc_lib.h" aacEncOpen ||
{ require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac &&
warn "using libfdk without pkg-config"; } }
Expand Down
105 changes: 0 additions & 105 deletions doc/encoders.texi
Expand Up @@ -612,111 +612,6 @@ and slightly improves compression.

@end table

@anchor{libfaac}
@section libfaac

libfaac AAC (Advanced Audio Coding) encoder wrapper.

This encoder is of much lower quality and is more unstable than any other AAC
encoders, so it's highly recommended to instead use other encoders, like
@ref{aacenc,,the native FFmpeg AAC encoder}.

This encoder also requires the presence of the libfaac headers and library
during configuration. You need to explicitly configure the build with
@code{--enable-libfaac --enable-nonfree}.

@subsection Options

The following shared FFmpeg codec options are recognized.

The following options are supported by the libfaac wrapper. The
@command{faac}-equivalent of the options are listed in parentheses.

@table @option
@item b (@emph{-b})
Set bit rate in bits/s for ABR (Average Bit Rate) mode. If the bit rate
is not explicitly specified, it is automatically set to a suitable
value depending on the selected profile. @command{faac} bitrate is
expressed in kilobits/s.

Note that libfaac does not support CBR (Constant Bit Rate) but only
ABR (Average Bit Rate).

If VBR mode is enabled this option is ignored.

@item ar (@emph{-R})
Set audio sampling rate (in Hz).

@item ac (@emph{-c})
Set the number of audio channels.

@item cutoff (@emph{-C})
Set cutoff frequency. If not specified (or explicitly set to 0) it
will use a value automatically computed by the library. Default value
is 0.

@item profile
Set audio profile.

The following profiles are recognized:
@table @samp
@item aac_main
Main AAC (Main)

@item aac_low
Low Complexity AAC (LC)

@item aac_ssr
Scalable Sample Rate (SSR)

@item aac_ltp
Long Term Prediction (LTP)
@end table

If not specified it is set to @samp{aac_low}.

@item flags +qscale
Set constant quality VBR (Variable Bit Rate) mode.

@item global_quality
Set quality in VBR mode as an integer number of lambda units.

Only relevant when VBR mode is enabled with @code{flags +qscale}. The
value is converted to QP units by dividing it by @code{FF_QP2LAMBDA},
and used to set the quality value used by libfaac. A reasonable range
for the option value in QP units is [10-500], the higher the value the
higher the quality.

@item q (@emph{-q})
Enable VBR mode when set to a non-negative value, and set constant
quality value as a double floating point value in QP units.

The value sets the quality value used by libfaac. A reasonable range
for the option value is [10-500], the higher the value the higher the
quality.

This option is valid only using the @command{ffmpeg} command-line
tool. For library interface users, use @option{global_quality}.
@end table

@subsection Examples

@itemize
@item
Use @command{ffmpeg} to convert an audio file to ABR 128 kbps AAC in an M4A (MP4)
container:
@example
ffmpeg -i input.wav -codec:a libfaac -b:a 128k -output.m4a
@end example

@item
Use @command{ffmpeg} to convert an audio file to VBR AAC, using the
LTP AAC profile:
@example
ffmpeg -i input.wav -c:a libfaac -profile:a aac_ltp -q:a 100 output.m4a
@end example
@end itemize

@anchor{libfdk-aac-enc}
@section libfdk_aac

Expand Down
2 changes: 1 addition & 1 deletion doc/ffserver.conf
Expand Up @@ -317,7 +317,7 @@ StartSendOnKey
#AVPresetVideo baseline
#AVOptionVideo flags +global_header
#
#AudioCodec libfaac
#AudioCodec aac
#AudioBitRate 32
#AudioChannels 2
#AudioSampleRate 22050
Expand Down
2 changes: 1 addition & 1 deletion doc/general.texi
Expand Up @@ -887,7 +887,7 @@ following image formats are supported:
@item 8SVX exponential @tab @tab X
@item 8SVX fibonacci @tab @tab X
@item AAC @tab EX @tab X
@tab encoding supported through internal encoder and external libraries libfaac and libfdk-aac
@tab encoding supported through internal encoder and external library libfdk-aac
@item AAC+ @tab E @tab IX
@tab encoding supported through external library libfdk-aac
@item AC-3 @tab IX @tab IX
Expand Down
4 changes: 2 additions & 2 deletions doc/muxers.texi
Expand Up @@ -1437,9 +1437,9 @@ ffmpeg -i in.mkv -codec copy -map 0 -f segment -segment_list out.csv -segment_fr

@item
Convert the @file{in.mkv} to TS segments using the @code{libx264}
and @code{libfaac} encoders:
and @code{aac} encoders:
@example
ffmpeg -i in.mkv -map 0 -codec:v libx264 -codec:a libfaac -f ssegment -segment_list out.list out%03d.ts
ffmpeg -i in.mkv -map 0 -codec:v libx264 -codec:a aac -f ssegment -segment_list out.list out%03d.ts
@end example

@item
Expand Down
2 changes: 1 addition & 1 deletion doc/platform.texi
Expand Up @@ -314,7 +314,7 @@ These library packages are only available from
@uref{http://sourceware.org/cygwinports/, Cygwin Ports}:

@example
yasm, libSDL-devel, libfaac-devel, libgsm-devel, libmp3lame-devel,
yasm, libSDL-devel, libgsm-devel, libmp3lame-devel,
libschroedinger1.0-devel, speex-devel, libtheora-devel, libxvidcore-devel
@end example

Expand Down
1 change: 0 additions & 1 deletion libavcodec/Makefile
Expand Up @@ -862,7 +862,6 @@ OBJS-$(CONFIG_ILBC_AT_ENCODER) += audiotoolboxenc.o
OBJS-$(CONFIG_PCM_ALAW_AT_ENCODER) += audiotoolboxenc.o
OBJS-$(CONFIG_PCM_MULAW_AT_ENCODER) += audiotoolboxenc.o
OBJS-$(CONFIG_LIBCELT_DECODER) += libcelt_dec.o
OBJS-$(CONFIG_LIBFAAC_ENCODER) += libfaac.o
OBJS-$(CONFIG_LIBFDK_AAC_DECODER) += libfdk-aacdec.o
OBJS-$(CONFIG_LIBFDK_AAC_ENCODER) += libfdk-aacenc.o
OBJS-$(CONFIG_LIBGSM_DECODER) += libgsmdec.o
Expand Down
1 change: 0 additions & 1 deletion libavcodec/allcodecs.c
Expand Up @@ -594,7 +594,6 @@ void avcodec_register_all(void)
REGISTER_DECODER(QDMC_AT, qdmc_at);
REGISTER_DECODER(QDM2_AT, qdm2_at);
REGISTER_DECODER(LIBCELT, libcelt);
REGISTER_ENCODER(LIBFAAC, libfaac);
REGISTER_ENCDEC (LIBFDK_AAC, libfdk_aac);
REGISTER_ENCDEC (LIBGSM, libgsm);
REGISTER_ENCDEC (LIBGSM_MS, libgsm_ms);
Expand Down

0 comments on commit dc0f711

Please sign in to comment.