Convert videos to 3gp format

This bash script converts videos like AVI-files to the 3gp format used on newer cell phones like Nokia N95. To use it you should have the libamr_nb and libamr_nw flags available to ffmpeg.< /p>

ffmpeg -formats |grep amrFFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.  configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --enable-static --enable-shared --cc=i686-pc-linux-gnu-gcc --disable-mmx --disable-altivec --disable-debug --disable-audio-oss --disable-dv1394 --disable-network --disable-ffplay --disable-opts --enable-libmp3lame --enable-libx264 --enable-libamr-nb --enable-libamr-wb --enable-gpl --enable-pp --disable-strip  libavutil version: 49.4.0  libavcodec version: 51.40.4  libavformat version: 51.12.1  built on Nov 26 2007 00:01:28, gcc: 4.1.2 (Gentoo 4.1.2) DE amr             3gpp amr file format DEA    libamr_nb DEA    libamr_wb

If you don’t see those flags this script won’t work.

#!/bin/bash# File : nokia-encode-3gp.sh script for Nkoia with screensize 128x96.# Usage : nokia-encode-3gp.sh filename.avi# Generates a .3gp file with same name as the .aviFILE=$1shiftrm -f "$FILE".3gpffmpeg -i "${FILE}" -f 3gp \        -vcodec h263 \        -qmin 3 \        -qmax 5 \        -b 120 \        -acodec libamr_nb \        -ar 8000 \        -ab 10.2k \        -ac 1 \        -s 128x96 \        "$FILE".3gp

This script can be modified to work on the Sony Ericsson k700i by changing -s to 176×144, its resolution.
You can download it here

Source: Genoo forums