MPEG Still Images

last updated: 20-Dec-2002 | introduction | aspect ratio issue | tv cropping/overscan | XML authoring | conclusions | back to index

Donate! If you like using this guide, then please help with its development by donation!  You can do so by clicking on the button to the left.  The donation is handled securely via PayPal.  Thank you.

Introduction

Although VCD2.0 only supports video clips at a resolution of 352x240 (NTSC) or 352x288 (PAL), it supports single-frame still images at high resolution: 704x480 (NTSC) and 704x576 (PAL).  These single frames are still encoded as MPEG-1 for VCD and they reside in the SEGMENT folder of the VCD.  The are authored onto the disc with VCDImager by referencing them under <segment-items>.

There is a freeware tool that can be used to create these, TSCV, but the quality isn't very good.

More recently, the other main Windows based VCDImager GUI named "VCDEasy" has included a tool that makes "real" VCD and SVCD stills (GUI to MJPEG Tools).  I strongly suggest that you try this if you want to try a freeware option.  Indeed, encouragingly, the author has implemented some of the tips and ideas expounded in this very guide! (including aspect ratio and cropping issues)  See the addendum on VCDEasy at the end of this guide.

The only other way is to use another VCD authoring tool that can natively encode the source bitmaps into the correct format for the MPEG stills.  Then, these MPEG stills can be incorporated into the VCDImager project.  A fellow that goes by name "mikk" has written an excellent method using Video-CD 2.0 Toolkit 1.0.  This tool has been ?released as freeware.  His guide can be found here: http://www.geocities.com/mikk999/VCDStills.htm

There will be no CUE/BIN sample of the MPEG still image to download.  The PAL/NTSC Demo VCD has an example of the still image.  This can be downloaded here: http://www.vcdimager.org/pub/vcdimager/examples/demovcd/

Thus, in this guide, encoding of the actual stills will not be discussed as it has been covered in the aforementioned link.  This guide will cover two main areas:

  1. Creation of the bitmap source file
  2. Usage of the MPEG still and authoring the XML on the VCD

 

Creation of the Source File

Obviously, the goal is the creation of bitmaps (BMP) with a framesize of 704x480 for NTSC, and 704x576 for PAL.  To create these files, any good image editing program will do (e.g., Jasc's Paint Shop Pro or Adobe PhotoShop).  However, things are not so simple...

  1. The issue of aspect ratio
  2. The issue of TV overscan / cropping

 

The Issue of Aspect Ratio

This is a point few people take into consideration when creating still images for VCDs, but it is very important.  It is especially important for photos.  (Note, this is no longer an issue if you are a user of VCDEasy for the creation of stills.  See the addendum.)

The whole problem arises from most people's familiarity with computers.  On the computer, pixels have a 1:1 ratio.  What this means is that each pixel is as high as it is wide.  This means that the display aspect ratio (which refers to the proportion of the width to the length of the screen) is directly proportional to the height and width in pixels.

For example, the PC monitor has a display aspect ratio of 4:3.   That means if a PC monitor is properly configured, the screen should be 4 units wide to 3 units high.  If we look at the screen resolution of 800x600, this agrees with this too (800:600 = 4:3).

Now, here's the intuitive (or unintuitive!) leap.  The display aspect ratio of S/VCDs is COMPLETELY INDEPENDENT to its pixel resolution.  In other words, the pixel aspect ratio in S/VCDs IS NOT SQUARE.

Now:
  • The aspect ratio on a standard TV is 4:3 (1.33).
  • The framesize for NTSC VCD video is 352x240
  • The framesize for PAL VCD video is 352x288.

What are the ramifications of this?

For PAL:

  • 352x288 (in square pixels) has an aspect ratio of 1.22
  • 1.22 is less than 1.33
  • Thus, on the TV, the picture seen on the PC will actually be stretched horizontally --> people will look "fatter" (figure 1)

For NTSC:

  • 352x240 (in square pixels) has an aspect ratio of 1.47
  • 1.47 is greater than 1.33
  • Thus, on the TV, the picture seen on the PC will actually be compressed horizontally --> people will look "thinner" (figure 2)
MPEG Stills -- figure 1
MPEG Stills -- figure 2

So how can this be fixed?

For PAL:

For NTSC:

 

That is, if working in an imaging program with a background size of 704x576 (PAL), one SHOULD resize all source images to 91.67% of width before pasting into the background.

Similarly, if working in an imaging program with a background size of 704x480 (NTSC), one SHOULD resize all source images to 110% of width before pasting into the background.

 

This all sounds very tedious... is there an easier way?

As a matter of fact, there is! ;-)

Create the source images at a size of 768x576!  Then no unusual resizing of width is necessary.  Once the task of creating the stills in the imaging program has been completed, all that is required is:

With a bit of contemplation, it should be obvious that the aspect ratio of these bitmaps will be correct for VCD.

 

An example?

In the PAL/NTSC Demo VCD, there is a short tutorial with a couple of images.  Some have had the aspect ratio adjusted and corrected, while others haven't as a comparison.   The Demo VCD can be downloaded here: http://www.vcdimager.org/discs.phtml

This aspect ratio issue isn't perceptually obvious to some people, but it is to others.   It is most noticeable (if uncorrected) on photos of people who are well known.

 

The Issue of TV Cropping/Overscan

Another issue that people often don't realise is that essentially ALL television sets cannot fully display the entire screen.  On playback, the TV can crop up to 10% off all sides of the picture (especially at the corners).  More realistically, most TV sets will crop about 5% on most sides.  (Note: see the addendum on VCDEasy)

The importance of this is to be aware of this phenomenon.  That is, if you place visual data on a MPEG still or clip on a VCD that is too close to the edges, there is a chance that it would be cropped.  This is often a trap for young players so be aware of:

 

Usage of the MPEG Still and Authoring the XML

For the MPEG stills to be used on a VCD, the VCD must be authored as VCD2.0, and the stills must be referenced in the <segment-items> section of the XML file.

For example, say I had two MPEG stills that I wanted to use in my VCD and the source files were named:

... then I would reference them as such in the XML file:

  <segment-items>
    <segment-item src="picture1.mpg" id="segment-001"/>
    <segment-item src="picture2.mpg" id="segment-002"/>
  </segment-items>

 

Now, to display picture1.mpg (segment-001) indefinitely, I would write this in the XML (click here for more information on how a <selection> works):
    <selection id="display-pic1">
      <wait>-1</wait>
      <loop jump-timing="immediate">1</loop>
      <play-item ref="segment-001"/>
    </selection>
MPEG Stills -- figure 3

 

If I wanted to:
  • display picture1.mpg (segment-001) for 10 seconds
  • then display picture2.mpg (segment-002) indefinitely, I would write (click here for more information on how a <selection> works):
    <selection id="display-pic1">
      <timeout ref="display-pic2"/>
      <wait>10</wait>
      <loop jump-timing="immediate">1</loop>
      <play-item ref="segment-001"/>
    </selection>
    <selection id="display-pic2">
      <wait>-1</wait>
      <loop jump-timing="immediate">1</loop>
      <play-item ref="segment-002"/>
    </selection>
MPEG Stills -- figure 4

 

If I wanted to:
  • display picture1.mpg (segment-001) for 10 seconds
  • then display picture2.mpg (segment-002) for 10 seconds
  • then back to picture1.mpg (segment-001) for 10 seconds and so on, I would write (click here for more information on how a <selection> works):
    <selection id="display-pic1">
      <timeout ref="display-pic2"/>
      <wait>10</wait>
      <loop jump-timing="immediate">1</loop>
      <play-item ref="segment-001"/>
    </selection>
    <selection id="display-pic2">
      <timeout ref="display-pic1"/>
      <wait>10</wait>
      <loop jump-timing="immediate">1</loop>
      <play-item ref="segment-002"/>
    </selection>
MPEG Stills -- figure 5

 

Addendum on VCDEasy (4-Sep-2002)

The newest version of VCDEasy (v1.1.2b9) has some excellent features regarding MPEG stills encoding.  If you use VCDEasy to encode your stills, you can set it (it is the default option) to adjust for the aspect ratio issue as described in this guide.  This simplifies the task enormously and is a great resource and asset to VCD authoring enthusiasts.  Similarly, the MPEG still creation tool in VCDEasy can also adjust for the cropping/overscan issue.   Again, this is extremely handy.  Although you can (and should) create your menus with TV cropping/overscan in mind, you do not do so when taking photography.   This feature will prevent heads being cropped from your photographs on a VCD when displayed on a TV without fiddling with the image beforehand.  I suggest that a figure of 5% to be appropriate and should work well on most systems.

The batch conversion tool is also a very welcome feature.

There are some problems though.  The last stable full installation version comes with an older version MJPEGTools.  It appears that the stills it creates are not fully compliant -- insofar that they don't work on some stand-alone players.  I suggest that you download the MJPEGTools 1.6.0-rc2 update from the VCDEasy site.

 

Conclusions

MPEG stills are most commonly used as high-resolution menu screens on VCDs.  How these are authored will not be covered in this article.  However, there is a guide on the creation of the simple menu here.

Historically, none of the VCD authoring programs that existed (that directly encoded MPEG still images) took into account the aspect ratio or tv cropping/overscan issue.   This was even so for those programs purporting to make "Photo VCDs" (e.g., Nero).  It was this incongruity that led me to write this article.   However, some of the newer programs that have been released MAY address some of these issues.  Unfortunately, I have neither the time nor inclination to test every new program (especially if it is commercial).  VCDEasy is the only one I know first hand that does it well.

 


Michael Tam <vitualis (at) michaeltam.com>
anti-spam device - replace (at) with @ to send me e-mail

(c) 20 December, 2002