mp4tools are a set of scripts to encode Audio and Video in Isomedia (aka MP4) format
mp4tools uses opensources programs as backends like mencoder, MP4Box, xvid, x264
and its quality is very good.
There are presets for most common devices like Sony PSP, Apple iPod, Nokia S60 phones,
so you haven't to go in the jungle of encoding options, firmware bugs, unsupported configurations
common in all embedded devices.
mp4tools hot functions are:
- support for embedded devices
- direct rip from DVD
- autocrop of black borders to have a bigger visual
- audio peak normalization to make audio sound louder, useful on devices with poor speakers
mp4tools quality is good since it uses x264 (the best h.264 encoder ever) or
xvid (the best mpeg4 encoder ever).
Here there are some video samples, so you can have a look before installing
It's the Ocean's 13 official trailer (resolutions are the ones before autocropping)
- PC, Max quality (800x600@400kbps) 7.8 MB Download
- iPod (320x240@160kbps) 3.6 MB View Download
- PSP (480x272@200kbps) 4.4 MB View Download
- 3gp (176x144@80kbps) 1.6 MB Download
- Nokia S60 (320x240@160kbps) 3.2 MB Download
And this is a song encoded with aacplusenc at a very low bitrate
mp4tools consist of 3 archives which can be downloaded separately:
- The shell scripts: mp4tools_0.6.8.tar.gz
- aacplusenc, the AAC+ encoder: aacplusenc_0.17.5.tar.gz
- amrenc, the AMR encoder: amrenc_0.5.3.tar.gz
Extract all the archives and run in each subdir
Read the mp4tools README to know about dependencies you have to met
There are Ubuntu packages for all the above tools, you just have to use this repository by
either editing /etc/apt/sources.list by hand or adding it to Synaptic or Adept
deb http://ppa.launchpad.net/teknoraver/ubuntu maverick main
deb-src http://ppa.launchpad.net/teknoraver/ubuntu maverick main
and then run:
apt-get install mp4tools
After installing you will have two type of scripts, some named mk* and other named dvd2*
For example, mkipod encodes a video file to the ipod format, while dvd2ipod rips a DVD into the same format
The included scripts are:
|mk3gp||encodes a standard 3gp file|
|mks60||encodes an high quality 3gp file (may not play on older phones)|
|mkamr||encodes an AMR file (ringtone)|
|mkmp4||encodes an highest quality H.264 Video file, for PC playback|
|mkipod||encodes a movie for the Apple iPod|
|mkpsp||encodes a movie for the Sony PSP|
|dvd23gp||rips a DVD to a standard 3gp file|
|dvd2s60||rips a DVD to an high quality 3gp file|
|dvd2psp||rips a DVD to a movie for the Sony PSP|
|dvd2ipod||rips a DVD to a movie for the Apple iPod|
Additionally, there are amrenc and aacplusenc, which respectively encodes to AMR and AAC+
If you use mp4tools to encode songs to listen them in a Nokia phone
you will notice that you will not be able to tag your encoded files.
This because Nokia uses a non standard tag system.
Fortunately I made my own tool to tag them, so feel free to use it.
Download it: nokiatagger.c
and compile it in the usual way:
gcc nokiatagger.c -o nokiatagger
Currently I have Windows binary only for the HE-AAC+ encoder,
Download it here: aacplusenc.exe
Mac OS X binaries
Currently I have Mac OS X binary only for the HE-AAC+ encoder,
Download it here: aacplusenc
You can reach me via:
- IRC: matteo on irc.freenode.net #mplayer
- Google Talk / Jabber:
Comments         
worked with a nokia 6230i
Works for nokia 6630 too
Works great with my Nokia 6233. Thanks for this wonderful software and scripts ! Keep up the great work..
just compiled, and successfully encoded a wav!
all went fine, thanks.
does it work only with 16bit wav?
i've also tried to encode a 32bit wav and this produced the file that is not audible...
Never tried 32 bit, but it isn't supposed to work as the routine stores samples as 16 bit values
and one more question :)
do you happen to know any good aac+ stream specification?
i need to know if aac+ file has SBR and PS to correctly report the samplerate and number of channels to a streaming server for accurate info.. ADTS headers don't contain the information about SBR and PS so i end up getting 22050hz/1 channel for files that are in fact 44100hz/2 channels (aac+v2)..
No there isn't.
SBR and PS part are encoded as ancillary data, so the only way to recon it is tryng to decode as AAC+ first,
then if it fails it's plain AAC
This is because usually AAC is wrapped in MP4.
Many muxers, most notably MP4Box, has a switch to mark the file as (HE-)AAC+
BTW, for technical questions contact me via mail
thanks for this wonderful software.. I hope this works better than faac encoder for HE-AAC. love ya.. nix.
dont works for psp :(
you have to use latest firmware from Sony
What's the license of this project?
mp4tools and nokiatagger are GPL
aacplusenc and amrenc are copyrighted by 3gpp
Hi! how to that output file of 'aacplusenc' was in a raw aac format? what needs to be changed in the source code that was it?
why compile 'aacplusenc' without fftw3 support? :(
sorry, i realized! ;\
and 'aacplusenc' can read wav data from stdin?
you can use stdin and stdout using - as filename
I found that the old encoder (v0.2) encodes better than the current one. Why?
you may be wrong, the encoding algorithm is still the same, just the IO routine and FFT are changed.
If you talk about mono encodings yes, they are broken
I used stereo. I thought that in the m4a container, quality of sound a bit better. What is this ADTS format? there is a suggestion to make the optional argument #5 - 'nops' to be force disable ps. (may want) =)
use bitrates >= 52kbit to don't use PS