Transcoding Video to use on Motorola Atrix MB860


Primeiramente gostaria de salientar que não sou o autor principal do conteúdo deste artigo. A minha intenção é de mostrar o que outros autores tem realizado (referenciando links para o conteúdo original) neste blog até como um guia pessoal para uso próprio e ainda compartilhar minhas anotações e pequenas modificações que realizo no conteúdo, desejando que possa ajudar mais alguém em algum lugar.
First and foremost, I take no credit for any of this post’s content. I am really just taking what others have done (which I have links to bellow) and am putting it on my blog for a personal reference and hopefully the small changes that I made to their guides will help someone somewhere.

Link: https://sites.google.com/site/ubuntu4us/artigos/ferramentas-multimidias/videos-e-animacoes/transcoding-dvd-to-ipod

Main configurations:
ATRIX 4G supports a maximum 960 x 540 pixels
Video Codec is set as H.264 (like iPod)
Framerate (FPS) should be set to Same as source
Avg Bitrate (kbps) and change it to 1500
Audio Codec is AAC (faac) Stereo
Samplerate to 48
Bitrate to 160

The ATRIX does not like video file sizes over 2GB
If your source is over 960 x 540, you must be sure to set the width and height to a maximum of 960 x 540

Program to use on Ubuntu:

sudo apt-get remove ffmpeg x264 libx264-dev
sudo apt-get update
sudo apt-get install build-essential git-core checkinstall yasm texi2html libfaac-dev \
    libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev \
    libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev

cd ~
git clone git://git.videolan.org/x264
cd x264
./configure --enable-static
make
sudo checkinstall --pkgname=x264 --default --pkgversion="3:$(./version.sh | \
    awk -F'[" ]' '/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yes
sudo apt-get remove libmp3lame-dev
sudo apt-get install nasm

cd ~
wget http://downloads.sourceforge.net/project/lame/lame/3.98.4/lame-3.98.4.tar.gz
tar xzvf lame-3.98.4.tar.gz
cd lame-3.98.4
./configure --enable-nasm --disable-shared
make
sudo checkinstall --pkgname=lame-ffmpeg --pkgversion="3.98.4" --backup=no --default \
    --deldoc=yes

cd ~
git clone http://git.chromium.org/webm/libvpx.git
cd libvpx
./configure
make
sudo checkinstall --pkgname=libvpx --pkgversion="$(date +%Y%m%d%H%M)-git" --backup=no \
    --default --deldoc=yes

cd ~
git clone git://git.videolan.org/ffmpeg
cd ffmpeg
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc \
    --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb \
    --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid \
    --enable-x11grab
make
sudo checkinstall --pkgname=ffmpeg --pkgversion="5:$(./version.sh)" --backup=no \
    --deldoc=yes --default
hash x264 ffmpeg ffplay ffprobe

cd ~/ffmpeg
make tools/qt-faststart
sudo checkinstall --pkgname=qt-faststart --pkgversion="$(./version.sh)" --backup=no \
    --deldoc=yes --default install -D -m755 tools/qt-faststart /usr/local/bin/qt-faststart

Comand for ffmpeg - Method One-pass CRF (Constant Rate Factor) using the slow preset

Tentativa 1 (não funcionou):

ffmpeg -i input_file.avi -pass 1 -vcodec libx264 -preset fast -b 1500k -f mp4   -s 960x540 -aspect 16:9  -an -y /dev/null \
&& ffmpeg -i input_file.avi -pass 2 -vcodec libx264 -preset fast -b 1500k -acodec libfaac \
-ab 160k -ac 2 -ar 48000   -s 960x540 -aspect 16:9  output.mp4

Tentativa 2 (deu certo):

ffmpeg -i "A Pantera Cor de Rosa pt 2.mpg" -f mp4 -vcodec mpeg4 -b 1500k -qmax 10 -bufsize 10M -g 300 -acodec libfaac -ab 160k -ac 2 -s 960x540 -aspect 16:9 "A Pantera Cor de Rosa pt 2.mp4"

Resumindo:
Don't need to compile ffmpeg and x264
Just unstall:
sudo apt-get install ffmpeg

Revert Changes:
sudo apt-get remove x264 ffmpeg qt-faststart build-essential git-core checkinstall \
nasm yasm texi2html libfaac-dev lame-ffmpeg libsdl1.2-dev libtheora-dev libvorbis-dev \
libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev
sudo apt-get update
sudo apt-get install ffmpeg


O URL específico do gadget não foi encontrado



Comments