Transcoding videos to Windows Mobile Format (.3gp)
Windows Mobile Phones with cameras record video using MP4 with AMR audio.
Once you have this video, you might want to do something else with it, like transcode it to a flash video.
You also might want to take an existing AVI file and convert it to a format that Windows Mobile Media Player will play.
These steps will take you through the process using a PC running Ubuntu. I have tested this with 7.10 (Gutsy) and 8.04LTS (Hardy)
If you use other Linux Distributions, the steps should be similar. If you don't run Linux, you can download and Burn an Ubuntu install
disc from www.ubuntu.com. You can use CDBurnerXP to burn the ISO
file to a disc. The installer will walk you through repartitioning your hard drive
to make room for Ubuntu. If you don't have the nerve for repartitioning, you can either install Ubuntu as a Windows Application
using the wubi Ubuntu Installer or if you have plenty (1GB+) of memory, you can use the
excellent VMWare Player and download an
Ubuntu Virtual Appliance.
So, you have Ubuntu running and you are ready to start transcoding. In order to do so, you will need a few things.
MP3Lame, svn & build-essential
First, you will most
likely want MP3 support so let's grab that. Since we are going to be compiling stuff, lets get build-essential also.:
sudo apt-get install lame liblame0 liblame-dev build-essential svn
AMR
Next, you are going to need AMR Support. I grabbed the most recent NB and WB files from http://ftp.penguin.cz/pub/users/utx/amr/ :
cd /usr/local/src
mkdir amr
cd amr
wget http://ftp.penguin.cz/pub/users/utx/amr/amrnb-7.0.0.1.tar.bz2
wget http://ftp.penguin.cz/pub/users/utx/amr/amrwb-7.0.0.2.tar.bz2
tar xvjf *bz2
cd amrnb-7.0.0.1
./configure --prefix=/usr
make
sudo make install
cd ../amrwb-7.0.0.2
./configure --prefix=/usr
make
sudo make install
FFMPEG
Now we need to download and build the latest ffmpeg. Sure, Ubuntu comes with ffmpeg, but not with amr.
cd /usr/local/src
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure --enable-libamr-nb --enable-libamr-wb --enable-libmp3lame --enable-nonfree --prefix=/usr
make
sudo make install
If all went well, we should have a shiny new ffmpeg ready to transcode videos.
To make life easier, I use a bash script:
vid2phone:
#!/bin/bash
until [ -z "$1" ]
do
BASENAME=`basename "$1" | tr [:space:] _ | tr . -`
ffmpeg -i "$1" -r 15 -s 320x240 -vcodec mpeg4 -acodec libamr_nb -ar 8000 -ab 4.75k -ac 1 $BASENAME.3gp
shift
done
This takes any number of video files as command line parameters and attempts to create MPEG4 15fps amr mono files
with the same base name and a .3gp extension.
|
|
|
Say you have a small Asterisk installation with a single outgoing Zap channel and you want to throw a bunch of call files at it. If you move them all into the outgoing directory at once, Asterisk will try to call them all and only the first one will work. The rest will all fail because the channel is unavailable. What you need is a way to move them one at a time into the outgoing directory. This pair of bash scripts does just that: (Note the popast script runs forever.) popast #!/bin/bash #script to sanely move call files echo popast: checking for files2 while [ 1 ] ; do echo popast: inwhile1 while [ -e /var/spool/asterisk/outgoing/*call ] ; do echo popast: inwhile waiting for call completion sleep 5 done echo popast: calling mvfile mvfile queued/*call done echo popast: done mvfile #!/bin/bash #script to sanely move call files echo mvfile: $1 mv $1 /var/spool/asterisk/outgoing/ |
|
|
Cisco routers support static and dynamic routing, and there are more than one way to configure these routes. This HowTo describes a way to configure a static route. Say you have installed a VPN Appliance to connect your network to a business partner's network. Your network uses the 10.0.0.0/8 private addressing scheme, thus allowing you to use any valid IP address within the 10.x.y.z address range. Your router has been assigned the IP address of 10.0.0.1. Your new business partner uses addresses in the 192.168.0.0/16 network, allowing them to use any valid IP address in the 192.168.y.z address range. They have provided you with a VPN appliance that you connect to your network and assign the local address of 10.9.0.99.
You need to tell your router at 10.0.0.1 that the 192.168.0.0/16 network is accessible through 10.9.0.99. |
|
Read more...
|
|
|