# Trouble Building ffmpeg with certain things enabled



## tkoham (Apr 13, 2017)

Hi, I'm new to FreeBSD, and I'm trying to build ffmpeg with the following options enabled:

       --enable-gpl
       --enable-postproc
       --enable-swscale
       --enable-avfilter
       --enable-libmp3lame
       --enable-libvorbis
       --enable-libtheora
       --enable-libx264
       --enable-libspeex
       --enable-shared
       --enable-pthreads
       --enable-libopenjpeg
       --enable-libfaac
       --enable-nonfree

some of these are available in the make config prompt, others are not. I'm not very familiar with the makefile system, is it possible to add these flags somehow to the port? if so, how would I go about it?

any info you can provide is appreciated.

I put together a script to check if the flags are enabled after building, and the default one from pkg only has a few enabled. The reason I need these is to build and install butterflow.

the default one in pkg only has

--enable-swscale 
--enable-libspeex
--enable-libopenjpeg
--enable-libfaac

would I be better off enabling linux compat and trying to install it that way?


----------



## SirDice (Apr 13, 2017)

tkoham said:


> I'm not very familiar with the makefile system, is it possible to add these flags somehow to the port? if so, how would I go about it?


Porter's Handbook: 5.12. Makefile Options


----------



## tkoham (Apr 13, 2017)

SirDice said:


> Porter's Handbook: 5.12. Makefile Options


So it should be as simple as adding something like:

```
CONFIGURE_ARGS+=--prefix="${PREFIX}" \
     --mandir="${PREFIX}/man" \
     --datadir="${DATADIR}" \
     --pkgconfigdir="${PREFIX}/libdata/pkgconfig" \
     --enable-shared \
     --enable-pic \
     --enable-gpl \
     --enable-postproc \
     --enable-avfilter \
     --enable-avresample \
     --enable-pthreads \
     --enable-swscale \
     --enable-libmp3lame \
     --enable-libvorbis \
     --enable-libtheora \
     --enable-libx264 \
     --enable-libspeex \
     --enable-shared \
     --enable-pthreads \
     --enable-libopenjpeg \
     --enable-libfaac \
     --enable-nonfree \
     --cc="${CC}"
```

to the Makefile?


----------



## talsamon (Apr 13, 2017)

If I look in the Makefile,  most of the are enabled:

```
CONFIGURE_ARGS+=--prefix="${PREFIX}" \
                --mandir="${PREFIX}/man" \
                --datadir="${DATADIR}" \
                --pkgconfigdir="${PREFIX}/libdata/pkgconfig" \
                --enable-shared \
                --enable-pic \
                --enable-gpl \
                --enable-postproc \
                --enable-avfilter \
                --enable-avresample \
                --enable-pthreads \
                --cc="${CC}"
```

or has options (except `faac` and `swscale`).


----------



## tkoham (Apr 13, 2017)

Thanks! OK, so building with --enable-swscale works fine, but throws an error at --enable-libfaac, saying it's unrecognized. the flag works on linux though.

when I try to run ./configure --help to see if the option has been changed or is even present, I get

./configure: command not found​what am I doing wrong?


----------



## SirDice (Apr 13, 2017)

Are you trying to build from source or are you using the port?


----------



## tkoham (Apr 13, 2017)

SirDice said:


> Are you trying to build from source or are you using the port?



Using the port, I just want to add 2 options not found in `make config` to the build, specifically --enable-libfaac and --enable-swscale. One works fine, the other is throwing an error and `./configure --help` isn't working.


----------



## talsamon (Apr 13, 2017)

There is no option `--enable-libfaac`. I think AAC is handled by `--enable-libfdk-aac`. And this one has an option.
`./configure --help` works. Has you changed to work/ffmpeg-3.2.4/ directory?


----------



## SirDice (Apr 13, 2017)

It looks like libfaac has been deprecated quite a while ago: http://git.videolan.org/?p=ffmpeg.git;a=commit;h=dc0f711459e0c682bf9f94ba38d26736e90cff45


----------



## talsamon (Apr 13, 2017)

Ok, thanks. Should removed as option.


----------



## tkoham (Apr 13, 2017)

SirDice said:


> Are you trying to build from source or are you using the port?



Using the port, I just want to add 2 options not found in *make config *to the build, specifically --enable-libfaac and --enable-swscale


----------



## tkoham (Apr 13, 2017)

Thanks for all the help, I'm well on the way to porting butterflow if anyone's interested by the way


----------

