10
2006
Tip #30: Creating 3GP Video for Mobile Phones with Free Tools
The examples assume you are converting from a DVD… If you are converting an AVI or MPG file, replace “-dvd-device e:\video_ts dvd://1 -aid 128″ with the name of your video file…
(NOTE: The following commands should be entered on a single line, even though they may appear multiline on this page…)
Using mencoder, start the first pass of video encoding:
mencoder -dvd-device e:\video_ts dvd://1 -aid 128 -nosound -ovc lavc -lavcopts
vcodec=mpeg4:vbitrate=300:v4mv:mbd=2:trell:cmp=10:
subcmp=10:mbcmp=10:autoaspect:vpass=1 -ofps 14.985 -vf scale=320:240 -ffourcc DIVX -o c:\path\out.avi
Next, complete the second pass of video encoding:
mencoder -dvd-device e:\video_ts dvd://1 -aid 128 -nosound -ovc lavc -lavcopts
vcodec=mpeg4:vbitrate=300:v4mv:mbd=2:trell:cmp=10:
subcmp=10:mbcmp=10:autoaspect:vpass=2 -ofps 14.985 -vf scale=320:240 -ffourcc DIVX -o c:\path\out.avi
Next, we’ll need to strip the audio from the source using the following command… This will consume a lot of disk space, so be certain to have a gigabyte or so available before continuing…
mplayer -dvd-device e:\video_ts dvd://1 -aid 128 -vo null -ao pcm:file=out.wav -af resample=16000,volume=3
Now, we’ll need to encode the audio we just extracted into AAC format using faac:
faac -b 64 f4.wav -o f4.aac
Finally, we’ll use mp4creator to combine our AVI and AAC files into our final 3GP using the following commands:
mp4creator -allow-avi-files -force3GPCompliance -create=ourfile.avi out.3gp
mp4creator -aac-profile=4 -interleave -force3GPCompliance -create=ourfile.aac out.3gp
mp4creator -optimize out.3gp
The resulting 3GP file should be playable on any device which supports 3GP files, and can also be played in quicktime… Change the vbitrate= in the video encoding commands if you’d like a smaller or larger file…
If you have any questions please leave a comment…
Tip #30: Creating 3GP Video for Mobile Phones with Free Tools
Originally from Jameser’s Tech Tips by
