Home and Links
 Your PC and Security
 Server NAS
 DVD making
 Raspberry Pi
 PIC projects
 Other projects
 Next >>

PhotoStory 3 to HD (Windows Media Encoder and VC-1)

WMV-i to VC-1 (HD)
This page looks at preparing PhotoStory 3 HD compatible output and conversion into VC-1 (which is Microsoft's HD format) using Windows Media Encoder / Expressions Encoder. For actual AVCHD 'authoring', see my Making a Movie DVD, AVCHD page.

What resolutions are used for 'digital TV' ?

All HD TV's are 'widescreen' (16:9 aspect ratio) and 'true' HD is 1080 lines ('1080i' or '1080p', 'i' just means 'interleaved' & 'p' 'progressive', which relates to the display 'frame rate', not the display resolution) with a horizontal resolution of (1080/9 * 16 =) 1920 pixels (1920 x 1080).

Whilst pixels are always 'square', few laptop / tablet / smart phone displays directly support full HD resolution.When playing 'HD' movies, they would run at lower resolution, such as 1600900, 1360x768 and especially 1280720 (aka 'half HD', which is common for cheaper laptops and many tablets).Some early "HD" TV's also ran at 'half HD' (720p x 1280)As a result, 'HD authoring' software will often 'default' to 'half HD' (or even lower) resolution, as well as encoding at low bit rates (5mbs being common), so generating material that is only suitable for playback on a 'smart phone'.

What is required for true BD (BluRay) HD ?

HD movie resolution is 1920 x 1080 with a frame rate of 23.976fps (which most people refer to as '24' fps) rather than the old PAL standard of 25fps (or US NTSC 29.970 aka 30 fps).

The HD frame rate was chosen for maximum compatibility with Hollywood films. Unfortunately many software programmers are too lazy (or too ignorant) to 'get it right' - you will find software 'defaulting' to 30fps (NTSC) or 25 fps (PAL) - and some with a 'BD' setting will give you 24.000 fps (rather than the required 23.976)Failing to get the 'exact' frame rate can lead to excessive processing times 'down stream' as your 'AVCHD author' software tries to 'adjust' the video whilst getting the audio more and more 'out of sync'.Worse, for faster processing, some author software will 'skip' frames (to get from the PAL standard 25 fps to 23.976 fps) and this can often be seen as 'flicker' or 'jumps' during playback. So it is vital to get the frame rate 'correct' when 'converting' the PhotoStory 3 WMV-Image 'output' to VC-1Note that the WMV-Image fps setting is largely irrelevant (tests show it has no effect on the number of 'sub-photos' ('key frames) generated), however it's not a bad idea to 'get it right' if you want to avoid any possibility of confusion later :-)

For HD, the Audio can be 2 channel stereo PCM ('wav') or (better) 5.1 'surround sound' AC-3 at 48kHz. Whilst it is possible to get PhotoStory 3 to output your wav music as PCM (without 'encoding' it as .wma), it's 'only' 44.1kHz

Most likely a 2 channel PCM Dolby ProLogic II sound track will 'survive' up-sampling (conversion) from 44.1kHz to 48kHz, however your 'author' package will allow you to Import (multiple) sound-tracks, so you might as well replace the PhotoStory 2Ch with 'real' 6Ch (5.1) surround sound

How are HD movies 'encoded' ?

(1) Blu-ray HD video uses a compression system called "H.264" (Audio is AC-3 Dolby Digital, often with a THX 'option' as an 'additional' soundtrack).

Fortunately, all domestic HD players also support the older DVD standard and (almost) all will recognise (and play) a AVCHD (HD recorded on a DVD at up to 18mbs) or even 'computer standard' .mp4 video file.So, to make a HD movie you don't need to 'burn' Blu-ray disc (or even learn anything about the movie industry's pointless but annoying DRM anti-copying system).Whilst H264 is a more efficient compression system than MPEG2, to achieve 'quality' HD playback you need data rates in excess of 10mbs. As a result, there is not really enough space to record a full length HD movie onto a double layer DVD .. so full length HD movies are restricted to 'Blu-ray' discs (at 30mbs)

(2) Microsoft HD uses a compression system called "VC-1" (MS Audio is AAC surround sound). Whilst this can be played back on any PC, getting it to playback on a stand-alone DB player is another matter.

Many (if not most) stand-alone BD players will actually play an VC-1 encoded movie, except, of course the ones owned by your friends and relatives who actually want to play back your movie :-)MS VC-1 is also the "X-box" (game machine) HD standard - and your X-box (which connects to your HD TV) can act as a 'DLNA Client' and thus used as a playback device for MS AC-1 encoded movies (see my building a DLNA Server page)If all else fails, many laptops and most graphics cards have HDMI outputs .. so can be 'plugged into' a modern HD TV

As an interesting side note, the Raspberry Pi (cheap hobbyist singe board computer with HDMI output that can be used as a DLNA 'Client') comes with H264 support 'as standard' but for VC-1 decode support you need a £1.20 licence (and for MPEG-2, double that).

Creating a 16:9 Story

MS PhotoStory 3 deals in square pixels with a 'crop box' that is fixed at 4:3 aspect ratio. The only way to 'fool' the 4:3 crop is to 'distort' all your photos before outputting

In the old 'analogue' days pre-distortion for 16:9 would mean 'squeezing the width' (to 75% of it's original size). However this will loose some of the detail .. so (with today's high power CPU's), you can choose to 'expand the height' (to 133%) instead.Of course 'height expansion' will 'spread out' the detail, however (in my view) that's better than throwing away 25% of the width.

My recommended approach is always to work with your 'original' photos in PhotoStory. So the 'pre-distort' should be performed just before the actual output (after which you should return to the non-distorted Story if you want to make changes)

Optimising PhotoStory projects for HD

To minimise the number of 'interpolation' steps, you should only process the photos 'once', i.e. do both the 133% height distort and any other 'zoom' needed to optimise for HD output 'all at the same time'

Further, when using the HD 1920x1080 Profile to generate PhotoStory 3 16:9 output, you need to avoid PhotoStory 3 'interpolating up'.So, instead of 'optimising' your photos to 1440x1080 (4:3 = so PhotoStory 'interpolates up' 1440 to 1920) you should 'optimise' to 1920x1440 (4:3 = so PhotoStory 3 will 'interpolate down' 1440 to 1080) instead

Interpolation software

To do the 4/3rds height adjustment and optimise the size of your photos, I recommend the free Open Source ImageMagick tool-set.

You can use 7-zip to 'unpack' your Story project .wp3 file.To 4/3rds height adjust and 'scale up' all the photos (without changing the crop positions), a simple 'command' (.cmd) or 'batch' (.bat) file can be used to 'run' the ImageMagick 'convert' utility (see, for example, my 169x133.cmd utility)More typically you will want to 'crop' all the photos to the 'used area' and limit the 'scale up' to the output resolution. To do so, you will need to process both all the photos and the Project.xml file. This means using a QBasic 'script' - see my Using scripts to process the Project file pageNote that my QBasic script not only optimises the photos but also re-positions the crop start and end boxes to maintain their 'central' position after the 4/3rds adjustment

An alternative approach for those choosing to process photos 'by hand' is to use Photoshop Elements 'Process Multiple Files' option

Outputting 16:9 HD from PhotoStory

HD 1920 is close to the Microsoft WMV Codec limit of 2000 pixels. Further, PhotoStory tends to crash when outputting at high resolution (see my previous look at PhotoStory 3 RAM limits), so you keep HD Stories below 50 photos

Alternatively, set the LARGEADDRESSAWARE flag in the PStory.exe 'header' and run your output on a 64bit Windows 7 machine with at least 6 GB RAM (see 'Maximising your HD Story size' below)

Once the photos have been height adjusted, my 1920x1080.prx profile can be used to generate the required output resolution

Like all my PhotoStory 3 output profiles, it is set to 100% Quality VBR (WMV-Image) Video with 2 channel 44.1kHz PCM Audio (so as to preserve PhotoStory 3 CD quality / Dolby ProLogic II Audio)

If the playback contains 'jumps', consider slowing down the 'transitions' (pans, zooms and fades) and re-outputting - you can 'slow down' your Story by 2.5 times

Slowed down WMV-Image from PhotoStory 3 can be 'sped up' again by using Windows Media Encoder (when converting WMV-Image into VC-1) by using it's 'Time Compression' setting, 'Acceleration Factor' (which is limited to 2.5x)Note that, when making a SD DVD (using Windows Movie Maker 2.x to convert WMV-Image to DV/AVI), the 'slow down;' has to be limited to 2x (since the 3rd party tool used to 'speed up' the .avi is limited)

Maximising your HD Story size

One of the 'issues' with PhotoStory 3 is that it seems incapable of using 'Virtual Memory' - so if your Story 'build' runs out of physical RAM, it will 'abort' with an 'Insufficient memory' error

PhotoStory 3 is a 'standard' 32bit application which means it is limited to addressing a maximum of 2Gb RAM, 'no matter what' (i.e. irrespective of how much RAM your computer has and even when running on a 64bit Operating System)

For the best chance of a successful 'build', keep the pan and zoom timings 'slow', the number of photos under 50 and make sure no other applications running whilst Photo Story is 'processing' (especially not FireFox, which is a total RAM hog).Of course you can always split your 'story' into smaller parts and recombine later - although, chances are, you will be creating your DVD in multiple sections ('titles') anyway.

However, sooner or later you will create a Story that refuses to 'build', no matter how many timings you 'tweak'

To maximise the chances of 'building' large Story, see the 'LARGEADDRESSAWARE' topic in my previous PhotoStory 3 advanced use page

Converting from WMV-Image to VC-1

Microsoft supports HD using it's own VC-1 Codec. To add to the confusion, MS released 3 different Codecs, 'simple' (limited to sub-VGA), 'main' (capable of 20mbs 19201080p/30 but (apparently) 'not' 25 or 24 fps) and 'advanced' with 4 'levels', L3 being capable of 45mbs 19201080p / 24 and thus the one we want as a 'transport' WMV format prior to H264 (mp4) conversion.

To ensure full VC-1 compliance across all three profile levels (Simple, Main and Advanced) you need Windows Media Format 11 Runtime or Windows Media Player 11 = see Wikipedia VC-1However, if you can get the 'main' Codec ('WMV9 Pro') to accept 23.976 fps it will 'do the job'

What bit-rates should you aim for ?

HD resolution video (at 1920x1080 = approx 2M pixels per video frame) is about 5 times 'more complex' than SD (720x576 = 414k pixels). However standard HD Codecs (VC-1, H264) are typically only twice as 'efficient' as the MPEG2 SD Codec.

Whilst the frame rate (23.976fps) is slightly lower (than PAL 25fps), to retain quality you still need a bit-rate that is about 2.5 times higher.

Since SD runs from a minimum of 3mbs to a maximum of 9mbs with a 'target' of 5mbs. This leads to HD bit rates of 7.5mbs to 22.5mbs with a 'target' of at least 12.5mbs (I aim at 15-20mbs)

In fact, for your 'final' AVCHD, you need to keep overall (video + audio) bits rates below 10mbs.However, when converting from WMV-Image into VC-1, it's a 'good idea' to 'maximise' the bit-rate.Further, 'single pass' encoding' is somewhat less efficient than 2 pass encoding, but can be twice as fast, so when converting to VC-1 I use a bit-rate of 20mbs

Windows Media Encoder

Windows Media Encoder supports '2 pass' encoding, which, for a given bit-rate, will increase video quality but will take up to twice as long to generate the output

If you output from PhotoStory at reduced speed, you can't use 2 pass encoding at the same time as 'speeding up' in Windows Media EncoderSo I suggest using 'single pass' VBR 20mbs bit-rate (which should maintain quality just fine)

Windows Movie Maker 2.x (XP)

You will need to install Windows Media Format 11 Runtime or Windows Media Player 11 (which installs the Windows Media Encoder 9 Advanced Codec) and create your own 'profile'

Windows Movie Maker only supports single pass encoding and straight CBR or 'Quality Based' VBR.Since VBR is always better than CBR, I suggest sticking to 100% Quality VBR - and with the WMV9 Pro Codec this will get you over 20mbs (if you have the WMV9 Advanced Codec you can get up to 45mbs)

I am having problems with WME sound after installing WMP 11 ?

Microsoft Windows Media Player 11 'broke' Windows Media Encoder 9 use of the Windows Media Audio 9 Voice Codec. When you try to encode a stream using the Windows Media Audio 9 Voice Codec, you get:

0xC00D0BC3: An unexpected error occurred with the audio Codec.

See the MS web site for a fix

Windows 7 users

Is Windows Media Encoder faster on a 64bit system ?

Yes - especially as you are likely to need the full 4Gb capability of PhotoStory 3 running on a 64bit system to actually generate the HD wmv-i output.

However MS wants you to use Windows Expression Encoder, so they have removed Windows Media Encoder 64bit (WME x64) from their download centrer.

In any event, Windows Media Encoder x64 was only ever aimed at 2003 Server (XP x64) and Vista x64.Whilst the major problem on Win7 x64 is that of the sound driver (and that can be fixed by copying the 'snd' components from an XP install), MS optimised WME x64 for generating VC-1 encoded 720p HD.Whilst Windows Media Encoder SHOULD work fine with the VC-1 advanced profile L3 Codec, I've never actually tried it

Windows Expression Encoder

Windows Expression Encoder will go from WMV-Image to VC-1, however is limited to 10 minutes of VC-1 unless you pay

The fee (approx $200) also includes H264 output, so is worth paying if you intend to build AVCHD or BD discs 'professionally'

Since it is unlikely you will be able to generate much more than 10 minutes of HD at a time with PhotoStory 3, Windows Expression Encoder will 'do the job' (although you will be forced to install Silverlight 4.0+)

Windows Movie Maker 2.x (XP) on Win7

WMM 2.5 will run fine on Windows 7, as will the Vista version, v2.6 MM26_ENU.msi (which can be downloaded from the Microsoft web site and is a re-build of the XP version (2.5) with a Vista installer front end)

For VC-1 support, you need Windows Media Encoder 9 Series = there are 3 'levels', 'WMV9 Pro' covers the first 2 (to 20mbs), 'WMV9 Advanced' to 45mbs (also supports HD2k at 135mbs).To ensure full VC-1 compliance across all three profile levels (Simple, Main and Advanced) you need Windows Media Format 11 Runtime or Windows Media Player 11 = see Wikipedia VC-1

Windows Live Movie Maker

This will generate h.264 directly from the WMV-i, but ONLY if your movie is already the correct aspect ratio and the quality is, frankly, very poor = it suffers from 'jerky' movement no matter what the 'bit rate' you (try) to set (it seems to revert to about 5mbs or so, no matter what)

This "children's version" of Windows Movie Maker will, at best, generate a joke 'smart phone' quality 5mbs (for 'decent' HD you should aim at 10-15mbs (AVCHD HD is 18mbs and Blu-ray HD quality 30mbs)Further, it is incapable of aspect ratio distortion. So if you 'import' 133% height distorted 1440x1080 to WLMM & tell it to output 16x9, no matter what you try it will always add 'black side bands' (instead of converting/distorting the pixels to fill the space)...... and although you can create a 133% 'stretch filter' and apply this to your 4:3 input, all this does is stretch the pixels 'in place' i.e. it restricts the video to the 4:3 'edit frame' area and, wait for it, adds 2 additional black bands (one at the top and one at the bottom) to 'cope' with the pixel aspect ratio change !

Converting VC-1 to h264

Many 'video converters' exist, even many Open Source or 'free'. However most that support h264 output are aimed at converting whole movies for playback on tiny 'smart phone' screens. They thus default to garbage bit rates (5 mbs is typical). Further, most make it very difficult, if not impossible, to change the defaults (a bit like WLMM :-) )

'Freemake Video Converter' (annoying adware)

As usual with 'free' utilities these days, be sure to select 'custom' install and deselect all it's 'default' attempts to take over your browser & it's home page etc. You will also want to prevent it from installing the usual useless 'tool bars' and 'search engines' etc.

After selecting the Windows Media Encoder output .wmv files you want to convert, simply click on the 'gear cog' icon for the 'expert' settings where you change the h264 default bit rate from 5mbs to 20 mbs and change the frame rate from 30 fps to 23.976

You should watch out for it adding it's own 'logo' to the end of the occasional converted video clip ... it's easy enough to 'crop off' later when you know it's there.In addition to the adding of it's logo, you will also have to put up with the occasional attempt to convince you to 'upgrade' to the 'pro' version or make a 'donation' - if this gets too annoying, either add their web URL to the LMHOSTS 'loopback' list or add the .exe to the list of 'untrusted' software in your Firewall

Clicking "Next >>" (in the Navigation menu, left) takes you to a detailed explanation of how to convert PhotoStory 4:3 into widescreen 16:9

Next subject :- Microsoft media output Profiles