Can't convert to MP4

I'm testing out Nuxeo 5.8 on a Ubuntu VM box, and all is well except conversion to MP4 (WebM works fine).

As soon as it tries to convert to MP4, it dies with “Transcoding Failed”.

Here's what I get in the server log:

2014-06-16 15:06:16,099 ERROR [Nuxeo-Work-videoConversion-1] [org.nuxeo.ecm.core.work.AbstractWork] Exception during work: VideoConversionWork(ccfeb4ac-2a29-4f99-86e6-1aa4c22f53fd, , Progress(?%, ?/0), Transcoding)
org.nuxeo.ecm.core.api.ClientRuntimeException: org.nuxeo.ecm.core.convert.api.ConversionException: Error while converting via CommandLineService
    at org.nuxeo.ecm.platform.video.service.VideoServiceImpl.convert(VideoServiceImpl.java:163)
    at org.nuxeo.ecm.platform.video.service.VideoConversionWork.work(VideoConversionWork.java:100)
    at org.nuxeo.ecm.core.work.WorkHolder.run(WorkHolder.java:65)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
Caused by: org.nuxeo.ecm.core.convert.api.ConversionException: Error while converting via CommandLineService
    at org.nuxeo.ecm.platform.convert.plugins.CommandLineBasedConverter.execOnBlob(CommandLineBasedConverter.java:178)
    at org.nuxeo.ecm.platform.convert.plugins.CommandLineBasedConverter.convert(CommandLineBasedConverter.java:94)
    at org.nuxeo.ecm.core.convert.service.ConversionServiceImpl.convert(ConversionServiceImpl.java:168)
    at org.nuxeo.ecm.platform.video.service.VideoServiceImpl.convert(VideoServiceImpl.java:157)
    ... 5 more
Caused by: org.nuxeo.ecm.platform.commandline.executor.api.CommandException: Error code 1 return by command: /bin/sh -c ffmpeg -i "/var/lib/nuxeo/server/tmp/cmdLineBasedConverter8282258184716835511.mp4" -s "854"x"480" -acodec libfaac -vcodec libx264 -v 0 "/var/lib/nuxeo/server/tmp/convertToMP4_217e5c1c-b2ac-4a95-ae32-42b691ab9f96/videoConversion729483108240418596.mp4"
Unknown encoder 'libfaac'
    at org.nuxeo.ecm.platform.commandline.executor.api.ExecResult.<init>(ExecResult.java:61)
    at org.nuxeo.ecm.platform.commandline.executor.service.executors.ShellExecutor.exec(ShellExecutor.java:98)
    at org.nuxeo.ecm.platform.commandline.executor.service.CommandLineExecutorComponent.execCommand(CommandLineExecutorComponent.java:160)
    at org.nuxeo.ecm.platform.convert.plugins.CommandLineBasedConverter.execOnBlob(CommandLineBasedConverter.java:168)
    ... 8 more

I went as far as compiling FFMPEG from source, thinking that might be the issue.

After trying for a few days, I'm finally come here for help. I'm also a new to linux, so I'm probably doing something wrong?

0 votes

1 answers

3023 views

ANSWER



Hi,

Unknown encoder 'libfaac'

Ubuntu does not supply FFmpeg with libfaac support. So you must compile FFmpeg from sources with --enable-libfaac option.

You can give a try to a custom script we've written:

cd /tmp
git clone https://github.com/nuxeo/ffmpeg-nuxeo
cd ffmpeg-nuxeo
sudo ./build-all.sh true

That script basically follows the instructions from the FFmpeg Compilation Guide for Ubuntu adding a few options like “--enable-libfaac” and “--enable-nonfree“.

I'm updating the related Nuxeo documentation (ADMINDOC/Installing+and+setting+up+related+software).

Regards

1 votes



It worked! This time i added –enable-libfaac and now Nuxeo is converting to mp4 without issues.

Thank you.

06/17/2014