Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
![]() |
#1 | Link |
Registered User
Join Date: Nov 2001
Posts: 9,770
|
HowTo create DVD-like Menus in MP4 - MP4Menu
ok, as some of you might already know the mpeg-4 standard offers the possibility to put menus, as known from DVDs, into the MP4 file format.
this small guide aims at helping you to be able to create an own menu, as known from dvd, yourself in the MP4 container format, by using the mp4menu script i wrote to make the process easier with mp4menu you should be able to make a 1:1 copy of a DVD on CDR proof of concept sample before you start doing it yourself, you maybe want to see a proof of concept sample kindely provided by OBcecado! note that only chapter1 and 2 will work (as its not the whole movie of course) authoring in mpeg-4 systems till someone writes a nice mpeg-2 systems -> mpeg-4 systems convertor, the menu authoring has to be done "by hand" by using a textual language format, called XMT or BT (based on VRML, like the well known Flash), which than has to be compiled/encoded into mp4 (a free available compiler/encoder is for example mp4box), which creates the so called BIFS track, which carries the menu and controls how the a/v gets played why mp4menu? as you can imagine writing a whole BT/XMT scipt from the ground by hand for a dvd-like menu in mp4 is not that easy. a gui would make this process much easier and there are already some GUI oriented MP4 authoring tools existing, but all not available to the broad public! now i always wanted to be able to also use menus on my backups, to be able to make a real 1:1 copy of a dvd on a cdr. so i wanted to explore the possibilities of mpeg-4 systems and create a dvd-like menu in mp4. thats why i started to learn the BT/XMT language from the ground. to share my learned knowledge (and the resulting script) i created the mp4menu project which has the goal to make it easier for you to author such dvd-like menus in mp4 yourself now you can find the product of this work on sourceforge on the mp4menu page i created there i hope that i will be able to make mp4menu even better with your suggestions on what to improve ![]() how can i use mp4menu? mp4menu provides you a BT sample script (XMT will follow) which already offers all the main features you can find on a dvd menu (ie chapter menu, language menu, etc...) "all" you have to do now is to adopt this sample script to the dvd menu you want to make a backup from (well most dvd menus are similar but not exactly the same) so lets start with a small guide before you can start let me tell you something about the "world" we are in: [hm, as doom9 doesnt allow political discussions here i will leave the most important part out ![]() in the current mp4menu script we are in a world that has 2 dimensions (well 3 dimensions are also possible in mpeg-4 systems, but i havent seen a 3D dvd menu till now ![]() preparing the source first of all: i dont allow the usage of mp4menu when it is against the legal situation in your country (in most countries its still allowed to make a backup of dvds you own, but not to break the dvd copy protections etc...) i expect you to have your vob files, which contain the dvd menu, (or any other source you want to use) on your hd already 1) watch the dvd, learn how it works and note down what happens if you push here and there, where are the intros/outros/transitions between menus, what parts get looped etc... 2) encode/prepare the streams: a) audio: specified audio formats in mp4 are mp3 and aac, but i think it makes things easier when you first convert your ac3 streams from the vob only into .wav (use besweet for that for example) i will write later on why this can avoid problems b) video: i expect you to know how to encode the video from a vob to mpeg-4. to avoid problems i suggest to use a codec which is able to input keyframes at specific points (all menus (chapters, languages, mainmenu) are stored right behind each other in the vob and will also be stored like this in 1 video stream in the mp4) make sure you have a keyframe at positions where there are changes from 1 menu to the other for example (to find out where this exactly is you can also have a look at the vob (for example with virtualdubmod), cause it also has the keyframes at this points) you can set keyframes in xvid (and in divx5 by using this ekg tool too afaik) note that avi files created by divx5 or xvid using b-frames have to be muxed with mp4box or 3ivx to mp4, to get spec compliant mp4 files! a second thing you have to look for is that the width of your menu video stream has to have the same width as the movie! (to avoid black borders on the sides) c) convert your subs into the srt format (or hardcode them onto the video stream) 3) cut the video: often there are different styles of menus stored on a dvd/in a vob, i suggest you to choose only one to keep the final menu size low a) mux the wav with the whole video, open the video in vdm and cut out all parts you dont want to have/dont need in your final menu you can do that with the ac3 too, but vdm isnt that good in ac3 cutting imho as you will see if you do it ![]() b) demux the cutted wav and encode it with your favourite encoder to mp3 or aac the following formats are supported as input in mp4box: mpeg-4 video in .avi and .mp4 audio: .mp3, cbrmp3 in .avi (not vbrmp3!), aac in .mp4 lets start with the script grap the mp4menu script the script might look like a huge beast at first sight but dont be afraid you dont have to change that much in there ![]() if you want to know what each command is for, feel free to ask or have a look a this great guide written by the guys of the gpac project (i think it covers everything i have in my script) 1) define the size of your "world" search for "pixelWidth" and set it to the width of your videos, set the height in a 4:3 ratio, ie width is 576 than the height is 432 (576*3/4) 2) change the links to your input files 3) adjust the segments: a) as you can see you can define the chapterpoints with segmentdescriptor, you always have to define the startpoint and the duration (all in seconds) b) the same method is used to define the different parts of the menuvideo stream (menuintro, transitions, the menus themselves etc...) 4) define the type/position of your buttons: to make the buttons visible add a "#" before "transparency 1.0" in the buttonappearance proto a) as known from your mathematics courses we have to define two values to define a point in a 2D world the first value (x) will move the object horizontally, the second (y) vertically. the point 0 0 is in the middle of the world! b) you can have all sorts of types for a button, ie rectangle, ellipse aso... x is the width of the object and y the height (for some styles (ie circle) you need to define a radius) 5) define the appearance and position of the subs search for MovieSubtitle, there you can define the size, font etc... guess what you can define under position ![]() 6) the moviebuttons i have added an own menu which you can use during movie playback, which you will not find on a dvd that way its a little bit difficult to describe here what you need to look for, where to add the buttons, etc.. thats why i added some infos in the script itself ok, i think these are all basic things everyone has to look for when using mp4menu, of course there are some things you have to change for each dvd seperately (like the number of chapters, the number of languages (audio and subs) aso... i didnt described now how exactly this works cause it will be different every time, but feel free to ask, i will do my best to help you with your specific backup ![]() convert the script into mp4 to convert the bt script into binary format in mp4 you need a compiler/encoder jeanlf from gpac has written such a tool, mp4box, which works great grap it from here create and execute a .bat file with the following commandline: Code:
"c:\path to\mp4box.exe" -mp4 "c:\path to\mp4menu_0.1.bt" how can i play these mp4 files? as these mp4 files are spec compliant to the mpeg-4 systems standard you should be able to play them with every good mpeg-4 systems 2D player imho the best currently available is the Osmo4 from GPAC! i dont recommend the usage of enviviotv as it is very limited (doesnt support all the funky features, like mp3, png decoding, chapters, loop...) and is not available for free anymore! how is the chance that i will be able to playback these menus on hardware players in the future? if h264 will become the next dvd successor the chance isnt that small imo you have to know that the mp4 container is the native container of the h264 codec (not avi) as defined in the mpeg-4 standard well if h264 becomes a success, the industry will ask for a way to create dvd-like menus and the chance is great that they will use the mpeg-4 systems standard for that TODO - make the moviebuttons/menu to be placed automatically at the bottom of the world - design a nicer layout for the moviemenu (perhaps add a jpg/png as background) - add some "on mouse over" animations - convert the BT script to XMT - write a nicer guide ![]() - get dshow developers to release better support for mp4menu or at least write a dshow video switcher hm, anything else i wanted to say? i surely forgot something ![]()
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau) I know, that I know nothing (Socrates) MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide) Ogg Theora | Ogg Vorbis use WM9 today and get Micro$oft controlling the A/V market tomorrow for free Last edited by bond; 21st May 2004 at 15:41. |
![]() |
![]() |
![]() |
#2 | Link |
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,343
|
Wow!
If I may I would like to upload the file to the JovePlayer server. Hopefully they will be able to make the menu system work with the Xcard. Now that would be cool! Cheers EDIT: It's too bad about MP4 chapters in general though. I remember many years ago I had an VHS VCR that could simply create (mark) chapters at the push of a button, while you were playing back your recordings. Too bad there isn't something as simple as this for Mpeg4 in an MP4 container.... We live to dream though!
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
Last edited by SeeMoreDigital; 11th December 2003 at 18:20. |
![]() |
![]() |
![]() |
#4 | Link | |||
Registered User
Join Date: Nov 2001
Posts: 9,770
|
Quote:
Quote:
![]() Quote:
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau) I know, that I know nothing (Socrates) MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide) Ogg Theora | Ogg Vorbis use WM9 today and get Micro$oft controlling the A/V market tomorrow for free |
|||
![]() |
![]() |
![]() |
#5 | Link | |
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,343
|
Quote:
But as I've mentioned a few times before... It's early days yet! Cheers
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
|
|
![]() |
![]() |
![]() |
#7 | Link | |
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,343
|
Quote:
mf, could you get any part of the file to play in MPC. I could not! Cheers
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
|
|
![]() |
![]() |
![]() |
#8 | Link |
Registered User
Join Date: Nov 2001
Posts: 9,770
|
as i wrote in my guide, you need a systems capable player/filter to decode systems content
the only available dshow filter capable of that is enviviotv, but it is very limited as i described already too...
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau) I know, that I know nothing (Socrates) MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide) Ogg Theora | Ogg Vorbis use WM9 today and get Micro$oft controlling the A/V market tomorrow for free |
![]() |
![]() |
![]() |
#9 | Link | |
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,343
|
Quote:
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
|
|
![]() |
![]() |
![]() |
#10 | Link | |
Banned
Join Date: Jan 2002
Posts: 1,729
|
Quote:
|
|
![]() |
![]() |
![]() |
#12 | Link |
Registered User
Join Date: Nov 2001
Posts: 9,770
|
quicktime is one of the few players that support video switching already
to be really 100% backwards compatible with all dshow filters/players that dont understand systems we will need something like a video switcher filter or function in these players but better than a dshow video switcher filter would be a good dshow systems decoder filter ![]()
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau) I know, that I know nothing (Socrates) MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide) Ogg Theora | Ogg Vorbis use WM9 today and get Micro$oft controlling the A/V market tomorrow for free |
![]() |
![]() |
![]() |
#13 | Link |
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,343
|
As an encode, it looks beautiful in hardware. All 1 minute 40.14 seconds of it!
Cheers EDIT: I don't believe it. This is my 1004th post. I've nearly done as many as bond... but obviously they aren't nearly as informative!
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
Last edited by SeeMoreDigital; 11th December 2003 at 22:37. |
![]() |
![]() |
![]() |
#14 | Link | |
Banned
Join Date: Jan 2002
Posts: 1,729
|
Quote:
![]() ![]() |
|
![]() |
![]() |
![]() |
#15 | Link |
Registered User
Join Date: Jan 2003
Posts: 109
|
Hi.
Have just been watching the sample of SW II and yes it is great!! ![]() I'm doing similar dvd movies menus by using the old microdvd player which allow to make same things. The only one that don't work properly is when you want to make a bivx, the second audio stream has to be out of the avi and so I look for a better program to avoid that but meanwhile I stay with microdvd. Well I tried to install things but I don't understand anything ![]() ![]() Are there more explanations, step by step, somewhere else? Something like guides here that explain clearly to a newbie how to make a divx, should be fine to have such similar things with your project. Anyway cheers for your work. ![]() |
![]() |
![]() |
![]() |
#18 | Link | |||
Registered User
Join Date: Nov 2001
Posts: 9,770
|
Quote:
![]() you will have to adopt the settings in the bt script itself, than you grap a systems compiler/encoder (one is for example mp4box from gpac) use the following commandline: Code:
"c:\path to\mp4box.exe" -mp4 "c:\path to\mp4menu_0.1.bt" thats "all" ![]() Quote:
i think, i (proudly) can say that i am the first one who did it (at least in the public) ![]() i think i covered in my small guide till now all things that are similar for every dvd, but as you can imagine there also big differences for every dvd/user (like how many subs, audio streams, chapters...) i suggest everyone who is interested in making a mp4 menu this way just to start with it and when there are problems just ask, i will do my best to help you after some time i think i will be able than to figure out what people need most, what the focus should be in a guide and than write an overall step-by-step guide Quote:
![]()
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau) I know, that I know nothing (Socrates) MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide) Ogg Theora | Ogg Vorbis use WM9 today and get Micro$oft controlling the A/V market tomorrow for free |
|||
![]() |
![]() |
![]() |
#19 | Link |
DVDBackup-Esp.net WMaster
Join Date: Oct 2001
Location: Spain
Posts: 47
|
two words: IM-PRESSIVE. I've never been such impressed by something remotely related to MPEG4 since... well, Nandub b16(I think), maybe before with VirtualDub VKI MM4.
the next step is a WYSIWYG editor... keep up the good work!
__________________
MPEG4 r00lz! |
![]() |
![]() |
![]() |
#20 | Link | |||
Registered User
Join Date: Jan 2003
Posts: 109
|
Quote:
The "plus" with your project is that everything is included in the MP4. With Microdvd menu is outside of the main AVI, including sounds, images. You must have an executable and some ini files (script) and it may confuse the user, so you have to make an executable to launch everything in the right order. With your project we just have to use a specific wiever and it rocks. Quote:
![]() ![]() When I first learn how to use MicroDVD menu creation it was already a real pain in the ass to figure out all the commands, what were their impact as the guide can not cover each case. But your BT script is at least twenty times longer than my microdvd ones and it is hard to notice what are the lines that are needed for the program to work fine and the ones than can be changed and only needed for the menu. Quote:
I copy vobs and encode menus if they are animated ones or takes snapshots. I encode music of those menus or add ones taken from the movie. Then with the GUI I select the clickable areas. The rest is done by "hand" with notepad (because I'm used to use that program) but you can do it with the GUI. There are some commands to learnt, you put them, you add links from one menu to the next (chapters, audios, etc...). The user should be able to increase/decrease size and type of font for subtitles, didn't see that when playing your SW II sample. Also the possibility to use vobsub subtitles instead of only OCR (srt) ones. The possibility to add more than 2 audios streams, 2 languages and a commentary stream. The possibility to use Ogg as audio, usual stuff like that. I'll keep an eye on your work. ![]() |
|||
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|