Home > MHEG, Red Button > BBC Open Sources MHEG+ Toolkit

BBC Open Sources MHEG+ Toolkit

MHEG Player showing the Freesat Red Button homepage

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!

About these ads
  1. Jonathan Davies
    September 18, 2010 at 10:24 pm

    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.

    • purple floyd
      September 23, 2010 at 1:25 pm

      @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.

      • Jonathan Davies
        September 30, 2010 at 12:16 pm

        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.
        this is my only real sticking point at this time then comes the xml integration for live data but that’s another story :) any help would be much appreciated.
        As I have not much hair left to pull out over this problem.

  2. rajat
    September 23, 2010 at 10:34 am

    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

  3. purple floyd
    September 23, 2010 at 1:27 pm

    @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

  4. Jonathan Davies
    October 8, 2010 at 7:49 pm

    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.

  5. Jonathan Davies
    October 25, 2010 at 4:23 pm

    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.

  6. Jonathan Davies
    October 28, 2010 at 1:47 pm

    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?

  7. seamus gilchrist
    November 5, 2010 at 11:47 am

    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.

  8. Jonathan Davies
    November 12, 2010 at 3:34 pm

    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.

  9. Jonathan
    April 11, 2012 at 9:32 pm

    Any chance of an example showing an Interactive application that pulls audio via the return channel?

  10. Jules
    September 24, 2012 at 4:29 pm

    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 :-)

  11. vinayakadj
    February 17, 2013 at 12:23 pm

    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

    • Jules
      February 17, 2013 at 12:41 pm

      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…)

      • vinayakadj
        February 17, 2013 at 1:13 pm

        can i now which profiles support what feature : -) any sample code for Pushbutton pls. Thank you very much for your reply

      • Jules
        February 17, 2013 at 3:00 pm

        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!

  12. vinayakadj
    February 18, 2013 at 4:03 pm

    thanks for your reply :-)

  13. andrea
    September 13, 2013 at 5:56 pm

    i see there’s still some people working on mheg, here..

    i wrote some apps and made up a Transport stream for demonstration:
    http://www.avalpa.com/the-key-values-product/9-avalpa-answers/80-mheg-applications

    for writing MHEG code slightly easier, i wrote a pre-processor, and i’m wondering if that would help someone..

    • Jonathan
      September 13, 2013 at 6:16 pm

      Ye still few of us out here its pitty mheg has not been picked up by more developers
      Any code is always welcome

      • andrea
        September 14, 2013 at 6:24 am

        i’ll write here when we’ll publish the project.
        BTW are there other community resources for hanging around like mailing list, forum or irc chat to get along with MHEG mates?

      • September 25, 2013 at 11:33 am

        i hope it’s not seen as spam or not compliant with local rules, excuse me, in that case..
        anyway i’d like to announnce i’ve decided to set up a forum for last MHEG developers as a place for hanging out:
        http://www.avalpa.com/forum/viewforum.php?f=14

      • jonathan
        September 25, 2013 at 11:38 am

        spot on had thought about doing my self but was not sure if enough would use.
        Well done.
        Will join asap

      • September 27, 2013 at 9:23 am

        I supposed there were still some MHEG lurkers, out in the wild. let’s hope to grow somthing there.
        I’ve put my small script and some info about usage there, it’s attached to this post: http://www.avalpa.com/forum/viewtopic.php?f=14&t=13#p30

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: