How to convert rmvb to mp4? (or, why ffmpeg doesn't work?)

Posted by Tom Brito on Ask Ubuntu See other posts from Ask Ubuntu or by Tom Brito
Published on 2010-12-29T21:14:08Z Indexed on 2010/12/29 22:01 UTC
Read the original article Hit count: 371

Filed under:
|
|
|

Hi, 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?

--update

The script I'm talking about:

#!/bin/bash

tipo=$1
arqv=$2
resolucao=$3
tipoarq=$4

help() {
  clear
  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
  help;
  exit
fi

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

echo "$count arquivos encontrados para converter."

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

  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
done
exit

--update

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...

© Ask Ubuntu or respective owner

Related posts about conversion

Related posts about ffmpeg

  • how to install ffmpeg in cpanel

    as seen on Super User - Search for 'Super User'
    i'm using dedicated server(linux) so i need to install ffmpeg in cpanel so here ffmpeg i found in Main Software Install a Perl Module but i writing script in php so how can i install ffmpeg phpperl when i'am trying to install ffmpeg in perl module i get this response Checking C compiler… >>> More

  • FFMpeg-PHP Installation Error

    as seen on Server Fault - Search for 'Server Fault'
    While installing FFmpeg-PHP, I got this interesting error: /usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function 'zim_ffmpeg_movie_getAudioStreamId': /usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c:1051: error: 'CODEC_TYPE_AUDIO' undeclared (first use in this function) /usr/downloads/ffmpeg-php-0… >>> More

  • git problems installing stuff [closed]

    as seen on Super User - Search for 'Super User'
    root@Frenzen:~# cd root@Frenzen:~# git clone --depth 1 git://source.ffmpeg.org/ffmpeg Initialized empty Git repository in /root/ffmpeg/.git/ root@Frenzen:~# cd root@Frenzen:~# git clone --depth 1 git://source.ffmpeg.org/ffmpeg Initialized empty Git repository in /root/ffmpeg/.git/ root@Frenzen:~#… >>> More

  • Unable to install ffmpeg-php

    as seen on Server Fault - Search for 'Server Fault'
    I followed the instructions on http://www.mysql-apache-php.com/ffmpeg-install.htm but ffmpeg-php does not show up in my phpinfo() The commands I ran (in order) #yum install ffmpeg ffmpeg-devel ... Public key for faac-1.26-1.el5.rf.x86_64.rpm is not installed #rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0… >>> More

  • Unable to install ffmpeg-php

    as seen on Server Fault - Search for 'Server Fault'
    Hi, I followed the instructions on http://www.mysql-apache-php.com/ffmpeg-install.htm but ffmpeg-php does not show up in my phpinfo() The commands I ran (in order) #yum install ffmpeg ffmpeg-devel ... Public key for faac-1.26-1.el5.rf.x86_64.rpm is not installed #rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0… >>> More