I'm trying to use this script to convert an rmvb video to mp4, but I'm having problems with the ffmpeg.

In apt-get there's only ffmpeg0 and ffmpeg-dev, I installed both, but the script doesn't work, it's saying that ffmpeg was not found.

Any hint on this?


The script I'm talking about:



help() {
  echo "Convertor de Vídeos para MP4"
  echo "Parametro 1 = Tipo: (A - Arquivo/D - Diretório)"
  echo "Parametro 2 = Arquivo/Caminho"
  echo "Parametro 3 = Resolução"
  echo "Parametro 4 = Tipo de Arquivos de Entrada (rmvb, avi, mpeg)"

if [ "$tipo" = "" -o "$arqv" = "" -o "$resolucao" = "" -o "$tipoarq" = "" ]; then

if [ "$tipo" = "D" ]; then
  count=`ls "$arqv"/*.$tipoarq | wc -l`

echo "$count arquivos encontrados para converter."

while [ ! $x -ge $count ]; do
  x=`echo $x + 1 | bc`
  if [ "$tipo" = "D" ]; then
    nome=`ls "$arqv"/*.$tipoarq | head -n $x | tail -n 1`

  echo "Convertendo $nome ..."
  ffmpeg -i "$nome" -acodec libfaac -ab 128kb -vcodec mpeg4 -b 1200kb -mbd 2 -cmp 2 -subcmp 2 -s $resolucao "`echo $nome | sed "s/\.$tipoarq//g"`".mp4


Using WinFF it gives:

Unknown encoder 'libx264'

I've installed both the existing packages libx264-67 and libx264-dev, but none solved.

Looking for more alternatives...

  • Could you please post the exact error message that you get? that "not found" is most likely related to the file being converted, not to the ffmpeg command itself (which you have checked and is installed). – João Pinto Dec 29 '10 at 21:56
  • @João Pinto the exactly error message is Unknown encoder 'libfaac' – Tom Brito Dec 29 '10 at 22:06
  • I guess the ffmpeg version available for Ubuntu was compiled without the libfaac encoder support, probably due to legal reasons. – João Pinto Dec 29 '10 at 23:20

The FFmpeg package you'll find on Ubuntu repositories does not contain libfaac for some silly licensing reasons. That's why you're having problems.

However you almost certainly don't need to transcode your audio in your specific case anyways (assuming you just want the audio to play at the same quality as the original, and not try tweakings) because the rmvb audio stream is probably already in aac format, which is what you need.

So you should simply substitute in your script this bit:

 -acodec libfaac -ab 128kb 

for this:

-c:a copy

This will simply copy the audio stream from the rmvb file to the mp4 file, while converting the video stream. The resulting file will work perfectly.

However, if you wish to have your initial settings work exactly as they were laid out, and on Ubuntu, then you'll have to compile FFmpeg from source to add the missing codecs.

Follow this guide for compiling FFmpeg on Ubuntu: http://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide

Here's a more authoritative explanation for the problem involving libfaac: http://ffmpeg.org/trac/ffmpeg/wiki/AACEncodingGuide

  • As noted in the last link, you can use -c:a libvo_aacenc to produce AAC output if the input is a different format and you can't use -c:a copy. – chronitis Apr 3 '13 at 17:37

Used http://us.onlinevideoconverter.com/ and it solved..


enter image description here

You can use my dmMediaConverter,a FFMpeg GUI which has a Bulk mode convert.


The package you need to install is ffmpeg, if you run "ffmpeg" from the terminal it will tell the command to install the package containing the command:

sudo apt-get install ffmpeg
  • Looks like it's already installed, FFmpeg version SVN-r19352-4:0.5+svn20090706-2ubuntu2.2, but that script says it was not found.. – Tom Brito Dec 29 '10 at 21:41
ffmpeg -i input.rmvb -c:a copy output.mp4

Worked for me.

  • Please don't add "thank you" as an answer. Instead, vote up the answers that you find helpful. - From Review – David Foerster May 21 '18 at 8:27
  • Thanks for the feedback. In fact, it took me some time to extract these few instructions from the vast amount of code of the AP and the answer of @camurgo. (Which now is first place only bc. I gave it an upvote) So this answer may still be useful. – Jan May 21 '18 at 8:34

protected by Community Nov 25 '15 at 19:42

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.