BBC Open Sources MHEG+ Toolkit
Some very good news for all the MHEG developers out there, the BBC have this week open sourced the MHEG+ toolkit and it can be downloaded over at the MHEG+ SourceForge page.
The release comes with little in the way of tutorials and so it might all seem a little daunting at first. But having used (and worked on) the toolkit for a couple of years I think it is worth the initial effort and recommend you give it a try.
I intend to write a full getting started guide to help new users over on the MHEG+ SourceForge forum, but for now here are some code examples and an ultra-quick guide to getting the toolkit up & running…
Code Examples
There is a simple “Hello World” MHEG+ application downloadable from the MHEG+ subversion repository.
This blog also has two examples of MHEG+ code, see these posts #1, #2.
Ultra-quick MHEG+ getting started guide
The toolkit contains a compiler and an emulator. Currently both are available for download as a separate Java .jar files. You will need Java installed to use them.
To use the emulator/debugger, download the file named MhegPlus.MhegPlayer-1.0.1.jar and issue the command:
java -jar MhegPlus.MhegPlayer-1.0.1.jar
This will launch the Mheg Player GUI.
To use the compiler first download the file named MhegPlus.Compiler-1.0.1.jar. The compiler can invoked with the following command, but you will need to pass command-line options to get anything meaningful out of it:
java -jar MhegPlus.Compiler-1.0.1.jar
You can get help on the various compiler options by passing –help, e.g.:
java -jar MhegPlus.Compiler-1.0.1.jar --help
usage: mhegplus
-p,--output-app output application file? (optional)
-d,--output-dir output directory (optional)
-P,--output-app-sans-extension output application file as a or startup
(optional)
-l,--log-level log level
(FINE|INFO|WARNING|ERROR|SEVERE)
-a,--asn1 select ASN.1 output (default)
-f,--application application file
-h,--help print this help
-t,--text select text output
-v,--version report version number
Happy MHEG+ing!

any chance of a few more MHEG-5 application samples possibly including http return path interaction. There is not much reference information for MHEG-5 on the net for the amature coder. I have built a few test appilication but would like to make a bit more advanced.
@Jonathan Davies – the very simplest way of using the return path is by passing a http or htpts URL in the :OrigContent attribute for, say, a :Bitmap or :Text object, e.g.:
{:Bitmap bmpLogo
:OrigContent :ContentRef (“http://www.blah.com/logo.png”)
:OrigBoxSize 200 100
:OrigPosition 150 100
}
There are also resident programs in the UK profile, e.g RDa (ReturnData) to get arbitrary data over http. And SHF (SetHybridFilesystem) resident program for configuring the hybrid filesystem, making a http path appear to be part of the carousel.
I have already used the contentref to bring a file from the web into my test application on a test STB unit I can run an application on the STB no problem and I can bring images .txt files into the application from the web connection but the application files have to be on the STB stored on a USB drive at this stage.
The problem I am having is understanding how to have a launch application that then links to the main application files hosted on a web server. The basic format used to run a return channel service on Freesat basically over air launch app the main application web delivered.
any help would be much appreciated.
this is my only real sticking point at this time then comes the xml integration for live data but that’s another story
As I have not much hair left to pull out over this problem.
hello sir
is the application written in MHEG+ compatible with MHEG5 engine?
if yes then please tell me from where i can get tutorial about mheg+.
Thanks
@rajat, MHEG+ is 100% compatible with MHEG5. The MHEG+ compiler compiles into MHEG5 text or ASN.1.
Regarding tutorials, there is a “Hello world” tutorial on the MHEG+ SourceForge site: http://sourceforge.net/apps/mediawiki/mhegplus/index.php?title=Hello_World_Tutorial
Well I have built my first application got images and Dynamic text loading from web server via interactive channel on a demo STB.
My only issue is how to have the resident STB application access additional Pages that reside on web server not as over air feed e.g. scene1 loads scene2 on press green button works fine when scene1 and scene2 are both on STB as over air feed how can scene1 load scene2 when scene2 is on web server instead of over air e.g. http://www.myweb.com/scene2.mheg+
Hope I explained that ok as you can obviously see this is with a view to the application working with Freesat and possibly via the FreeView HD platform in association with the return channel feature.
Any help would be appreciated.
Is there a basic sample application available showing or can any one give me a few hints how to include a video file into my application using the return channel for example video file name test.mpg so the file is loaded into application in a section of screen or even as background? there is so little code sample or documentation available on Mheg5 must be an opertunity for some one to publish a tutorial come on BBC got to be worth a book.
The Mheg+ compiler will not allow http to be included in a scene as it is not part of the UK.DTT profile any idea how to overcome this?
Sorry if this question is a little off list – but i have a basic question about the source of content in MHEG apps. If i want to include video content (for example) into my application does the video content have to come from the web over the broadband connection or can it come over the air on normal broadcast channels (e.g., a la VOD)? If the content can come over the broadband connection is it somehow packaged in MHEG or how does time synchronization with my other content work? If you could point to a good tutorial on this would be appreciated.
I have managed to run my application as a web based service with my test STB accessing the startup file and the whole service based on my web server via the STB web browser been directed to the correct URL.
How can I produce a local based eventually over air but for test USB based on STB trigger to access the web based service?
I have tried to encode via the Toolkit an application to link to a web URL but just get that the UK DTT does not support HTTP. Given the Freeview HD and Freesat return channel option this is strange?
Your help would be much appreciated.
Any chance of an example showing an Interactive application that pulls audio via the return channel?
Lack of mheg examples does tend to make life rather difficult, doesn’t it… I’ve got what I think should be a simple question, but have spent the best part of a week trying to find an answer, to no avail. I’ve got “hello world” working, and broadcasting out as part of a transport stream which my test TV understands fine. The app is triggered, everything is good. What I cannot fathom is how to have a transparent background on my app… I know it’s possible because if I hit the red button on BBC1, I see the mheg app load up on the right hand side, sitting on top of the TV channel. What am I missing? I’ve tried adding transparency to the background colour but it seems to make no difference at all. Any guidance would be gratefully received! Thanks
i am new to mheg scripting language , can any one help me sample code for pushbutton ,the MHEG + is showing pushbutton is not supported by “uk 1.06 profile” thanks in advance
Where are you developing? As you have already found, pushbutton won’t work on a UK receiver (or at least, it’s not supposed to, as far as I can tell…)
can i now which profiles support what feature : -) any sample code for Pushbutton pls. Thank you very much for your reply
I’m afraid I’m not familiar with any document that summarises the various profiles’ support for different MHEG features; that said, with the greatest of respect, I think you’re coming at this backwards. First decide which profile you’re writing for and then consult the documentation for that profile (e.g. if you are writing for UK Profile then consult the UK Profile specs…) – I’m afraid I only have experience with UK so can’t comment on pushbutton; I’ve never used it. Also MHEG is a tricky language, not much documentation, not many people around who use it… sorry I can’t help more!
thanks for your reply