VideoHelp Forum




+ Reply to Thread
Results 1 to 9 of 9
  1. Member
    Join Date
    May 2008
    Location
    Washington, DC
    Search Comp PM
    I'm trying to script DVD creation, but am stuck on the part in DVDAuthor where the chapter titles are muxed in with the background via spumux. I was hoping to be able to do it with an Avisynth script (using Subtitle and ImageWriter), but the png's created are 256 colors, but the pngs have to be 3-color pngs.

    I considered doing it in PHP, using GD or the ImageMagick library, but can't figure out to restrict the colors. Maybe using the ImageMagick command line? Or a utility that converts the 256-color png to 3-color?

    Anyway, can anyone point me to a command line windows solution to create a png file that can be muxed into a DVD menu that DVDAuthor can using?

    Much thanks,

    Tac
    Quote Quote  
  2. Member thecoalman's Avatar
    Join Date
    Feb 2004
    Location
    Pennsylvania
    Search PM
    I'm assuming you already have the images and only need them 3 color .png's? You can use something like irfanview to batch process them.

    http://www.irfanview.com/
    Quote Quote  
  3. ...but the png's created are 256 colors, but the pngs have to be 3-color pngs...
    Let's put it like this: It is not possible/allowed to have more than 3 colors (+ transparent background) used on the images. The pngs may be 256 (or even full 32bit) color bitmaps...
    BTW: It is possible to create such images with avisynth. An example is shown here: http://forum.gleitz.info/showpost.php?p=270087&postcount=39
    (the post is in German, but the avisynth scripts are 'international' )
    Quote Quote  
  4. Member
    Join Date
    May 2008
    Location
    Washington, DC
    Search Comp PM
    Thanks! I grabbed the .avs script and the associated .ass file from that post, but couldn't find VSFilterUNI.dll. The closest I could get was VSFilter from SourceForce, I downloaded both Windows NT version (from 07 and from March of 08), both generated an "unrecognized exception" error at the TextSub call.

    Where can I get a version of VSFilterUNI.dll that works with Avisynth 2.57?

    I still don't understand this, but will be thrilled if this method works.

    Tac
    Quote Quote  
  5. Member
    Join Date
    May 2008
    Location
    Washington, DC
    Search Comp PM
    Ok, got this to work -- when cutting and pasting from Firefox to my editor, it seems to get the wrong line ending (unix v. DOS's CRLF), and that was causing the error.

    I changed the script to type="png", and then took two of the picture and put it into menu.xml:

    Code:
    <subpictures>
      <stream>
        <spu start="00:00:00.0"
             highlight="c:\temp\Album2_000003.png"
             select="c:\temp\Album2_000008.png"
             force="yes"
             autoorder="rows">	
    	<button name='meetButton' x0='479' y0='120' x1='547' y1='160'/>
    	<button name='introButton' x0='479' y0='200' x1='547' y1='240'/>
        </spu>
      </stream>
    </subpictures>
    and ran it through spumux

    Code:
    "spumux.exe" menu.xml <background.mpg > menu.mpg
    It's no longer giving me the error message about the 3-color, but it's still producing a dark mpg, with no subtitles. Can you post a sample of what the .xml file should look like, and what files it should be using? There are 8 files generated, I thought the menu.xml only needed 2: the select, and the highlight.

    I realize that this could be because I'm using button code from my earlier project, but it still seems like I should be able to get the mpg menu with the subtitles, even if the button area isn't in the right spot.

    Thx,

    Tac[/code]
    Quote Quote  
  6. Sorry, as it seems, it doesn't work. I just tested the same script and it produces bmps/pngs with a lot of colors (~70 to 5000). The example is for muxman as authoring engine and it has a different algorithm for creating the highlight/selected subs (you can specify which color is used for the three usable colors, all other colors are treated as transparent background).
    Therefore you need an additional program to reduce the colors and set the correct alpha. I just tried it with Irfanview for the file 'album7.png' and it seems to work. It should also be possible with imagemagick.
    Quote Quote  
  7. Member
    Join Date
    May 2008
    Location
    Washington, DC
    Search Comp PM
    When you say "Set the correct alpha", can you describe that a bit more?

    The suggestion on a doom9 forum from Wilbert, who wrote the ImageMagick plugin for Avisynth, on this same issue is to use ImageMagick as following:

    There are several options (i guess you need to use 4 colors with black included):

    1) uses a (changing) palette of 3 colors:

    Code:
    convert subs.png -type Palette +dither -colors 3 output.png
    2) uses a fixed palette of 3 colors with a colortable:

    Code:
    convert subs.png -type Palette +dither -map colortable.gif output.png

    Here a color table is used, which is just a picture with three colors. I guess you could stack three horizontal bars with different colors and save it as colortable.gif (in AviSynth).
    from http://forum.doom9.org/showthread.php?t=138341

    I ran two of the bmp files created by the TextSub routines above, and they seemed to convert to 3 colors okay, and spumux didn't complain, but the menu created was still black. I'm guessing this is because I didn't use a colortable, or didn't set the alpha channel. Any other suggestions? I keep thinking this is getting pretty close...

    Thanks.

    Tac
    Quote Quote  
  8. ...(i guess you need to use 4 colors with black included)
    That's the missing link. The pngs need alpha, or you have to use an additional color (like pure black or white) and define this as transparent.
    Have a look to the manual:
    http://dvdauthor.sourceforge.net/doc/spumux.html
    In the advent that the author is unable to use a graphics format with an alpha channel, then the transparent attribute can be used to describe which color should become fully transparent. The color is in hexadecimal as "RRGGBB".
    Quote Quote  
  9. Member
    Join Date
    May 2008
    Location
    Washington, DC
    Search Comp PM
    Thanks. I think I'm going to give up on my 100% automated creation goal (at the moment) and instead output a GFD project file, which I can then pump through GUI for DVDAuthor which will create the pngs, xml and batch files for muxing, which it does a great job of!

    Thanks to all who contributed to this thread, and who contribute to these amazing tools.

    Tac
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!