diascope: related stuff

Pimp my menu

Pimp my menu
Animated DVD menus with dvdstyler.
  • Background
    Dvdstyler is a very nice and visual program for the generation of dvd menus. While I usually don't need much else for putting together my own dvd menus the one thing that I miss are animated menu backgrounds and video thumbnails. Therefore, I wrote pimpmymenu. This short bash script requires similar software as diascope: ppmfilter from the smilutils and ffmpeg for the audio/video encoding. Pimpmymenu is much more of a quick hack than diascope, it doesn't do much error checking at all.
  • Download
    Get pimpmymenu 0.1 (right-click, save as ..., make executable and run without parameters for a help screen).
  • Work flow
    1. Create a menu in dvdstyler that looks, for example, like the menu above. The purple background colour (#A029F0) will later be replaced by a background video, the empty buttons will be filled with animated thumbnails.
    2. Set dvdstyler to not remove temp files (Configuration/Settings/Core/Don't remove temp files), run it and abort after the preview.
    3. Create an <input file> for pimpmymenu to describe the desired overlays. The general syntax is this:
      # First menu:
      menuX-Y <video|audio> <background video or audio> [rgb=RRGGBB] [over=<overlay video> pos=<X,Y,W,H> [hold=<S>] [len=<S>]] [over=...]

      # Second menu:
      menuY-Z ...
      For example:
      menu1-0 video mond.mpeg rgb=A029F0 over=kitchen.mpeg pos=444,37,223,167 hold=4 len=11 over=overlay.mpeg pos=288,324,381,215 len=10
      • menu1-0 is the name of the menu mpg file that dvdstyler generates,
      • mond.mpeg is the background video and rgb=A029F0 is the colour to be replaced,
      • over=kitchen.mpeg pos=444,37,223,167 hold=4 len=11 means to overlay kitchen.mpeg at the specified position (X,Y,W,H), to hold 4 seconds before kitchen.mpeg starts playing and to play a maximum of 11 seconds from this overlay,
      • and then it repeats for the next overlay,
      • and then repeat for the following menus that you want to pimp.
      In order to determine X,Y,W,H use the crop dialogue of, for example, the gimp on menu1-0.mpg_highlight.png. Note that the overlays for each menu must be on one line, i.e. no line breaks. Don't save any of your own files in dvdstyler's temp directory or they will be lost as you rerun dvdstyler.
    4. Switch to the temporary directory that dvdstyler has created. That's the one where the menu files (menu1-0.mpg_bg.mpg etc) are located.
    5. Run pimpmymenu <input file>. It will print something like this:
      ** Menu menu1-0
         Background mond.mpeg: 25 seconds (625 frames).
         Replacing colour A029F0 by transparency
         Overlay kitchen.mpeg: 11 seconds (275 frames), using 100:275:250.
         Overlay overlay.mpeg: 10 seconds (250 frames), using 0:250:375.
         Preparing audio menu1-0.mp2
         Preparing video menu1-0.mpg
      Done. You can now run mkisofs to build the DVD like so:
      rm -rf VIDEO_TS AUDIO_TS
      spumux menu1-0.mpg_spumux.xml < menu1-0.mpg > menu1-0.mpg.spm
      mv -f menu1-0.mpg.spm menu1-0.mpg
      dvdauthor -o /tmp/dvd/dvd -x dvdauthor.xml
      mkisofs -V DVD -o dvd.iso -dvd-video /tmp/dvd/dvd
    6. Run the final commands as proposed by pimpmymenu. These are the commands that dvdstyler would run for you if you hadn't interrupted after the preview.
    7. Test the whole thing using
      xine dvd://${PWD}
    8. If all went well you should now have a menu that looks kind of like the example at the top of this page, and an iso that's ready to be burned.
  • Bug reports
    Please use the diascope mailing list for comments or bug reports.