100,000+ Shareware & Freeware Download, Guides and Reviews

MPEG-4(MP4)- How tos

03/18/2010 17:38:55

How to create spec compliant MP4 files

How to mux Subtitles into MP4 files

How to place Chapters in MP4 files

How to author MP4 files (ie create DVD-like Menus)

How to "anamorphic resize" with MP4

How to play MP4 files


How to (live-)stream/play streamed MP4 files

How To create Variable Framerate MPEG-4 video streams in MP4





How to create spec compliant MP4 files



detailed answer:
1) To create MP4 files you should preferably use audio/video formats covered by the MPEG-4 Standard:
- MP4 video formats:
MPEG-4 SP/ASP: XviD, DivX5, 3ivx, ffmpeg/ffdshow, NeroDigital ASP... and MPEG-4 AVC/H.264: x264, NeroDigital AVC, Apple... and MPEG-2, MPEG-1 (not DivX3/MS Mpeg-4, WM9, RV9 or VP6) - doom9's quality comparisons: 12
- MP4 audio formats: Advanced Audio Coding (AAC
FAQ): Quicktime/iTunes, Nero, Psytel, FAAC (binary)... and MP3, MP2, MP1, CELP (speech), TwinVQ (very low bitrates), SAOL (midi), ALS (lossless)
- MP4 subtitle/text format: MPEG-4 Timed Text
- MP4 picture formats: JPEG, PNG

2) with the following tools you can mux MPEG-4 compatible content into the MP4 container:
- GPAC's
MP4Box, commandline, supports AVC, packed b-frames, advanced content/BIFS, TTXT and Chapters
mp4creator, commandline, able to mux AVC, dont use it with AVI and packed b-frames!
3ivx mp4 muxer dshow filter, usable in Graphedit, supports packed AVI b-frames but no AVC (3ivx Guide)
mp4UI, easy solution, based on MPEG4IP, dont use it with AVC, AVI and (packed) b-frames!
VideoLAN Client, able to mux AVC, dont use it with (packed) b-frames!
ffmpeg, buggy, commandline, especially dont use it with AVC, AVI and (packed) b-frames!
- IBM's
Toolkit for MPEG-4 which includes XMTBatch and/or AVGen (also a simple version) based on Java
dvd2mp4gui, GUI using mp4tool, supports muxing easily multiple audio and subtitle streams (as advanced content) into MP4
mp4tool/mp4edit from ENST, similar to mp4box, mp4edit is the "light" GUI version of the commandline mp4tool
3) the following "all-in-one" MP4 encoding tools are existing:
Nero Recode2, encodes into MP4 using ASP or AVC and AAC (Doom9 Guide), subs are DVD VobSubs, includes a dshow muxer
- Doom9's
MeGUI, supports ASP (Xvid, libavcodec), AVC (x264) and AAC (Besweet - Nero) encoding
HDX4 supports ASP and AAC
- Dicas'
mpegable X4 live, easy solution, encodes directly into MP4 using Dicas' MPEG-4 codecs
- Envivio's
4Coder encodes to MPEG-4 AAC, ASP/SP and AVC
4) the following tools can be used for editing (eg splitting, appending) MP4 files:
MP4Box splits MP4 (AAC, ASP, AVC, TTXT, MPEG-1/2, private streams) time- and sizewise, extracts parts and joins MP4 too
- Ulead's
VideoStudio 8 with the MPEG-4 plugin
can be used to create (encode, mux) and edit (split, join) MP4 files, supports MPEG-4 Simple Profile, AAC, AVC





How to mux Subtitles into MP4 files


there are three possibilites to store subs in mp4:
- In contrary to MPEG-1/2 the MPEG-4 Standard defines its own Text Stream/Subtitle Format under ISO 14496-17 (MPEG-4 Timed Text). Its text-based (not picture-based as DVD subs), uses UTF-8/16 (including cyrilic, arabic, chinese characters...), allows all sorts of animations (scrolling, colors, karaoke aso...), allows attaching of fonts and is streamable
MPEG-4 TTXT creation is already supported in
MP4Box and Quicktime. Playback works with Haali's MP4 dshow Parser, Osmo4, Realplayer and Quicktime (only when placed in .3gp). Support in VideoLan is worked on
- Nero's Recode2 makes use of the possibility of storing private streams in MP4 (question 4) and simply takes the DVD subpicture streams (vobsubs) from the DVD and stores them in MP4 without modifications
playback of these streams works with the Nero filters, Haali's Parser, VideoLan (buggy) and some Hardware MP4 DVD Players
- another way covered by the MPEG-4 Standard for storing subs in MP4 is to translate the subtitle format into the XMT/BT text format and then to encode it as "advanced content" (BIFS binary format) in MP4. this should work with every subtitle format available (use
mp4box or dvd2mp4gui for example to convert SRT subs)
for playback of advanced content you need a filter/player that can handle this kind of content (
How to play MP4 files






For more  information, please see MPEG-4(MP4) Event.
Related Downloads
Related Articles