Skip to content
Advertisement

Php-ffmpeg “Unknown encoder libfaac” on Windows

I am using laravel 4.2.

I am working on a project in that user can upload a video and I need to transcode it that it can be played over all kind of devices.

For transcoding I have added php-ffmpeg package from git hub in my project. According to the instructions I have downloaded ffmpeg package from http://ffmpeg.zeranoe.com/builds and set the ffmpeg.exe’s path into the environment variable Path.

Now, I tried code below to transcode an uploaded video :

JavaScript

But it gives error as below :

JavaScript

After searching alot, I found a link for the solution here, with note that

Zeranoe’s ffmpeg does not contain libfaac support due to that encoder requiring –enable-nonfree which would result in a non-redistributable build.

I don’t get the solution. Can anybody help me to overcome this?

Edit: (working code as below)

I have created a CustomVideo class the same like class FFMpegFormatVideoX264() as below:

JavaScript

and updated the code to transcode video as below:

JavaScript

It has solved the Unknown encoder libfaac error.

Advertisement

Answer

The required library is not included due to licensing.

Zeranoe FFmpeg – Why dont the builds include FAAC, FDK-AAC, libaacplus?

These libraries are not compatible with the GPL license and cannot be included without licensing the build as nonfree. A nonfree build cannot be publicly distributed.

You have the following solutions:

  1. Use another audio codec instead of AAC. There’s a LAME MP3 encoder for example.
  2. Compile your own version of FFmpeg adding all the libraries you want See FFmpeg Compilation Guide
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement