| Q | A
| -------------- | ---
| Bug? | yes
| New Feature? | no
| Version Used | 0.8.0
| FFmpeg Version | ffmpeg version 3.2.2 Copyright (c) 2000-2016 the FFmpeg developers
| OS | macOS 10.12.3
Encoding failed
I want to convert a mp4 video file to mkv but it was failed. Here is the log:
ffmpeg failed to execute command '/usr/local/bin/ffmpeg' '-y' '-i' 'mypath/SampleVideo_1280x720_20mb.mp4' '-ss' '00:00:05.00' '-threads' '12' '-vcodec' 'libx264' '-acodec' 'libfaac' '-b:v' '1000k' '-refs' '6' '-coder' '1' '-sc_threshold' '40' '-flags' '+loop' '-me_range' '16' '-subq' '7' '-i_qfactor' '0.71' '-qcomp' '0.6' '-qdiff' '4' '-trellis' '1' '-b:a' '128k' '-pass' '1' '-passlogfile' '/var/tmp//ffmpeg-passes5897d94ab3505dfux7/pass-5897d94ab358e' 'mypath/SampleVideo_1280x720_20mb.mkv'
I tried to run that command in terminal and got this error: Unknown encoder 'libfaac'. A quick search on google showing that libfaac had been removed from ffmpeg. Any suggestions for this issue?
I had the same problem today. I solved it by adding 'aac' to the getAvaibleAudioCodecs function in the X264 class. It appears that FFmpeg ded deprecate libfaac.
now it looks like:
/**
* {@inheritDoc}
*/
public function getAvailableAudioCodecs()
{
return array('aac','libvo_aacenc', 'libfaac', 'libmp3lame', 'libfdk_aac');
}
Then I convert the file this way:
$video->save(new X264('aac', 'libx264'), $sDownloadDir.$file->getTitle().'.mp4');
This is for html5 friendly video/audio.
We might want to update this in the repo?
Thanks, new X264('aac', 'libx264') did the job
Hi @DHoogland,
You shouldn't have to change the core files. This has already been fixed in 0.7.0 by @Neck, in PR #257.
Since this issue is solved, and you found the proper way to use it, I'll close it.
R
Most helpful comment
I had the same problem today. I solved it by adding 'aac' to the getAvaibleAudioCodecs function in the X264 class. It appears that FFmpeg ded deprecate libfaac.
now it looks like:
/** * {@inheritDoc} */ public function getAvailableAudioCodecs() { return array('aac','libvo_aacenc', 'libfaac', 'libmp3lame', 'libfdk_aac'); }Then I convert the file this way:
$video->save(new X264('aac', 'libx264'), $sDownloadDir.$file->getTitle().'.mp4');This is for html5 friendly video/audio.
We might want to update this in the repo?