View Full Version : MP4MenuGUI
IMOON
27th October 2006, 20:39
I have tried to write a simple GUI, witch make it easier to create dvd-like menus in a mp4 file.
Download the latest build (https://sourceforge.net/project/showfiles.php?group_id=180851)
Required tools:
Microsoft .NET Runtime 2.0 (http://www.microsoft.com/downloads/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5&DisplayLang=en)
Avisynth 2.57 (http://www.doom9.org/Soft21/SupportUtils/Avisynth_257.exe) for video preview
MediaInfo.dll (http://sourceforge.net/project/showfiles.php?group_id=86862)
The GUI can create a bt script witch is similar to bonds mp4menu script, thank you for your great work bond.
The program has some elements from MeGUI, like the video preview, also a great thanks to all developers of MeGUI.
A small guide
You must encode the menus with x264 or an other mpeg4 encoder before you can start using the gui (detailed instructions will follow).
the following formats are supported as input:
video: in avi and mp4, alternative you can use an image (jpg) as "video" input.
audio: mp3, mp3 in avi, aac in mp4
subtitle: srt(text file)
chapterfile: ogg file format
Now you can start MP4MenuGui. First specify all movie inputs. If you use mp4 files as input you must specify witch track you want to use. You can use Yamb to find out witch is the right. If you use anamorphic encoding you have to correct the world size to the display size of the movie video (later it should be calculate automatic). You can use the build-in Chapter Creator to change the chapter file. You have to save your changes before you exit it.
config the Menus
What is the difference between menuinput and menu?
A menuinput is a video or image file. A video input can contains more than one menu, so a menu is a part of a input, with a start and end frame.
Before you start to configure the buttons I recommend that you create all necessary inputs and menus, so that you can link to these menus. To create a new button select a button type (rectangle or ellipse) by clicking on the icon. Now click and hold the left mouse button somewhere in the preview window and draw the button.
In the menu option window you can place the buttons and specify the actions. If the video is anamorphic you have to correct the DAR.
create the script and the mp4 file
To create a bt script click "Save as BT" and select the output file. You need a compiler/encoder like the mp4box (http://kurtnoise.free.fr/index.php?dir=mp4tools/)to convert the script into binary format in mp4. Execute the following command line:
"c:\path to\mp4box.exe" -mp4 "c:\path to\output.bt"
Playback
For playback those files you need a mpeg-4 systems 2D player.
the best currently free available is the Osmo4 from GPAC (http://gpac.sourceforge.net/)!
TODO:
- write a better guide :D
- set language and track name (improving the process)
- make the menus selfrepeating
Maybe it would be useful for some of you.
SeeMoreDigital
27th October 2006, 22:02
I'll certainly give your application a look ;)
Adub
27th October 2006, 23:13
Sweetness!
Adub
27th October 2006, 23:14
You know, MeGUI should have a MP4 menu creator. Maybe somewhere in the distant future.
Kurtnoise
28th October 2006, 07:58
When i click on "Menu Options", I get this :
http://img93.imageshack.us/img93/3817/mmerror1wt8.th.png (http://img93.imageshack.us/my.php?image=mmerror1wt8.png) http://img93.imageshack.us/img93/615/mmerror2lk8.th.png (http://img93.imageshack.us/my.php?image=mmerror2lk8.png)
What's wrong ?
bond
28th October 2006, 13:03
sounds great! only just, anyone having a compile? :D
IMOON
28th October 2006, 16:06
@bond binaries will come in the next hours
@Kurtnoise13: it looks like you have pressed the menu option button without specify a menu input source and the program doesnt check it.
Kurtnoise
28th October 2006, 17:01
Alright...thanks.
Here (http://kurtnoise.free.fr/index.php?dir=misc/&file=mp4menugui.7z)is a compile.
Note: MS .Net Framework 2.0 & Avisynth needed of course...
bond
28th October 2006, 17:19
Alright...thanks.
Here (http://kurtnoise.free.fr/index.php?dir=misc/&file=mp4menugui.7z)is a compile.
Note: MS .Net Framework needed of course...thanks! tough i cant get it to work. it always freezes when i try to open a video file (menu or movie) :(
Kurtnoise
28th October 2006, 17:56
Yes video loading is quite long for me but no freezing. btw do you have any error messages after the freeze ?
Some screenshots:
http://img111.imageshack.us/img111/2095/mp4menugui1xr0.th.png (http://img111.imageshack.us/my.php?image=mp4menugui1xr0.png) http://img56.imageshack.us/img56/6933/mp4menugui2ce9.th.png (http://img56.imageshack.us/my.php?image=mp4menugui2ce9.png)
IMOON
28th October 2006, 18:27
I think its because I check with MediaInfo if there is any video track.
Also to load a preview is quite long because it use Avisynth.
PS. bin is on sourceforge.
bond
28th October 2006, 18:39
i cant get this to work at all. it crashes on everything i do, except loading the movie video from .avi (eg when loading a video .mp4 it simply closes itself)
when i try to open an audio mp4 it crashes sometimes with error message, sometimes without
i have .net 2.0, latest avisynth alpha (which works fine normally) and the mediainfo included
IMOON
29th October 2006, 16:39
i cant evaluate such a behavior, i have tested any source i have found.
witch version of mediainfo do you use? its tested with 0.7.2.1 and 0.7.3.1
bond
29th October 2006, 16:41
i cant evaluate such a behavior, i have tested any source i have found.
witch version of mediainfo do you use? its tested with 0.7.2.1 and 0.7.3.1i used the one in your package
IMOON
30th October 2006, 16:54
i used the one in your package
then i haven't any idea.
Have you more details? witch codec or witch error when an error message is shown?
Hyper Shinchan
30th October 2006, 17:06
Amazing! ASAP I'll try it I've never tried to figure out bt script, maybe this will be my chanche to use them (if this GUI can make easily usable mpeg-4 systems IMOON will become one of my hero!).
Mc Onyx
5th November 2006, 15:40
Wow! Great work, thank you very much, been waiting for something like this for a year now! :) Gonna try ASAP
Zero1
5th November 2006, 20:03
I can see myself perhaps using this if only for spec compliant chapters.
Great work, I know a bunch of people involved in creative projects who could benefit from MP4 menus and other clever stuff.
Hopefully as your project gains momentum, others will follow suit (perhaps Haali would be willing to implement some more systems in his splitter? :p)
Hyper Shinchan
6th November 2006, 17:41
Mhh... to me it crashes each time I try to add a stream after I've added already one. I can add only one stream (audio,video or subs or anything else), then it crashes.
I'm on SP1 (.NET 2.0 is designed for SP2), maybe it could be the reason, but I don't have problems with MEGui....
IMOON
8th November 2006, 20:32
hello Hyper Shinchan,
sorry for my late response.
if you don't have a error message try the new release. There should be a error message if open an input fails. Maybe we find then the bug.
new in this release is only the possibility to use intros for the menus (not tested yet, outros follow).
bond
8th November 2006, 22:25
btw some sort of compatibility mode with enviviotv would be nice, cause than we could play the files with menus in any directshowplayer, quicktime and realplayer (enviviotv doesnt support avc tough)
check out my profile 2 of mp4menu for how it could look like
Kurtnoise
9th November 2006, 09:38
Request: to have the possibility to move buttons with the mouse.
Edit : my last compile is available here (http://kurtnoise.free.fr/misc/).
IMOON
9th November 2006, 10:31
@Kurtnoise13: is added to my todo list.
@bond:now I use a mix of your profile 1 and 2, so it should not so difficult to realise this. what I have to consider? only not to use mediacontroll and mediasensor or something else like input type or so.
bond
9th November 2006, 22:18
@Kurtnoise13: is added to my todo list.
@bond:now I use a mix of your profile 1 and 2, so it should not so difficult to realise this. what I have to consider? only not to use mediacontroll and mediasensor or something else like input type or so.hm actually its so long ago i wrote it, i dont know anymore what enviviotv handles and what not
generally i can say that obviously everything included in profile2 is handled by enviviotv. the more advanced stuff might not work (i think it was the intros and outros for example...)
i fear you will need to grab a copy of enviviotv on the net and try yourself :(
Hyper Shinchan
10th November 2006, 17:54
hello Hyper Shinchan,
sorry for my late response.
if you don't have a error message try the new release. There should be a error message if open an input fails. Maybe we find then the bug.
Thank you, I was pretty busy lately too ^^.
I'll try it and I'll report, anyway the link to AVSynth seems death.
IMOON
10th November 2006, 18:51
@bond: I have downloaded it and will try to find a working script this weekend.
@Kurtnoise13: it was easier than I thought, so version 0.1.1.5 is up.
Now you can create, move and resize the buttons with your mouse.
anyway the link to AVSynth seems death.
I will update the link(new version of avisynth).
Kurtnoise
11th November 2006, 10:01
it was easier than I thought, so version 0.1.1.5 is up.
Now you can create, move and resize the buttons with your mouse.
Great...now some other requests. :p
Custom colors for buttons.
Custom buttons types.
Custom width line for buttons.
Hyper Shinchan
11th November 2006, 10:12
Nothing to to with the latest release too (both official and Kurt's builds). It says that my memory is probably corrupted (???), but it can also crashes without prompting the error message and just making an error windows sound.
bond
11th November 2006, 11:32
i also get this corrupted memory error when try to open files
IMOON
13th November 2006, 21:08
hello,
@bond, Hyper Shinchan: you can try this version without mediainfo support. Maybe it's mediainfo. Please try also to open the your sources in MeGUI with the avisynthCreator, he also checks the input with mediainfo.
Also an updated normal version is up.
version 0.1.1.6 with a enivio mode. in this mode you can not specify subs, chapters, intros and you have only 1 menu per input.
Not tested with envivio, envivio doesnt work for me until now.
@Kurtnoise13: what do you mean with Custom buttons types? Free hand drawing?
The other things are realised.
Kurtnoise
14th November 2006, 10:49
what do you mean with Custom buttons types? Free hand drawing?
I mean something like Text, Shape, Line, Rectangle, Ellipse...
pyrates
27th November 2006, 00:20
this looks like a great program. Maybe later on we'll be able to pop in a dvd movie and this will automatically create all the menus for us and we just gotta encode it correctly in h.264. That be sweet then.
nickolasemp
30th November 2006, 00:27
that is not so likely to happen in the near future, pyrates...
pyrates
30th November 2006, 06:07
that is not so likely to happen in the near future, pyrates...
Well here's hoping it does.
Hyper Shinchan
7th December 2006, 11:20
hello,
@bond, Hyper Shinchan: you can try this version without mediainfo support. Maybe it's mediainfo. Please try also to open the your sources in MeGUI with the avisynthCreator, he also checks the input with mediainfo.
Sorry but I couldn't post before. Yes, it works in this version without the mediainfo dll (I wasn't able to see the menu in Osmo4, but maybe I made something wrong, I'll check it out better later).
bond
8th December 2006, 12:09
hello,
@bond, Hyper Shinchan: you can try this version without mediainfo support. Maybe it's mediainfo.hey it works, finally i am able to check out this tool :)
Please try also to open the your sources in MeGUI with the avisynthCreator, he also checks the input with mediainfo.crashes too
version 0.1.1.6 with a enivio mode. in this mode you can not specify subs, chapters, intros and you have only 1 menu per input.
Not tested with envivio, envivio doesnt work for me until now. any news on this?
bond
8th December 2006, 15:26
IMOON your tool is really great :)
i think its very straight forward and easy to use, especially the button setting!
still i had some issues:
- the buttons werent clickable in osmo4 :(
- segmentDescriptor is only written when setting two menus for the menuvideo input. if only specifying one menusegment there is no segmentdescriptor written (of course it doesnt make sense to have a menuvideo input thats bigger than the needed menu itself)
- how to change the trackid of a .mp4 input file in mp4menugui?
- the attached chapter file causes the following error:
System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei MP4MenuGui.ProjectUtil.GetTimeCodeDuration(String timecode1, String timecode2)
bei MP4MenuGui.ProjectUtil.ExportAsBt(Project project, String path, String& error)
bei MP4MenuGui.MainForm.SaveAsBTClick(Object sender, EventArgs e)
bei System.Windows.Forms.Control.OnClick(EventArgs e)
bei System.Windows.Forms.Button.OnClick(EventArgs e)
bei System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.ButtonBase.WndProc(Message& m)
bei System.Windows.Forms.Button.WndProc(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)maybe the chapterfile has some formats that arent supported?
IMOON
9th December 2006, 17:26
crashes too
than it must be an configuration error on your system, I think. So I will offer a mediainfo free solution for the future releases.
any news on this?
no. No version of envivio works for, no audio or video with any mp4. But I will try it later again.
the buttons werent clickable in osmo4
have you specified the "Link To" field. If so maybe you can post your bt.
segmentDescriptor is only written when setting two menus...
I haven't think on the possibility that the only Menu is shorter than the input.:p
On my TODO list.
I will try out your chapter file but it looks like a normal ogg, so it should work.
For your trackid problem look here:)
http://img150.imageshack.us/img150/1786/mp4menuguitrackidgu7.th.jpg (http://img150.imageshack.us/my.php?image=mp4menuguitrackidgu7.jpg)
bond
9th December 2006, 19:27
than it must be an configuration error on your system, I think. So I will offer a mediainfo free solution for the future releases.thx, what is the purpose of mediainfo?
have you specified the "Link To" field. If so maybe you can post your bt.you mean the "link type" and "link action" fields? if yes, i specified them (btw great idea how you handled this)
attached is the bt (the audio/video streams are from my mp4menu sample you propably know)
I haven't think on the possibility that the only Menu is shorter than the input.:p
On my TODO list.yeah, it doesnt make much sense i know ;)
For your trackid problem look here:) yeah i tried this, but it doesnt seem to let me set ids like "201", propably it only allows one digit ids?
Drachir
9th December 2006, 21:53
In the sample bond posted the dimension(pixelWidth/pixelHeight) of the scene is set to zero.
It seems that TextAppearance isn't used. Also there are no subtitle so there should no need for an AnimationStream.
There still could be other problems, if I find a nice video source I will try MP4MenuGUI too, and will do an deeper look at the created BIFStext.
To bad MP4MenuGUI doesn't run at Linux.
Will subtitle included as BIFS stream (text node) or streaming text stream(aka 3gp timed text) into the scene?
It would be nice to allow more than two audio streams.
For Audio input from AVI and subs it would be nice to be able to set the language.
You can do it this way :
ObjectDescriptor {
objectDescriptorID 20
esDescr [
ES_Descriptor {
ES_ID 4
OCR_ES_ID 1
muxInfo MuxInfo {
fileName "german.aac"
}
langDescr LanguageDescriptor {
languageCode "ger" #set languge in ISO 639-2
}
}
]
}
bond
10th December 2006, 13:15
i realised what caused the button to not be clickable. it was placed on a wrong place!
when i click on it, it starts the movie as it should tough
IMOON
10th December 2006, 19:50
thx, what is the purpose of mediainfo?
mediainfo reads out the dimensions and the playtime of the video and if there is an video/audio track.
yeah i tried this, but it doesnt seem to let me set ids like "201", propably it only allows one digit ids?
yeah I think that was probably a stupid restriction. I will fix this.
i realised what caused the button to not be clickable. it was placed on a wrong place!
It was an bug of "your" version, the menuinput/world has the dimension 0x0 so the positions was calculatet wrong. And you have to correct the world size in the project settings ("File/Project Settings") to the correct value.
In this version you can choose if you want to use mediainfo or not (under "Tools/Standard Settings")
Because I need some information of the video I use AviSyth, if mediainfo disabled, to get them and for long video it takes a lot of time. So be warned;) . Maybe I will find an other solution.
Now it use a segmentDescriptor for every input.
bond
10th December 2006, 20:16
thx, i will try it now
the best would be propably to fix mediainfo. i told zenitram about it here:
http://forum.doom9.org/showthread.php?p=914951#post914951
IMOON
10th December 2006, 20:18
@Drachir: I'm not so familiar with BIFS so please post errors in the created script.
How many audio streams are useful?
Is there also a way to define the track name.
@bond: yes. thanks
bond
10th December 2006, 20:36
ok, the button problem is fixed now :)
i set manually the world size in the project settings. i noticed that a custom dar is set automatically, why is that? when i set the dar to 1 (i think thats the default setting?) i noticed that the buttons are not placed correctly anymore (aka gone)
i will try a more complicated menu now
Drachir
10th December 2006, 21:45
@Drachir: I'm not so familiar with BIFS so please post errors in the created script.
I will see that I find some time to make some test too.
How many audio streams are useful?
Good question, I have some DVD which comes with about six audio language. ;)
Is there also a way to define the track name.
As far as I know there is no way to set the handler name.
May be you can ask Jean Le Feuvre to add this feature to MuxInfo http://gpac.sourceforge.net/doc_bt.php .
For the handler name you will find this in 14496-12:
name is a null-terminated string in UTF-8 characters which gives a human-readable name for the track type (for debugging and inspection purposes).
So I would say it wasn't created for the purpose it is used today from some splitters.
bond
10th December 2006, 23:07
fantastic! i now tried everything (including switching subs (they are done as bifs text), switching audio, chapters, chaptermenu, languagemenu, subtitlemenu, small extra menu) but excluding intros/outros and everything worked fine in latest osmo4 :)
actually i think using you gui is damn easy!
to see the result try a sample yourself:
http://www.megaupload.com/?d=TNU8SN6Z
note that its obviously not the full movie, therefore only chapters 1-3 should work (meaning should seek in the movie)
try latest osmo4 from here:
http://home.wildit.net.au/celticdruid/mirror/gpac/dev/
note that when playing the sample in a normal directshow player with haali the normal movie is played
next i will try intros/outros :D
IMOON:
- is it possible to make the menus selfrepeating, like in my old sample?
- dunno if its easily doable, but when copying buttons it would be great if mp4menugui would remember that the buttons have been copied before and eg call them "buttonname_copy1", "buttonname_copy2" aso... that way people wouldnt need to rename every button when its copied more than once (very likely imho with chaptermenus)
- also the option to keep the link action value when copying buttons might be useable (depends on the structure of the menu of course, eg if there are more 100% identical buttons or more different buttons at the same position)
- osmo4 still seems to have the problem to seek exactly to a specified frame sometimes (not always!). i noticed this with my sample with the chaptermenus, which are single frames. i used to fix this problem in my old sample by adding 0.01secs to the position, so osmo4 seeks this 0.01 more than actually needed for the specified frame but therefore shows the wanted frame correctly. maybe you also want to consider to include this workaround (judging from the time gone since my first sample i dont think it will be fixed in osmo4 soon ;) )?
Zenitram
11th December 2006, 14:13
If you have a crash with MediaInfo.dll, please contact me at zen@mediaarea.net, we will work on it together.
Zen, developper of MediaInfo
Drachir
11th December 2006, 15:22
fantastic! i now tried everything (including switching subs (they are done as bifs text),...
If you want use streaming text aka 3GPP timed text instead of an additional BIFS stream, you only need to remove textNode and fontNode from MuxInfo.
http://gpac.sourceforge.net/doc_bt.php
textNode, fontNode : required string identifier for SRT importing, ignored for other streams. SRT importing is done by creating a BIFS animation stream
carrying the text and fonts modifications (sample available in regression test suite).
The textNode shall be the DEF identifier of the text node to modify (it can be a proto, but then it MUST have an MFString field named "string")
The fontNode may be ignored. If set, it shall be the DEF identifier of the font node to modify (it can be a proto, but then it MUST have an SFString field named "style")
If you use 3GPP timed text you don't need this any more in the scene:
PROTO TextAppearance [
exposedField SFVec2f position 0 0
exposedField SFNode text NULL
]
and
TextAppearance {
text DEF TXT Text {
fontStyle DEF FONT FontStyle {
size 12.0
family "SANS"
style "PLAIN"
justify ["MIDDLE"]
}
}
}
The AnimationStream is still needed.
A sample can be found in the regression tests:
http://gpac.cvs.sourceforge.net/gpac/gpac/regression_tests/bifs-misc-srt-import-3gpp.bt?view=markup
You can use a ttxt file instead of a srt file.
There is a newer version of the 3GP timed text authorhing format ttxt out, to avoid problems with apostrophe.
<?xml version="1.0" encoding="UTF-8" ?>
<!-- GPAC 3GPP Text Stream -->
<TextStream version="1.1">
<TextStreamHeader width="720" height="400" layer="0" translation_x="0" translation_y="0">
<TextSampleDescription horizontalJustification="center" verticalJustification="bottom" backColor="0 0 0 0" verticalText="no" fillTextRegion="no" continuousKaraoke="no" scroll="None">
<FontTable>
<FontTableEntry fontName="Sans-Serif" fontID="1"/>
</FontTable>
<TextBox top="0" left="0" bottom="395" right="720"/>
<Style styles="Normal" fontID="1" fontSize="30" color="ff ff ff ff"/>
</TextSampleDescription>
</TextStreamHeader>
<TextSample sampleTime="00:00:00.000" xml:space="preserve"></TextSample>
<TextSample sampleTime="00:00:00.914" xml:space="preserve">Studio Ghibli presents
A FILM BY MIYAZAKI HAYAO</TextSample>
<TextSample sampleTime="00:00:06.580" xml:space="preserve"></TextSample>
<TextSample sampleTime="00:00:15.262" xml:space="preserve">In ancient times the land
lay covered in forest...</TextSample>
<TextSample sampleTime="00:00:19.130" xml:space="preserve"></TextSample>
<TextSample sampleTime="00:00:19.232" xml:space="preserve">...where from ages long past
dwell the spirits of the gods.</TextSample>
<TextSample sampleTime="00:00:27.401" xml:space="preserve"></TextSample>
<TextSample sampleTime="00:01:29.569" xml:space="preserve">Yakul!</TextSample>
Is 3gp Timed Text supported by Envivio TV? How good are the included audio/video decoder?
bond
11th December 2006, 18:36
Is 3gp Timed Text supported by Envivio TV? How good are the included audio/video decoder?i dont think its supported. enviviotv should support asp and aac, but no avc (there used to be a h264 version on the net, but it doesnt seem to work/be compliant)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.