# ffmpeg with lame(mp3) enabled?



## i-bsd (Aug 5, 2018)

I'm using binary packages (not ports) and the default ffmpeg has lame disabled so I can't work with mp3's.

I tried compiling ffmpeg in poudriere with lame enabled, then reinstall from the poudriere repo but lame is still disabled for some unknown reason.

Can anyone explain how to get this working? I really wish lame was default enabled.


----------



## jrm@ (Aug 5, 2018)

i-bsd said:


> I really wish lame was default enabled.


It's not enabled by default due to fear of legal consequences if we distribute pre-built packages of audio/lame.  This _may_ change soon.


----------



## Bobi B. (Aug 5, 2018)

You can enable lame if you cd(1) in /usr/ports/multimedia/ffmpeg and execute `make config`, `make package`.

No experience with Poudriere, tho.


----------



## i-bsd (Aug 5, 2018)

But then it ends up compiling all of ffmpeg's dependencies (a lot of them) so won't that cause problems for me having a mixture of binary packages and compiled dependencies on my system?


----------



## jrm@ (Aug 5, 2018)

Fwiw, poudriere building multimeda/ffmpeg with the lame on works here.

```
% pkg info ffmpeg-4.0.2_1,1| grep -i lame
        LAME           : on
        TWOLAME        : off
        libmp3lame.so.0
```
Does `pkg -vv` have anything useful to say?  How about `pkg rquery %Ok=%Ov ffmpeg | grep -i lame`?


----------



## Minbari (Aug 5, 2018)

> *ffmpeg with lame(mp3) enabled?*



Not by default and definitely not in the precompiled pkgs. If you use only binary packages I strongly recommend not to mix those packages with ports. Set up poudriere and build your own packages, otherwise if you use ports it's simple: just enable the mp3 support from ffmped config file.


----------



## Bobi B. (Aug 5, 2018)

i-bsd said:


> But then it ends up compiling all of ffmpeg's dependencies (a lot of them) so won't that cause problems for me having a mixture of binary packages and compiled dependencies on my system?


Depends. When I deal with packages, needing custom configuration, I do `make build-depends-list` and `make run-depends-list`, then install all dependent packages from the repository, then do `make package`. This way resulting package will depend on binary packages from the repository, not the ones in ports, which are usually newer (default repo is `quarterly`). It all depends on where do you plan to ship your ffmpeg.

Oh, and in such case don't forget to `pkg lock ffmpeg`, or sooner or later your package will be replaced with the one from repo.


----------



## i-bsd (Aug 5, 2018)

Interesting.

What's the difference between and output of 
	
	



```
build-depends-list
```
 and 
	
	



```
run-depends-list
```
? Do you just end up with a list of package names?


----------



## Bobi B. (Aug 5, 2018)

`make build-depends-list` lists what you need to build this port, whereas `make run-depends-list` lists what you need to use this port; for example some ports need perl or python to be built, but not to be ran, not to mention `gmake`, `gcc`, etc.


----------



## choppy812 (Aug 3, 2019)

Bobi B. said:


> Depends. When I deal with packages, needing custom configuration, I do `make build-depends-list` and `make run-depends-list`, then install all dependent packages from the repository, then do `make package`. This way resulting package will depend on binary packages from the repository, not the ones in ports, which are usually newer (default repo is `quarterly`). It all depends on where do you plan to ship your ffmpeg.
> 
> Oh, and in such case don't forget to `pkg lock ffmpeg`, or sooner or later your package will be replaced with the one from repo.



Maybe I'm missing the obvious... how do I install the package after 'make package'? There's a.txz file in the /usr/ports/multimedia/ffmpeg/work/pkg directory now. Do I just run 'pkg ./ffmpg' ?

Also, does it matter if I 'pkg lock ffmpeg' before or after 'pkg install ffmpeg'? (assuming I run the regular pkg tool to install the custom package).
Thanks.


----------



## badbrain (Aug 3, 2019)

choppy812 said:


> Maybe I'm missing the obvious... how do I install the package after 'make package'? There's a.txz file in the /usr/ports/multimedia/ffmpeg/work/pkg directory now. Do I just run 'pkg ./ffmpg' ?
> 
> Also, does it matter if I 'pkg lock ffmpeg' before or after 'pkg install ffmpeg'? (assuming I run the regular pkg tool to install the custom package).
> Thanks.


I think you need `pkg add`, not `pkg install` since the later will fetch the packages from remote source. After the packages were installed, you can lock it, obviously


----------

