i am trying to convert a .mov file to an mp4 file using the following command.
ffmpeg -i sample_iTunes.mov -c:v libx264 -vb 800k -c:a libvo_aacenc -ab 128k -ac 2 test.mp4
When i run this i get the following error:
Unknown encoder 'libvo_aacenc'
So i attempted to install the following:
sudo apt-get install libavcodec-extra
However sadly im still getting the error.
Can anyone help me out here?
aergistal answer
Here are the log from the things youve asked me to check:
My operation system is ubuntu 14.04
output of ffmpeg -codecs | grep aac
:
ffmpeg version 2.4.3-1ubuntu1~trusty6 Copyright (c) 2000-2014 the FFmpeg developers
built on Nov 22 2014 17:07:19 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
configuration: --prefix=/usr --extra-version='1ubuntu1~trusty6' --build-suffix=-ffmpeg --toolchain=hardened --extra-cflags= --extra-cxxflags= --libdir=/usr/lib/x86_64-linux-gnu --shlibdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --enable-shared --disable-stripping --enable-avresample --enable-avisynth --enable-fontconfig --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-opengl --enable-x11grab --enable-libxvid --enable-libx265 --enable-libdc1394 --enable-libiec61883 --enable-libzvbi --enable-libzmq --enable-frei0r --enable-libx264 --enable-libsoxr --enable-openal --enable-libopencv
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.101 / 56. 4.101
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 1.100 / 5. 1.100
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 0.100 / 53. 0.100
DEA.L. aac AAC (Advanced Audio Coding)
D.A.L. aac_latm AAC LATM (Advanced Audio Coding LATM syntax)
out put of:
avconv -codecs | grep aac
is:
avconv version 9.18-6:9.18-0ubuntu0.14.04.1, Copyright (c) 2000-2014 the Libav developers
built on Mar 16 2015 13:19:10 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
DEA.L. aac AAC (Advanced Audio Coding) (encoders: aac libvo_aacenc )
D.A.L. aac_latm AAC LATM (Advanced Audio Coding LATM syntax)
I still get the same error.
You can do -c:a aac
to get ffmpeg
to use its built-in aac
encoder. The built-in encoder supposedly produces higher quality, so libvo_aacenc
has been removed from precompiled binaries.
A command line that works for me is:
ffmpeg -y -i infile.mov -f mp4 -r 29.97 -vcodec libx264 -preset slow -b:v 3800k -flags +loop -cmp chroma -b:v 4000k -maxrate 4300k -bufsize 4M -bt 256k -refs 1 -bf 3 -coder 1 -me_method umh -me_range 16 -subq 7 -partitions +parti4x4+parti8x8+partp8x8+partb8x8 -g 250 -keyint_min 25 -level 30 -qmin 10 -qmax 51 -qcomp 0.6 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -c:a aac -b:a 125k -ar 48000 -ac 2 outfile.mp4
To get higher video quality, you can do -b:v 8000k -maxrate 8500k
(or even higher if the source file has, like, 11000k
), and better audio with -b:a 192k
The libavcodec_extra package in Ubuntu Trusty is a Libav additional codec library. Libav is a fork of FFmpeg.
You seem to have both installed on your system. If you compiled ffmpeg
yourself you need to install libvo-aacenc-dev
and re-configure ffmpeg with --enable-libvo-aacenc --enable-version3
.
For AAC
the recommended lib is libfdk_aac
. See the AAC Encoding Guide and the FFmpeg Compilation Guide.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With