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: 398
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