or Connect
AVS › AVS Forum › Video Components › Home Theater Computers › ***The Comprehensive Windows Media 9 HDTV Encoding Guide***
New Posts  All Forums:Forum Nav:

***The Comprehensive Windows Media 9 HDTV Encoding Guide***

post #1 of 752
Thread Starter 

Ok gang, here it is. This was an on again, off again project because for a time it did not seem necessary, but I have received numerous requests to put it back on the front burner. A great deal of work, pain, and suffering went into preparing this guide so you don't have to suffer the insufferable like I did. I hope it helps you as much as I needed help when I was learning the ropes.

This guide only concerns itself with encoding HDTV sources to Windows Media 9 format. The procedures for doing NTSC are similar. The principal attraction of using this new codec from Microsoft is its highly efficient compression with no apparent loss in image quality. You can count me among the doubting Thomas's when people like Jamoka were blazing new trails with it out on the frontiers of HDTV archiving. Reading phrases like "...and two or three days later your encoding run will finish" was enough to make me skeptical about the usefulness of this for the needs of someone who archives a lot of programming. Getting my encoding with WM9 systematized and down to a routine was a grueling experience; it took me about a month of concentrated trial and error (mostly error) work to get to where I am now. Much of what you will read here are tidbits of WME9 and digital video wisdom distilled from other forum members such as Jamoka, sjchmura, trbarry, and a few others. I have also included some of my own insights that I have picked up along the way.

There is more than one way to skin a cat, or HDTV transport stream. So there is a good chance that other enterprising and determined AVS forum members out there have found other ways to get the job done that works for them. If you rank among them then please, by all means, feel free to share your procedures and methods with us. All I ask is that you provide explicit details of each step involved. Don't describe your methodology as though everyone already knows what you are talking about. Chances are good that they don't. So take the time to educate us. If your method requires software tools not discussed in this guide then be kind enough to supply a link so that the daring may get what they need to give it a try.

Lastly, my only HDTV source is Dish Network using a Dish 5000 + HDTV Modulator. I have no experience with OTA. So if you are OTA bound and these methods don't work for you out of the box then let me appologize up front. I have no OTA sources.

REPORTING ERRORS: This is a big guide and a lot of work went into it (several days in my spare time). I reviewed this guide carefully twice for accuracy and completeness prior to posting it. But I am not infalable and there may be errors of omission or inacuracies. If you find such errors then please send me a PM specifying what you think the problem is and I will look into it and get back to you. I would rather you PM me first and wait for a reply before you rip my work to shreds since there is enough confusion on this topic already. Who knows, you may turn out to be wrong. If you are correct then I will edit this guide to fix the error and notify you that I made corrections. I DO NOT want differences of opinion as to methods to be argued as errors in this thread. So please don't beat me up if your method of choice is not discussed. You're welcome to share that information with us so long as you provide explicit details and links as necessary.


Archiving your HDTV recordings presents some special challenges. There are a number of methods to choose from. Perhaps none is more popular than D-VHS tape. Using the excellent D-VHStool from Ricka, one need only a decent PC, a firewire card, and Rick's software. It is easy to do, and was my method of choice for about three months until I found myself staring right in the face of a major drawback: reliability problems with the JVC HM-DH30000U D-VHS recorder. I don't want to get into that sad story here; if you really want to know more then do a search on the subject in the HDTV Recorders forum. There won't be a shortage of stuff to read.

Another archiving method is using data-grade tape such as DDS-4. If you have especially deep pockets you might be using DLT. And if you make regular appearances on Lifestyles of the Rich and Shameless then you might be using LTO or SDLT. But most mere mortals using data-grade tape are stuck with DDS-4. I was using it for a couple of months. After my JVC D-VHS deck decided to take up permanent residence in Pine Brook, NJ (oddly enough, that just happens to be where the regional JVC service center is located ) I found myself an inexpensive DDS-4 drive on eBay for $300. I already had a spare SCSI-LVD host controller on hand, so I bought a bunch of used tapes, also on eBay, and I was back in business. Watching movies was a breeze: Start a restore using Windows Backup, then wait for the first few ts files to come off the drive, and then start your player of choice. I could watch a movie while the restore was in progress. It was very easy and, more importantly, it was very reliable. No glitches! Used DDS-4 tapes were available for about $5 each. Notice that I said "were" and not "are."

As the supply of cheap, used DDS-4 began to dry up I was faced with buying my DDS-4 tapes new at about $15 a pop. I record about 30 or so movies a month, so at new tape prices keeping my recording hobby fed would run about $450 monthly.

Some are using inexpensive DVD-R and are simply burning their transport stream files to disc. It has its attractions, to be sure. I have seen 1x DVD-Rs for as little as .58 cents each in lots of 100. You can buy 2x DVD-R now for about $1.00 per disc. The trouble is, though, is that using this method typically requires 3 for 4 discs per movie. Even if you don't mind springing the extra cash for the more expensive 4x DVD-Rs, archiving transport streams for a typcial movie will still take about an hour. Using 2x or 1x media would reduce the process to the worst sort of tedium. Then there is the problem of playback. You can get yourself a SCSI interface and put 4 SCSI DVD-ROM drives in your box if you are so inclined. So long as you don't mind the brief pause between discs. As an alternative, you can go through the chore of copying all three or four DVDs back to your hard drive and play from there. Of course, you will be waiting about as long as the movie is for that to finish.

None of these methods are particularly elegant or efficient. Concerns about the reliability of D-VHS make it less than ideal; the high cost of DDS-4 tape is economically prohibitive; using DVD-R to archive transport streams is a royal pain in the behind. What is needed is a format that can store a typical HDTV movie on a single DVD-R with no apparent loss in image and sound quality, while enjoying the reliability of DDS-4. Enter Windows Media 9, the answer to all our prayers...or is it? Read on.


There are two seperate concerns regarding the hardware needed to get the most out of your WM9 experience: encoding and playback. Both of these endeavors are very CPU intensive. While one with unlimited patience can get by with encoding using something like a 1.7GHz Pentium 4 processor (or even slower), the same cannot be said of the playback side.

Updated 3/8/2003: The CPU requirements to obtain smooth HDTV video playback and good multichannel sound performance are considerable. When I got started with WM9 I was using a Pentium 4 2.4GHz CPU and for the most part playback was pretty good. However, a great deal of my time early on was spent de-bugging encoding problems and the time I had to critically watch movies on my CRT projector was scarce. As time passed and things started to develop into a routine with encoding I had more time to sit down and watch movies. With a 2.4GHz P4 I began to notice some jitter in the video under certain conditions--mainly when there was a moving foreground object that occupies about 25% of the image area with a static background. Camera pans also produce this symptom, but to a lesser extent. The former scenario occurred with enough frequency that I found it quite bothersome. I conducted a series of performance tests, the aim of which was to track CPU utilization with playback performance. In each instance of video jitter CPU untilization spiked to 100%. It became abundantly clear that my 2.4GHz processor was not up to the task of smooth WM9 video playback.

The news is no better for the AMD Athlon XP 2400+ and in fact it is slightly worse. I did side by side comparisions between my P4 equipped HTPC and another system with a Athlon XP 2400+ that I was using for encoding. The system with the AMD processor experienced more jitter frame for frame using the same content than that exhibited by the P4 2.4GHz. I will make a guess here and speculate that the reason for these performance differences is that the WM9 codec is optimized for Intel processors. In any event, my own testing shows that an Intel P4 is a better choice than AMD for WM9 playback on non-overclocked systems.

The results of my testing have prompted me to upgrade my CPU to a 3.06GHz Pentium 4. I have only installed this CPU this morning but my early results are very encouraging. I watched two WM9 video segments that caused very noticable jitter when using the 2.4GHz processor. The jitter was completely gone and video playback was silky smooth and CPU utilization never went above 64% even on high bitrate scenes with large moving foreground objects. Average CPU utilization for the 1440 x 1080 tests I have done thus far hovers at around some 45%. I think this CPU will be very well suited for 1920 x 1080 HDTV WM9 playback, though I have not had the time to run any tests at that playback resolution yet.

Given this new information I would regard a 2.66GHz Pentium 4 or AMD Athlon XP 2700 to be the bare minimum for smooth WM9 HDTV playback at 1440 x 1080. Judging from own experience even these processors won't be enough to play WM9 movies encoded at full HDTV resolution (1920 x 1080 @ 24fps). For that you will probably need at least a 2.8GHz P4 or Athlon XP 2800 CPU (though a 3.06GHz P4 or Athlon XP 3000+ overclocked to perhaps 2.4GHz would be much better). Having said that, it is not really necessary to encode at full resolution to obtain a satisfying HDTV image: many of us doing this are encoding at 1440 x 1080 as a means to control the encoded output file size. We aren't giving up anything in terms of image quality. End 3/8/2003 update

The bottom line: those who proudly brim with confidence at playing DVDs with their Pentium II 400 boxes need not even apply. Encoding times would be very, very long--perhaps a week or longer at HDTV resolutions--and you will not be able to play your files unless you resize the video to something much less demanding like 720 x 480.

One could probably argue that if one does not own a high performance display capable of fully resolving 1080p then why bother at all encoding at 1920 x 1080 or even 1440 x 1080. Why not just resize it to 720 x 480 or even less? Well, you certainly could do that. On the other hand, unless you *know* for certain that you will never have a faster computer or own a better display you may be giving up some fine detail. You might not be able to appreciate it now, but you could be missing out if you upgrade to a better display later. My NEC XG110LC 8" CRT can't fully resolve HDTV--but I want to encode as much of the of the original presentation into the final result as is possible, taking into consideration the storage capacity limitations of the DVD-R media that I am using. Who knows, tomorrow I might own a Marquee 9500LC! Of course, do what works best for you in your situation.

One could use the same computer for encoding and playback. Using processors that I recommended you can get encoding times down to about 7 to 8 hours for most movies. However, if you do any serious amount of recording you may find yourself with a very large backlog of encoding jobs waiting in the wings, especially if your HTPC is also your HDTV capture system. In such a scenario you will be out of hard disk space in a flash. A better solution is to deploy a dedicated WM9 encoding PC. I have three such computers, and also have a fourth that I can bring into the mix during weeknights to run encoding jobs when needed. Here is what I recommend and have successfully used and tested for encoding:


MSI 845PE Max2 FIR--Intel 845PE Chipset (integrated C-Media 5.1 channel sound)
ASUS P4S8X--SiS 648 Chipset (integrated C-Media 5.1 channel sound)
ASUS A7N8X Deluxe Nvidia nForce2 Chipset (with Nvidia SoundStorm integrated 5.1 channel sound and DD5.1 encoding)


Intel Pentium 4 @ 2.4GHz
Intel Pentium 4 @ 2.53GHz
AMD Athlon XP 2400

Video Cards:

MSI GeForce 4 440MX
ATI Radeon 9000 Pro
ATI Radeon 7500


512MB Kingston DDR333

Hard Disks:

Western Digital 160GB ATA100 8MB Cache

I especially like the MSI and nForce2 boards. Both are outstanding performers and would provide for an excellent framework around which to build a high performance WM9 playback system. The SiS 648 based ASUS P4SX8 was a bit underwhelming in terms of raw video performance when compared to the other two, so I would not recommend it for a WM9 playback system. However, it is fine for encoding. All three motherboards cost rougly the same. The MSI gives you the most bang for the buck as it also includes an integrated Promise RAID controller and Intel Gigabit NIC. It also happens to be the best performing WM9 encoding and playback board that I have used--even slightly eclipsing the nForce2-based A7N8X Deluxe.

Installing large hard drives in my encoding boxes affords me the ability to queue up several movies on my encoding machines and free up disk space on my HDTV capture system for making new recordings.

I will only recommend hardware that I have personally bought, tested, and confirmed works well for the purposes intended here. I am sure there are other motherboards, memory brands, processors, etc. that will work equally well. If you are really cramped for space you might want to look into the Shuttle micro PC barebones systems such as the SS-51G. I thought seriously about them since they are roughly less than one third the size of a typcial mid tower case. People have complained that the heat pipe cooling systems in these boxes are very noisy, but I had occasion to see and hear one in action for myself and found it to emit a slightly higher pitch noise than the run-of-the-mill PC (since the fan runs at a high speed), but the noise level was really no louder than other systems with plain-vanilla fans. I decided against these systems because of cost. I wanted to build three dedicated WM9 encoding boxes for as little a cash outlay as possible. The Shuttle barebones systems seem to have great build quality and fine aesthetics, but at roughly $350 for the platform I was considering it seemed a bit much. You then have to add a processor, memory, video card, and hard drive. A suitable PC based on the Shuttle micro design could set you back nearly $1,000. I cannot comment on their performance since I don't own them. I built my three dedicated encoding systems for less than $700 each.

If you are interested in the small footprint micro PC designs from Shuttle you can read about them here:

Compact Power: Mini-PCs for AMD and Intel

Also, if you are conisdering going the dedicated encoding box route, then my advice is to leave out niceties such as DVD-ROM or CD-ROM drives. While they may make OS installation a little easier, they are largely unnecessary and only add to your cost. My encoding boxes don't even have floppy disk drives in them. They are not needed. I prepared the hard drives in advance using another system and a Windows 98SE boot disk. The boot volumes are all 10GB FAT32 paritions. A second partition that uses the remainder of the disk space for movies is formatted NTFS. Use FDISK to create a boot partition. Then boot into Windows XP (or whatever OS you use) and copy the i386 directory on your Windows XP installation CD to the boot partition you just created. Afterwards, use your Win98SE boot disk and FDISK to make that parition active (bootable). Take the drive out and install it in your new WM9 encoding system. Also, while you are prepping your hard drive for installation be sure to put whatever device drivers you need on it. Until you have networking up and running that system will be completely cut off from the outside world. You might find it irritating to have to pull the drive out after installing your OS to put it into another system just so you can copy drivers to it and finish your setup.

Updated 3/8/2003 There is one final consideration you need to be aware of with respect to your playback machine. Bear in mind that encoded audio is in WM9 multichannel sound format. There are currently only one way to get true multichannel sound out of your receiver or audio processor, and that is to install a good quality sound card in your HTPC that supports mutichannel analog surround playback. This means you will need to run the analog output of your sound card to the external multichannel analog inputs on your surround receiver or processor.

When I first published this guide I suggested than an nForce2 motherboard with the Nvidia Soundstorm chip would also be a viable choice for mutichannel WM9 sound since it does DD 5.1 encoding of analog sources on the fly and allow you to output your audio over S/PDIF using the nForce2's coaxial digital audio connection. Currently there are no solutions that I am aware of that use a TOSLINK connection. Hopefully this will change in the future.

There are issues with multichannel sound playback no matter which way you go. What I later discovered has given me cause to retract my earlier recommendation of the nForce2 boards solely on its Soundstorm DD5.1 encoding chip. Allow me to elaborate.

As I said earlier, when I got started with WM9 I did not have a lot of time for watching movies. Much later I discovered that the only way I could get mutlichannel 5.1 WM9 sound was to enable the Circle Surround II processing mode on my M-Audio Revolution. It sounded pretty good, but it came at a high price: my CPU utilization shot up about 18% just by using the CSII mode. I then started thinking about this and wonder why it should be necessary to use CSII (which is intended to generate 5.1 sound from stereo sources) to get surround sound. This should not be necessary at all if the audio track has 6 discrete channels. The sound card should merely pump those channels to the analog outputs. After a lot more testing I have come to the conclusion that the WMAudio DMO directshow filter does NOT support 5.1 WMA sound. The only way I was able to get true discrete 5.1 WMA sound with my M-Audio Revo was to use Windows Media Player for playback. This would seem to indicate that WMP is not using the direct show WMA filter. I was unable to get true discrete audio from the nForce2 using Windows Media Player. So if you decide to base your system on something like the ASUS A7N8X Deluxe you should be prepared to have to add a 5.1 analog sound card and connect it to your audio processor's pre-in external analog inputs. The Nvidia Soundstorm chip does encode the audio to DD 5.1, but all it does is duplicate the stereo mains to all the other channels, including the LFE.

I settled on the M-Audio Revolution 7.1 for my HTPC. I know, I know, people complained incessantly about the 6db loss but frankly, my Denon AVR-5800, at 170 Watts per channel, has plenty of headroom so this is not really an issue for me. Aside from that the Revo sounds great and I regard it as a steal for $99. Still, the 6db issue might be a problem for you.End 3/8/2003 Update


Here is a comprehensive list of all the software you will need to get your WM9 encoding solution off the ground. Most of it freeware (good for us encoding junkies...snicker, sincker ) and some of it requires payment of a modest licensing fee.

Having said that, the total monetary outlay for all the software you will need is tiny. Buying Windows XP Home Edition or Professional Edition will cost much more than the tools you need for WM9 encoding.

Operating System

I have not used any operating system other than Windows XP Professional for home theater related and video work in well over a year. So I cannot say with any degree of certainty whether or not Windows 98SE, Windows ME, or Windows 2000 would be equally good choices. I can suggest that even if W98 or ME will work that you might want to consider XP as the far better choice. While the boot volumes on all my encoding boxes are formatted with the FAT32 file system, the data volumes are formatted NTFS. If you buy your Windows XP license along with a motherboard or system you qualify for OEM pricing. Windows XP Home Edition runs about $99 and XP Professional is an extra $50.

The Meat

Let me begin here by saying that the software and versions thereof that I describe have been fully tested by me and I know that they work. If you deviate from this and use other versions of the same software then I cannot guarantee the results. I also know that using ANY version other than the ones I describe here will most likely cause you major problems, headaches, and a lot of anguish. For instance, I don't know if the audio decoder in WinDVD Platinum will work. I do know that the audio decoder in WinDVD 4 Plus does work. If you get the Platinum edition and it doesn't work then you will have to take your lumps and get WinDVD 4 Plus. Consider yourself warned.

Naturally, you will need Windows Media Player 9 Series and Windows Media Encoder 9. Both are free and can be downloaded here:

Windows Media Player 9
Windows Media Encoder 9

I also think that Zoom Player is a must for any serious encoding work because it is less resource intensive and far more flexible than WMP. I use ZP for watching my WM9 movies on my CRT projector. I would not be without its aspect ratio controls. You can obtain the latest official release of Zoom Player here:

Zoom Player Download Page

One thing you should do immediately after installing the encoder is start it and select "tools" and then "options" on the menu. The options dialog box will appear. Click the performance tab and then uncheck the "use defaults" box. This will release the performance slider controls. Move the "When Encoding to a File" slider to the next to the last stop on the left. It should be even with the "When Broadcasting" slider control in its default position. After that click the "Apply to All New Sessions" button. If you fail to do this then when you start your encoding you might as well go on sabatical for a year or two--because that's how long it will take to encode your project. Microsoft says you can move that slider to the right if you have a very fast computer...I think the guy who wrote that had a Cray in mind.

WinDVD 4 Plus

Yes, you may have to spend money to get it. But get it you must because it provides an audio decoder that will deliver multichannel sound to Windows Media Encoder 9. Without it, you are dead in the water. Do not pass go, do not collect $200.

Get it and be done with it if you don't already have it:

Intervideo WinDVD 4

If you do already have it, then all you really need to do is copy iviaudio.ax to your encoding machine and then register the filter using regsvr32 using the following syntax from a command prompt in the working directory the filter is in:

regsvr32 iviaudio.ax

To make things a little easier and more manageable I put all of my directshow filters in a common subdirectory from the root of my boot volume. Then I register them all at the same time from that directory with regsvr32.

You must be setup for six speaker output in the Windows control panel sound properities page before you configure the WinDVD audio filter for 5.1 channel playback. So be sure to do that first, then configure the WinDVD audio filter for 6 channel playback. An easy way to do this is to use Zoom Player. You can also use WinDVD itself but I have had problems with the decoder settings not sticking when exiting WinDVD. In Zoom Player bring up the Player Options screen. Go to the external tab and set your audio decoder settings there. They will be written to audio decoder configuration properites in the registry. I'll talk more about Zoom Player later.

Updated 3/8/2003: AC3 Filter 0.63b

If you don't want to spend the bucks for WinDVD 4 just to get its audio decoder for WM9 encoding (and who could blame you for that), then you might want to give AC3 Filter a try. I have never tried it myself, but others have and say it works well. Since it is free there is no harm in trying. You will need to register this directshow filter and then configure it for 5.1 channel sound. You can get it here. Thanks to AVS member sugatam for pointing this one out.End 3/8/2003 Update

Elecard MPEG2 Demultiplexer and MPEG2 Decoder

These two directshow filters are necessary to obtain good results using the one-pass quality VBR method that will be discussed in detail later in this guide. You can get the Elecard MPEG2 decoder here:

Elecard Download Page

A word to the wise: there are two versions of the Elecard MEPG2 decoder. The version in the free download puts a small watermark in the upper right-hand corner of the screen. For HDTV movies that are presented in 1.85:1 or 2.35:1 you can crop it out in the encoder. Otherwise your encoded movies will have the watermark. A far better choice is to get the registered version ($20) which includes the decoder sans the watermark. You can do that at the following link and go to the bottom of the page where it says register. In a day or two you will receive by email a link to the registered version. The link will work for only five days so get your download as soon as you receive that email:

Registered Elecard MPEG2 Player

When installing the player DO NOT install and register the Odio Dekoda audio decoder, since it will break your multichannel sound setup. After you extract the mpgdec.ax directshow filter put it in a directory with your other filters and then uninstall the player.

You will also need the Elecard MPEG2 Demultiplexer. Be very careful here. There are at least four versions that I know of and some of them will cause the audio to be out of sync in your WM9 encoded movies. I personally beat my head against the wall for several days trying to solve this very problem on my own systems and wound up chasing a number of red herrings. The only version that I know works and am using myself is version I believe this version is included in the Elecard MPEG2 Video Decoder download. The version that ships with X-Muxer does not work correctly. Versions marked 2.0.65.XXXXX also do not work correctly. I have been informed that a newer build is out that is included with the registered player. I don't have the build so I haven't been able to test it. I am going to contact Elecard about this issue and see if they will provide me with the newer build. Other versions may or may not work. If you don't have the version I am using you can test each one yourself using the following method:

Download all available Elecard packages (MPEG2 Video Decoder, XMuxer, MPEG2 Player). Extract the mpeg2dmx.ax file and place them all in a common directory, each in their own subdirectory. Register each one at a time with regsvr32 and then take a transport stream file and drop it into graphedit. If the audio playback is in sync with the video you will be fine. If it is not then move on to another version. Unregister the current filter with regsvr32 /u mpeg2dmx.ax and then register the next version. Repeat this procedure until you find a version that will play with the audio in sync.


AVS Forum member Rick Arabian (Ricka) has done a superlative job with his outstanding labor of love, DVHStool. This tool started life as a command-line utility that allowed one to archive HDTV mpeg2 transport streams to a D-VHS deck. From that humble and early beginning Rick has expanded the capabilities of this software several fold and given us a nice GUI to work with. You can get the latest version of D-VHStool (2.12) here:

D-VHStool 2.12 Download

You might be asking yourself what on earth a WM9 geek would want with software designed for the D-VHS crowd. That's a good question. There are three directshow filters that are included that are very helpful. The first is asyncflt.ax, which is a multiple file source async filter. The second is tsp2sp.ax, written by Leszek, which will correct minor errors in your original ts capture (note that I said minor errors and not major corruption). The third is TSPcap.ax, which will output mpeg2 source packets to a transport stream file. Since Windows Media 9 Encoder can be somewhat sensitive to transport stream errors, using these filters to prep your files for encoding is a smart move. I will explain how to do this later when I address procedures and methods. When you install D-VHStool these filters will be installed and registered automatically.

Start DVHStool and on the menu select D-VHS and then settings. Check the box for single file mode. This puts TSPcap in single file mode, which makes it easy and fast to join your minute capture files into a single transport stream file. This is much easier to deal with than adding all your minute captures as seperate sources in WME9.

HDTV2MPEG Version 1.09

AVS Forum member GrantR has released version 1.09 (out for quite sometime now) of HDTV2MPEG, which is a great utility to trim your transport stream files so you can cut off any excess. I trim my captures right to the beginning and end of every movie I capture. There's no sense giving up valuable DVD-R space to filler. You can get it here:


Microsoft DirectX Software Development Kit

No, you don't need this because you are going to be writing DirectX applications. You need this because graphedit is distributed with the DirectX SDK. You need graphedit as a system setup and diagnostic tool. You also need it to prepare your transport stream files using the directshow filters in DVHStool. When you install the SDK, only install the DirectX utilities and nothing else. You can get the SDK here:

Microsoft DirectX 8.1b SDK
Microsoft DirectX 9.0 SDK

Note: These are big downloads (170MB and 227MB respectively).

If your goal is to get one-pass Quality VBR encoding working well (and this should be your cheif goal; I'll explain why later) then this is all the software that you really need.

The Potatoes

This section has a list of all the software that you will need to do Quality VBR Encoding using AVIsynth and Bitrate VBR Encoding (AVIsynth is the only two-pass method available at this time). If the Quality VBR Elecard method works so well, you might be wondering, why evey bother with AVIsynth? If you are recording HDTV from Showtime then chances are you will need this method, and I will explain why later in this document.


AVIsynth is a frameserving tool that makes other applications think it is seeing uncompressed AVI video--sort of. I won't go into all the details here. I'll cover that in the procedures and methods section.

You can get AVIsynth 2.5 here:

AVIsynth 2.5 Download

You will also need some plugins for AVIsyth, most notably mpeg2dec2.dll, decomb.dll, and simpleresize.dll. The two former plugins can be obtained here:

AVIsynth 2.5 plugins

The simpleresize filter from Tom Barry can be downloaded here:

SimpleResize Download

Once you have all your plugins in hand unzip them to your AVIsynth 2.5 installation directory, which is by default:

C:\\Program Files\\AVIsynth 2.5\\plugins


Tom comes to the rescue yet again with his version of DVD2AVI. This will let you load your HTDV transport stream files as a necessary preparation step for 2-pass WM9 encoding. You can find that here:

Tom Barry DVD2AVI


This tool is for correcting errors in your Ac3 audio file. Get it, and use it if you are two-pass bound.

BeSliced 0.2

Ac3 Delay Corrector

Using one of the 1-pass methods I will describe and most certainly the 2-pass method requires that you have to demux the audio from your transport streams. You will need a tool that can correct for the proper Ac3 delay value. If you don't do this then your audio will be out of sync with the video.

Ac3 Delay Corrector


BeSweet is a great all-around tool for just about everything digital audio--except Ac3 5.1 files. If you are really into pain you can get two-pass audio encoding in WME9, but only if you use BeSweet to output your Ac3 5.1 file as six wave files--one for the front left and right, center, surround left and right, and one for the LFE channel. It does work, but there is a bug in the ac3 encoder BeSweet uses that causes some attenuation of the output signal levels in the wave files. It amounts to about a 5 to 8 db drop on average. If you are a M-Audio Revolution user this method will probably be a deal breaker for you since you are already at a 6db penalty to begin with. Otherwise you might not mind it too much. Personally, I would take the Revo over using BeSweet with six-wave just to say I can do 2-pass audio encoding. You can mix two-pass bitrate VBR video encoding with single-pass quality VBR for audio in WME9 so I don't see this as a must anyway. But it is there for you to try if you wish.

Before you start thinking that two-pass audio is a worthwhile thing let me point out that audio represents very little of your encoded file. The vast majority of your DVD-R storage bandwidth is eaten up by video. So excessive fussing over getting precise audio bitrate control is a colossal waste of time and energy in my view.

You can get BeSweet here:

BeSweet 1.4
BeSweet GUI 0.6b61

There is tons of BeSweet information on the official site:

BeSweet Homepage


Link2 is an AVI wrapper from Videotools.net that is useful if you want WME9 to display the estimated length of time remaining for your encoding run. It is not really a requirement, but I do find it worthwhile since I tend to look in on my jobs as they are running so I can get a rough idea when it will finish so I can be ready to launch the next job. Link2 is not freeware. A $15 donation gets you a license for Link2 and some other benefits:


To install Link2 unzip the download file to a directory. In that directory there is file named Aviwrap.inf; simply right click on the inf file and select "install" from the context sensitive menu. The software comes with instructions on how to use it--it's pretty straightforward.

That about does it for software. My suggestion is to put all these little apps in their own directories, then paste shortcuts to them on your desktop to make it easier to work with your encoding system. Let's move on to the methods and procedures part.


We have now arrived at the juicy part and I am going to explain to you how to actually get your encoding off the ground so you can be productive. There are basically two ways to go with WME9 for our purposes: Quality VBR, which is one-pass encoding, and Bitrate VBR, which is a two-pass method. Before diving in, however, you should start thinking about your expectations. Your results are only going to be as good as your source. For instance, if you feed the encoder bad transport streams then you can expect the encoder to crash. Yesterday I was encoding a movie that generated a fatal error in the Elecard MPEG2 decoder. I double checked the stream and it was enough to crash the MyHD application. So don't expect miracles here. When I run into these sorts of showstoppers I just scuttle the file and recapture at a later time. The only circumstance in which I will take extraordinary measures to save a capture is if it something that may never air again.

Quality VBR Encoding

Quality VBR is a one-pass method. You do not have precise control over peak or average bitrates, but the quality settings do have an affect on these parameters--it's just that you cannot set them directly. For most movies that are 100 minutes in duration or shorter I always choose quality 90 for video and audio. I haven't found a single instance of the 15 movies or so that I have encoded where higher settings will produce better results and in each case the output file easily fit on a DVD-R. Having said that though, the time to find out that your output file is too large is not after a long encoding run has finished. I know that Jamoka is currently working on a prediction matrix to aid in picking the right quality settings. I have developed my own method that seems to work well but is probably not as accurate as Jamoka's method.

On a fast system such the dedicated encoding boxes I use, I have gotten one-pass encoding times down to between 6 to 8 hours for a 90 minute movie. Just to give you some real-world examples, as I write this I am encoding Ali from HBO HD on one system and One Kill from Showtime HD on another. Ali has a running time of about 2:35 and it should take about 11 hours to finish using quality VBR at quality 89 for video and 90 for audio. One Kill has a running time of about 1:33 and at quality 90 for video and audio this job will take about 7 hours to finish. Both jobs are encoding at 1440 x 1080 @ 24fps.

I would also like to offer a word of advice regarding performance. By default the encoder will display a video window of the input source while it is encoding. I would strongly urge you to setup the encoder with only the monitor window visible. Close down all other windows. Resist the temptation of watching the project while encoding. Keep in mind that drawing the video while the encoding process is running eats up precious CPU cycles that are much better spent on actually transcoding your project. It isn't going to hurt to do occasional spot checks on the output video while encoding. But keep those short.

If you are a skeptic about this then try this test:
  1. Start an encoding project with the video window visible.
  2. On the monitor window click the statistics tab so you can see the encoded frames counter. Watch how that counter increments while the video window is being displayed. On my systems I get about 4fps encoding performance with the video window showing.
  3. Now close the video and audio windows and watch the encoded frames counter. Notice that it starts to move faster. On my systems running in this fashion is good for an extra two frames per second of encoding performance. While it doesn't sound like a lot believe me when I say it really adds up when you are encoding a movie with 150,000 to 200,000 frames.
This is an old trick that I learned with using Adobe Premiere years ago. It can have a huge impact on cutting your encoding times down.

Quality VBR Encoding Using the Elecard Method Step-by-Step
  1. Prepare your transport streams for encoding and open graphedit. Build the following filter graph:

    File Source (multiple async)--->MPEG2 Transport to Source Packets--->TSPcap

    When inserting the File Source filter you will receive an open file dialog. Select the first numbered file in your capture. The filter will automatically increment to the next numbered file until it is finished. When you insert TSPcap into the graph you will be presented with a save file dialog. This will be the output file where all of your minute captures will be combined. The MPEG2 Transport to Source Packets filter will fix minor problems with your streams.
  2. Open WME9 to setup your encoding session.
  3. Open the session properties. The sources tab will be selected by default.
  4. Add your source. Since we are using a MPEG2 transport stream click the "file" radio button in the "source from" section. The screen will change for file input and you will see a box for the file name. Click the browse button and the "open file" dialog will appear. Browse to where your transport stream file is located. Select it and click the "open" button. The video and audio boxes should be checked automatically.
  5. Define your output file and destination. Click the output tab and uncheck the pull from encoder box and check the encode to file box. Click the browse button and browse to where you want to save the output file. Type the name you want give the file and click save.
  6. Click the compression tab.
  7. In the destination dropdown select "File Download (computer playback) and then click the edit button.
  8. In the media types section, select "Quality VBR" for both audio and video mode.
  9. In the codec list you should see "Windows Media Audio 9 Professional" (this is required for multichannel sound) and "Windows Media Video 9."
  10. Click the Quality-based tab.
  11. In the Audio Format dropdown list select "Quality 90, 48KHz, 5.1 Channel, 24-bit VBR."
  12. In the video size box enter your resize paramters, if any. For 16:9 movies I use 1440 x 1080. For 2.35.1 movies I generally use 1920 x 820. But expect to have to make some trial and error adjustments to get it perfect. See the troubleshooting section for more information. In the next step we will crop out any unwanted pixels.
  13. Set your frame rate to 23.98 for film sources.
  14. Set the quality value to 90 or whatever value you determine to be the best fit for the movie length versus storage capacity of a DVD-R. Some experiementation will help you to get a feel for what works best. Again, see the troubleshooting section for further guidance and suggestions.
  15. Click the video size tab to set your cropping paramaters. If you set the compression properties to 1440 x 1080 then you may not need to do anything here. For most Showtime movies they send 1920 x 1088, so if you see a grey bar at the bottom of the screen you will need to set the cropping method to "custom" and crop the bottom eight pixels to yield a 1440 x 1080 output without the grey bar. For other aspect ratios you will need to experiment. For example, what might be a 2.35 to 1 film may not work well by cropping 130 pixels off the top and bottom. I am doing Black Rain right now (using another method I will cover) and I had to crop to 1920 x 804 to get the output perfect where I had only picture information being encoded. It took about a half-hour of experimenting while observing the encoder output to get it just right.
  16. When all the above is set then click the "Apply" button in the lower right-hand corner of the session properties screen. A video and audio window will appear. Close the session properties screen.
  17. Now is a good time to save your session just in case you need to abort and reload.
  18. Click the "Start Encoding" button and your project will start.
  19. Watch the first minute or two of the session just to make sure all is well, then close down the audio and video windows to improve performance. You can do brief spot checks here and there.
  20. When the session finishes you should QA check your encoded file. If it passes muster then burn it to DVD-R.

Quality VBR Encoding Using the AVIsynth Method Step-by-Step

The Quality VBR Elecard method works very well. It provides for the best encoding performance available of all the methods that I have personally tried. But there are going to be times when the Elecard method won't produce satisfying results.

Recently I encoded a movie with the Elecard method and the output file combed like crazy when I played it back. Later I found out why. After doing a check of the transport stream I discovered that the film was encoded with bad 3:2 pulldown flags. For a time it would run in film mode and then suddenly drop to video mode for a time and then back to film. About 25% of the movie was encoded as video. Since with the Elecard method we are using that MPEG2 decoder we are bound by its limitations. If you load the Elecard decoder in graphedit and examine the filter properties there are user selectable options such as double precison IDCT and post-processing. I have not had time to explore the full range, effect, and capabilities of these options nor do I yet know how they impact encoder performance in WME9. That is something that I will eventually examine when I have the time to do it. I know Jamoka has been thinking about these configurable options as well and perhaps he may have the time to get to them before I do. By default the Elecard decoder is set for software deinterlacing. It works remarkably well for the vast majority of encoding jobs. However, like most software MPEG2 decoders it cannot deal very well with material that has mixed flags. When it hits the video source segments the output will comb.

I have recently been doing some experimentation with the AVIsynth method, specifically using the decomb filter and making adjustments to its parameter set. I am encouraged so far by my results with problem films encoded with mixed flags. This method will take some work to arrive at the correct decomb settings. Also, this method is a lot more complex than the Elecard method; there are a number of preparation steps that you must do long before you even setup your WME9 session. It requires that you use a number of tools in the "Potatoes" list of the software section.

The big downside to this method is the substantial performance penalty it imposes on your encoding runs. This method will take anywhere from 20% to 50% longer than the Elecard method depending on your source file. For that reason alone I do not use this method unless I really have no other way to get the job done. I might use this method for 1 in 15 jobs, if that. HBO movies seem to work very well with the Elecard method, but movies from Showtime consistently have segments in movies with mixed video flags. This will cause the Elecard MPEG2 decoder to produce combed frames in some spots.

Here is a Step-by Step rundown:
  1. Prepare your transport stream using step 1 of the Elecard method.
  2. Open DVD2AVI and load your transport stream. The video window will expand (possibly off the screen, if so just drag it back so you can see the menu) to show the first frame of video in your ts file.
  3. Click the audio menu in DVD2AVI and set the channel format to "Dolby Digital" and the Dolby Digital property to "Demux All Tracks."
  4. Click the video menu and set the Field Operation property to "None."
  5. Click File and then "Save Project." Browse to the directory you want to save to and give your project a name. This will save a d2v project file and an Ac3 audio file. Note that the name of the audio file has the correct Ac3 delay value in it. Wait up to several minutes while DVD2AVI saves your d2v file and demuxes the audio.
  6. When DVD2AVI finishes open Windows Explorer and browse to the directory containing your d2v and Ac3 files. Click twice on the Ac3 file--not a double click. You want a rename box to appear around the file name. You will see a flashing cursor and box around the name. So, you click on it once to select it, then a pause, then click on it a second time to bring up the rename box. Copy the file name to the clipboard by selecting all the text in the file name, then right click, and select "copy." Rename the file to .ac3. Launch BeSliced from your desktop shortcut. A small window will appear on the screen. Drag your renamed Ac3 file into it. A menu will appear. Select "Fix File." This will out a new Ac3 file with errors in the audio stream corrected. The output file will have the word "fixed" in the name. Delete the original Ac3 file. Click the fixed file once to select it in Windows Explorer, then click it a second time to bring up the rename box. Select the name and right click on it and then "Paste" from the context sensitive menu. This will paste the original file name with the correct Ac3 offset back into the name. You're now ready for the next step.
  7. Open Ac3 Delay Corrector from your desktop shortcut. In the source file dialog browse to your fixed Ac3 file and open it. Note that the correct Ac3 delay is already set (it pulls it from the file name created by DVD2AVI). The output file name will automatically be set. Click the write button and wait for the delay correct audio file to write. Your audio file is now ready for encoding.
  8. Now you need to prepare your video by writing an AVIsynth script. Create a new text file with Windows Explorer in the same directory as your d2v project file and corrected Ac3 file. Name this file with a .avs file extension. You will use Notepad to edit it. If you really want to know everything there is to know about AVIsynth then read the supplied documentation. You can get to it from your start menu. The objective here is to show you what is required to get it working and not go over the finer points of scripting with AVIsynth. Here is a sample script that I am using for an encoding job that is running right now on one of my systems:

    Loadplugin("C:\\Program Files\\AVIsynth 2.5\\plugins\\mpeg2dec3.dll")
    Loadplugin("C:\\Program Files\\AVIsynth 2.5\\plugins\\decomb.dll")
    Loadplugin("C:\\Program Files\\AVIsynth 2.5\\plugins\\simpleresize.dll")
    mpeg2source("D:\\my movie\\movie.d2v")

    Here is another sample script for a 1440 x 1080 encoding job:

    Loadplugin("C:\\Program Files\\AVIsynth 2.5\\plugins\\mpeg2dec3.dll")
    Loadplugin("C:\\Program Files\\AVIsynth 2.5\\plugins\\decomb.dll")
    Loadplugin("C:\\Program Files\\AVIsynth 2.5\\plugins\\simpleresize.dll")
    mpeg2source("D:\\my movie\\movie.d2v")

    The cropbottom parameter is used to crop the grey bar out of the image. The telecide and decimate parameters shown are a good starting point for hybrid source files that are encoded as mostly film but have some bad segments encoded as video. I took this right out of Donald Graft's documentation of the decomb plugin for AVIsynth. I have had to do some trial and error tweaking of these parameters for certain projects but what is here is a great place to start. Note my crop and simple resize settings. This is specific to the film I am encoding (Black Rain). You will need to arrive at the right vaules specific to your project on your own.
  9. Test your script with Windows Media Player or Zoom Player. If you get an error then see the troubleshooting section. If it plays and the aspect ratio appears to be correct then you are ready for the next step. Disregard the frame rate for this test. You will be dropping a lot of frames when previewing like this. It isn't important nor will it affect your results.
  10. Now you should Link2 your avs script. Open Link2 and in the input file dialog browse to your avs file. The output file name will automatically be populated with the same name and a .avi file extension. Click the Wrap button and Link2 will save a wrapped avi file. Your video is now prepared for encoding.
  11. Open WME9 and setup your encoding session. On the Sources tab in the "Source From" section click the "Both Device and File" radio button. In the video dropdown list select "Browse for File." A "Browse for Source File" dialog window opens. Browse to the avi file created with Link2 and select it. In the audio section do the same thing and browse to your delay corrected Ac3 file.
  12. You must now specify your compression and video size parameters in much the same way as you did with the Elecard method--with some important exceptions. First, when setting the quality bases properties you want to check the "Same as Video Input" box. DO NOT resize here since you already did that in your AVIsynth script. On the video size tab "No Cropping" should be selected. Other than that you set your Quality VBR compression properties as you did with the Elecard method.
  13. When you are finished setting up the session click the "Apply" button in the lower right-hand corner of the session properties page.
  14. Click the "Start Encoding" button and let 'er rip.

That pretty much covers the AVIsynth Quality VBR method.

Bitrate VBR Encoding

Bitrate VBR Encoding Using the AVISynth Method

This is the only method that I am aware of that works for 2-pass bitrate VBR encoding. Every other method that I have tried causes the encoder to abruptly stop at the end of the first pass. You are left with nothing after waiting all that time for the first pass to complete.

This is the method to use if you have unlimited patience, or are a masochist at heart. I have long abandoned this method because of the exceptionally long encoding times that you must endure just to get precise bitrate control. On average, using a fast system, you can expect encoding runs of anywhere from 22 to 26 hours in duration depending on the length of your movie. In the time it takes for a two-pass run to complete you can experiment with Quality VBR to arrive at the right Quality-based settings to get the average bitrate you need and do a one-pass with plenty of time to spare.

Here is a Step-by-Step rundown of the Bitrate VBR method:
  1. Prepare your video and audio in exactly the same manner as the AVIsynth Quality VBR Method, steps 1 through 10.
  2. Open WME9 and prepare your encoding session just as you did for the AVIsyth method. Where you will deviate is in the compression properties page.
  3. On the compression properites page you want to select "File Download (Computer Playback)" and then click the edit button.
  4. On the Encoding Settings page you want to set the audio mode to "Quality VBR" and the video mode to "Bitrate VBR." If you are using an Ac3 delay corrected file and you set "Bitrate VBR" in the encoder your job will bomb out at the end of the first pass and you will have wasted about 12 to 14 hours of time. If you must use bitrate VBR for audio, and I cannot imagine a single scenario where you would need to, then you must use BeSweet to create six waves and select "Multichannel WAV Sorce" on the source properties page for audio.
  5. After setting up the custom encoding settings click the Quality-based tab and set your quality parameter for audio and the average bitrate target you are shooting for in the "Video Bitrate (Average)" box. I find that a value of 5,200kbps works well as a starting point. Set your frame rate and size properties here.
  6. Once you have your compression parameters and video size parameters set you can apply them to your session and start your encoding run. Go on vacation and when you get back it will be done unless your session crashes.

Any process as complicated as this is bound to have problems. The margin for error here is very small and attention to fine details is required to obtain good results. Even if you dot all the i's and cross all of your t's you might still run into a snag or two along the way. This section is for those of you who believe you have done things right and are still having problems.

PROBLEM #1: I cannot get multichannel sound!

SOLUTION #1: Either your WinDVD 4 audio filter is not configured properly or you are downmixing to stereo in the encoder. Check your WinDVD filter properties by loading a transport stream into graphedit. Run the graph and right click on the Intervideo Audio Decoder filter and view the properties page. It must be in 6-speaker (5.1 Channel Sound) to get multichannel sound to WME9. If that is correct reload your encoding session in WME9 and double check your audio compression properties on the Quality-based property sheet. You might have set it for stereo output. Another possible problem is your computer is not setup for WMA multichannel sound output. See the hardware recommendations section for more details.

PROBLEM #2: I cannot load my ts file into WME9.

SOLUTION #2: This is a problem with your filter registrations. Open graphedit and drop in your transport stream. You should see the file source connected to the Elecard MPEG2 Demultiplexer. The demux connects audio to the Intervideo Audio Decoder and video to the Elecard MPEG2 decoder. From there audio goes to the audio render and video can go the VMR or overlay mixer and then your video renderer. If graphedit will not build the above graph then you are missing directshow filters. Check by clicking "Graph" in the graphedit menu and then select "Insert Filters." From the insert filters window expand the DirectShow filters item. Browse through the list to make sure the following filters are registered: Elecard MPEG2 Demultiplexer and Elecard MPEG2 Video Decoder. If not then register the correct filters and try again.

If you are using your HTPC for encoding and have every single mpeg2 video and audio decoder on the planet installed on your system then this alone is more than likely the source of your problem. If so then you will need to go into Zoom Player and in the player options section on the Manual Filters page you will need to invoke the registered filter editor. You must change the merit value of other filters so that Zoom Player will build the correct filtergraph with a ts file. Reduce the merit of other mpeg2 decoders and set the merit value for the filters you need to "Preferred." BE VERY CAREFUL HERE! You could seriously wreck your system to the point where directshow is completely broken!! In this case you will need to reinstall your system. Also, performing this procedure under certain circumstances may require that you build custom DVD graphs and media graphs get DVD and VOB file playback working again. It depends on how you have your system set up.

PROBLEM #3: My audio has the rubber lips syndrome. Audio is out of sync with video!!

SOLUTION #3: The most likely cause of this problem is that you are using the wrong version of the Elecard Demultiplexer. Only certain versions work. Go back to the software section and review it for the version that I know works fine. Other versions may or may not work. You may need to try all four versions to find one that works for you.

PROBLEM #4: My Encoding Session Crashed!

SOLUTION #4: This can be difficult to pin down but the most probable cause of an encoder crash is problems with your source transport stream. You can minimize the likihood of crash from this cause by preparing your ts file using the procedure I provided. Load graphedit and build a File Source (Multiple Async) ---> MPEG2 Transport to Source Packets ---> TSPcap graph and run your source files through it. It won't work miracles but it can help. Usually when I run into this problem I just scuttle the capture and get it at a later date. I have only had two problems thus far with problematic transport streams that cause the encoder to crash.

PROBLEM #5: I get an error message in red text in my input video window in WME9! What's that all about?

SOLUTION #5: This is a problem in AVIsynth, which can be also be caused by ts files that have problems with them. It can also be caused by an error in your AVS script. If it reports a line in the error message then you have a problem with your script and you will need to correct it before you can encode.

PROBLEM #6: The encoding job ran but when I play the WMV file it combs like crazy!

SOLUTION #6: This is probably because your source file has a problem with how it was telecined or you have bad or missing flags from your stream. Most movies from Showtime fall into this category. The Elecard MPEG2 decoder can have problems with such segments that will produce combing in the output of the encoder. You should consider using the AVIsynth Quality VBR method and use telecide and decimate parameters to obtain an acceptable result. It may or may not work. I am however, encourged by some early results.

PROBLEM #7: None of my Quality VBR jobs produce output files that will fit on a DVD-R.

SOLUTION #7: Your video quality setting is too high in the compression properties. One thing to bear in mind is that the bitrate the encoder runs at will be governed to a large extent on the amount of picture information in the source image, along with the amount of motion in the video, the resolution you are encoding at, and a few other factors. Very high quality transfers from HBO and Showtime, such as Joe Dirt, Charlies Angels, Training Day, and Mission Impossible 2, will produce very high bitrates in the encoder when using Quality 90 for your video setting. For several of these transfers I have seen average bitrates climb well above 12mbps and stay there. In these situations I will run a test encode session for about an hour or two at Quality 90 and monitor the bitrate. If it runs at something like 10mbps at Quality 90, then I can usualy bump it down to Quality 89 and that will do the trick. If it really skyrockets up to 13 and 14mbps then I lower the quality setting it further. I have run some jobs at Quality 85 and the output video still look fabulous and I can fit the file in a single DVD-R.

PROBLEM #8: I am using the AVIsynth Quality VBR method and when I try to play my script in WMP nothing happens.

SOLUTION #8: You may need to download DVD2AVI Version 1.76 and setup a d2v project file with a standard MPEG2 program stream. I have run into this problem myself when I was using AVIsynth 2.07 but have not encountered the problem since going to AVIsynth 2.5. You will only need to do this procedure once. You can get DVD2AVI 1.76 here:

DVD2AVI Version 1.76

PROBLEM #9: When I try to load my ts file into the Tom Barry version of DVD2AVI it crashes.

SOLUTION #9: Try deleting the dvd2avi.ini file in the directory where you installed DVD2AVI. Start the program and then add your transport stream. If you still have the same problem then it could be an issue in the PIDs of your transport stream. DVD2AVI assumes video is on PID 11 and audio is on 14. If your streams use different PIDs then you will need to edit your dvd2avi.ini file and change the MPEG2_Transport_PID parameter to match your streams. The parameter is video first, then a comma, then audio. For HBO and SHO it should always be MPEG2_Transport_PID=11,14.

PROBLEM #10: I can play my WMV file in WMP but there's a lot of jitter in the video.

SOLUTION #10: Windows Media Player is a resource hog. Try playing your file in Zoom Player. Bring up the task manager and click the performance tab to keep an eye on CPU utilization when playing your files. Even with a 2.4GHz P4 WMP will spike CPU utilization to 100% easily even with 1440 x 1080 WMV files. Zoom Player is about 15% less taxing on processor resources, but even then utilization will run high at about 80 to 85%. If you have something less than 2.4GHz P4 or Athlon XP 2400 then you may need to upgrade to a faster processor or scale your encoded video down to something, perhaps 720p, your CPU can handle.

PROBLEM #11: You guys must be nuts for doing this. What a pain in the rump!

SOLUTION #11: There's always D-VHS or DDS-4 tape.

I hope this helps to get you off the ground with HD-DVD with WME9. I will make edits to this guide as necessary to correct errors or include additional information.

I know in the past Jamoka has posted some screen caps illustrating what can be accomplished with Windows Media 9. Joe, if you are reading this perhaps we could impress upon you to post those again in this thread. Thanks.

Enjoy everyone!

post #2 of 752
Wow, impressive.

A couple questions -- could you elaborate more on your use of telecide() and decimate()? Your two examples use pretty different settings for them.

Are all of your sources 1080i or do you do 720p and if so how are you varying your avisynth scripts?

You do not do "force film" in dvd2avi, correct?

On the elecard filter versions, I did a search and found 3 different versions on my machine so am sorting them out. I've only got the free versions of elecard software, so I'm wondering if the version you cite is the paid version. I think you can get the version number with just a right click on the filename and checking its properties. I've got,, and -- anyone have an idea which one is the good one?
post #3 of 752
Thread Starter 
Originally posted by patja
Wow, impressive.

A couple questions -- could you elaborate more on your use of telecide() and decimate()? Your two examples use pretty different settings for them.

The best thing that I can suggest for you is that you download the decomb plugin for AVIsynth and read the documentation. A link is provided in the guide. That is exactly what I did. The two scripts are different. The second one assumes more or less a properly flagged transport stream. The first one assumes a stream that is mostly encoded as film, but has some segments in it that are encoded as video.

Are all of your sources 1080i or do you do 720p and if so how are you varying your avisynth scripts?

Everything I do is 1080i from HBO or Showtime on DishNetwork.

You do not do "force film" in dvd2avi, correct?

I don't use force film because it only really works well with properly flagged streams. If your source has good 3:2 pulldown flags then you should be using the Elecard Quality VBR and not the AVIsynth Quality VBR method.

On the elecard filter versions, I did a search and found 3 different versions on my machine so am sorting them out. I've only got the free versions of elecard software, so I'm wondering if the version you cite is the paid version. I think you can get the version number with just a right click on the filename and checking its properties. I've got,, and -- anyone have an idea which one is the good one?

Please don't take this the wrong way, but I already discussed this in the guide at length and don't want to spend a lot of time answering questions that are already in the guide. That's why I wrote it to begin with. 2.0.65.XXXXX does NOT work, at least on the four systems I have running at the moment. The best thing you can do is try the other versions out and see if they work. There is a procedure in the guide for that in the software section. Why wait for someone to tell you which ones work when you can test them yourself in 10 mintutes?

In addition, don't get fixated on the AVIsynth method unless you have the Elecard method already running well (and judging from your questions you don't). You should be using the Elecard method for about 95%+ of all your encoding work for film sources from HBO and SHO. It's faster and easier than the AVIsynth method, and the Elecard decoder deinterlacing is exceptional for properly flagged streams. OTA, on the other hand, is a completely different scenario and you may be more dependent on the AVIsynth method if that is your principal source of HDTV.

Like I said in the guide, more difficult does not always mean better.

post #4 of 752
Nice work, Jerome.

Anyone could start from square one and quickly get up to speed with this.

I've trashed my screenshot comparisons so don't have any to post. People don't believe it anyway

post #5 of 752
post #6 of 752

That document took lots of time to put together. Not only is it a good introduction for folks (like me) who haven't done this before, but all the links are super-helpful too! Much appreciated!

I've been using elecard's software for about 3 years now, and I've always been pretty impressed with it. It's a little surprising to me that there's an audio/video sync problem lurking in the demultiplexer.

Have you mentioned this to the elecard/moonlight folks? I've found they're pretty decent at replying to email...

I just purchased and downloaded the registered version, and the demuxer shows as version:

I can play back a MPEG-2 4:2:0 TS and it is in audio/video sync (This is a 4Mbit Transport stream, video & AC-3 Audio). I'm not sure if this is useful information for this particular application.

I know you've mentioned that versions higher than 2.0.65 don't work correctly - I was wondering if you've played with 2.0.72 builds.

I wasn't able to find 2.0.62 versions on their webpages - and my moonlight directory doesn't appeaer to have that version either.
post #7 of 752
I guess the simple elecard encoding method won't work with sub-channels or alternate audio substreams, correct? That's why I've always been fixated on the avisynth method. almost all of my sources have either more than one audio stream or more than one video stream, and dvd2avi followed by avisynth lets me pick.
post #8 of 752
miksmi just contacted me, the META FAQ has been updated with this excellent guide and it should be posted by tomorrow. Great work!
post #9 of 752
Wonderful FAQ, looks like it covers everything from basics to the advanced stuff that encoding lovers like to see.

I just have a quick question:

Why is it that everyone on avsforum seems to prefer the Windows Media format over XviD. Is there really proof that the Mpeg4-advanced codec that microsoft has made is better than the open source codec?

I havn't been experimenting very extensively, mainly because my puny system (2000+) can't handle much HDTV decoding in real time. My system cant decode Mpeg2 at HDTV resolutions (not even 720p) nor can it do XviD at 1280x720 at 29.97fps at 5000kbit/sec with AC3 audio or OGG audio.

I've been tinkering a bit, and it turns out that my system CAN run XviD fine without the 5.1 channel audio being decoded at the same time, so thats where I focused my tests. I ended up using 1-pass cbr with b-frames set at 255 (from what I hear, thats the maximum where it doesnt give errors of any kind) and encoding at 6000kbit while decimating by two.

I used similar steps to the WMP9 encoding method, by going through hdtv2mpeg, dvd2avi, avisynth, but instead of using link2 I went straight to vdubmod and encoded into XviD.

Is there any reason not to be using XviD over WMP9? Should I change formats or is there no really good reason to do so?

post #10 of 752
Thread Starter 
Originally posted by patja
I guess the simple elecard encoding method won't work with sub-channels or alternate audio substreams, correct? That's why I've always been fixated on the avisynth method. almost all of my sources have either more than one audio stream or more than one video stream, and dvd2avi followed by avisynth lets me pick.

Now I understand. In that case I really can't help you. As I said in the guide the only HDTV source that I have is DishNetwork, so in my case setting up my source is straightforward. I have no OTA sources.

Perhaps someone else with experience using streams with more than one subchannel can chime in and offer a few suggestions.

post #11 of 752
Wow. Amazing job!. If you are willing to do pictures and stuff for your document that you have created, I will be more then willing to put up the money and space for a website guide. Could call it HD2DVDR.com or something.

Unfortunately no system I have can support playback of any of this yet :-). I'm just waiting for the price on 3ghz chips to drop a bit and I'm in.
post #12 of 752
Thread Starter 
Originally posted by BiggJeevis
Wonderful FAQ, looks like it covers everything from basics to the advanced stuff that encoding lovers like to see.

I just have a quick question:

Why is it that everyone on avsforum seems to prefer the Windows Media format over XviD. Is there really proof that the Mpeg4-advanced codec that microsoft has made is better than the open source codec?

Because WM9 has more efficient compression than XviD. Most of the movies I encode with WM9 will fit on a single DVD-R encoding at 1440 x 1080. This has been discussed to in the following thread:

Why WM9 over MPEG4 for HD-DVD archives?

The disadvantage of WM9 is no support for Ac3 audio. You have to transcode it to WM9 multichannel sound. But the word is that direct Ac3 support is coming.

I havn't been experimenting very extensively, mainly because my puny system (2000+) can't handle much HDTV decoding in real time. My system cant decode Mpeg2 at HDTV resolutions (not even 720p) nor can it do XviD at 1280x720 at 29.97fps at 5000kbit/sec with AC3 audio or OGG audio.

I've been tinkering a bit, and it turns out that my system CAN run XviD fine without the 5.1 channel audio being decoded at the same time, so thats where I focused my tests. I ended up using 1-pass cbr with b-frames set at 255 (from what I hear, thats the maximum where it doesnt give errors of any kind) and encoding at 6000kbit while decimating by two.

I have long-believed that audio is the Achilles Heel of the HTPC. Over the years we have had to endure all sorts of problems like jitter, judder, stutter, dropped frames, audio dropouts, etc. Many of these headaches are audio driver related. I was having all sorts of stuttering problems with HD using a Fortissimo II sound card that vanished when I installed an M-Audio DIO Delta. Now I am using the M-Audio Revolution 7.1 just so I can get WMA multichannel 5.1 sound to my Denon AVR-5800 external 5.1 channel analog audio inputs. It works great.

post #13 of 752
I'm having trouble with the TSP cleanup part of the operation. After I construct the graph in graphedit and hit play, it creates a file that is 140 MB and then stops. In graphedit the "play" button is still engaged, but graphedit stops consuming any CPU and appears to be dead (it does respond to being shutdown however). This is happening regardless of what transport stream files I throw at it.
post #14 of 752
Great guide...very appreciated.

On request: Can you please list all of the audio and video filters used (from plug-in tab?) in WME9?
post #15 of 752
Go into DVHStool settings (or the registry) and make sure "single file" mode is checked. Also, make sure you use File Source Multiple Async and not File Source Async. If that doesn't get it, I would re-install DVHStool.

No plug-ins are needed for basic encoding.

WM9 beats Xvid by ~20% in HDTV to DVD-R compression.

post #16 of 752
Thanks Joe, that did the trick.
post #17 of 752
Thread Starter 
The guide is a resource here for everyone to use to their own benefit. But to benefit from it you have to use it. That is not to say you have to wade through it over and over again. I realize there is a lot of ground covered. But what's there is there by necessity because it's the sort of stuff either I or someone else has asked about before.

Use the search feature! No, I am not talking about the AVS Forum search. You know where to find this thread. Just load the thread in your browser and then press CTRL + F. Type your search phrase or Keyword and click "Find Next."

On the DVHStool issue I loaded the thread in my browser and pressed CTRL + F and typed DVHStool in "Find What" box. That took me to the DVHStool discussion in the software section, where I found in the third paragraph:

Start DVHStool and on the menu select D-VHS and then settings. Check the box for single file mode. This puts TSPcap in single file mode, which makes it easy and fast to join your minute capture files into a single transport stream file. This is much easier to deal with than adding all your minute captures as a seperate sources in WME9.


I am not saying this just to single you out. I have seen this happen often where a very large post has a lot of useful information and people don't read it carefully because it is time consuming. All I am doing is trying to show you a way for the guide to work for you. You can post your questions here but then you have to wait for an answer. You can make the guide work for you to the extent that it can and not have to wait for an anwser from someone else. That was the main reason I wrote it to begin with. So that people would have a 24hr per day resource they could tap whenever they needed it.

Good luck.

post #18 of 752
Originally posted by patja
I'm having trouble with the TSP cleanup part of the operation. After I construct the graph in graphedit and hit play, it creates a file that is 140 MB and then stops.

I have the same problem. I already turned on Singlefile in the registry; it didn't help. I am using File Source Multiple Async.

Manually combining the minute files into one big .ts file and using the normal File Source async filter works fine.

I can't install D-VHS Tool because I have Windows 2000. I extracted the filter and registered it manually.

Any ideas?
post #19 of 752
Thread Starter 
You might want to try creating the following key in the registry:


Then add SingleFile as a DWORD value and set it to 1.

I don't know if it will work but it's worth a try.

post #20 of 752
I said I already did that. Anyway, the problem is with the source filter, not either of the other two filters.
post #21 of 752
Thread Starter 
Whoops! Yes you did say that and I missed it. Sorry. Perhaps the source filter will only work on Windows XP. After all, he does say that XP is required to use DVHStool, and perhaps that extends to the directshow filters included with it. You might be able to register them, but they may not work on 2K. Caveat emptor.

You can try sending a PM to Ricka and ask him about it or post your question in the DVHStool thread in the HDTV Recorders forum. He wrote the filter.

post #22 of 752
post #23 of 752
I figured it out, sort of.

I just used the File Source (Multiple Async) filter that comes with D-VHS Tool 2.11 instead of the latest 2.12. That works, except it seems to keep producing output forever - looping maybe. Is there a registry setting to turn looping off?
post #24 of 752
Originally posted by patja
I guess the simple elecard encoding method won't work with sub-channels or alternate audio substreams, correct?

There's a way to get around the Elecard demux's inability to let you choose which elementary streams to use:

When the DirectShow stuff down-stream of the demuxer only wants 1 video and 1 audio stream, you'll always get the first video and first audio stream that the demux filter produces. By first I mean the highest output pin on the filter - not anything about the way the pins are labeled. Though the labeling may indicate what you want. e.g. for my local DTV stations the labeling is consistent - i.e, subchannel 1 is always video-1 and ac3-2 or something like that.

The Elecard demux filter seems to order the output pins for any given input stream arbitrarily, or perhaps according to the order that they first appear in the input. So you can force a different order by trial and error: trim a fraction of a second (0.2 works well) from the beginning of the transport stream, and then open it in Graphedit and see if the output pins are in the order you want. Repeat until you get what you want. You only need to look at the first video and first audio output pin. The order of video relative to audio and vice versa does not matter.

It's tedious, but it works. Alternatively, you can use something like HDTVtoMPEG2 to remux from a transport stream to a program stream, selecting just the elementary streams that you want.
post #25 of 752
Thread Starter 
I have been running into problems encoding movies captured from Showtime using the Quality VBR Elecard method insofar as they tend to have spots that comb severely.

It is now my understanding that this has been a widely reported problem elsewhere, though I have just experienced it for myself after writing and posting the guide. I have therefore made some updates to indicate that the Quality VBR Elecard method may not work well for Showtime movies and chances are good that it won't. I tested five captures from Showtime and all of them are problematic. I have only had problems with one HBO movie and it was an older transfer, everything recent has come up clean.

You may need to rely on the Quality VBR AVISynth method for these films, since the decomb plugin does a far better job in dealing with these problem films. I am also recommending at this time that every capture should be run through DVD2AVI and you should monitor the video information screen as a sanity check. If it comes up as NTSC video substantially for more than a few percent then you are likely to have issues with the Elecard method. This should be done with every movie capture prior to selecting an encoding method. I will make substantial updates to the procedures once I have figured out a precise methodology for dealing with the problem.

post #26 of 752

Great guide - I am inpressed.

In the 1 pass method (my favorite since the begining despite Jamoka convincing me otherwise) why are you forcing teh FPS to be 23.98?? Showtime is broadcasting 1080i at 29.96. Thus you have to enable IVTC if you want the proper frames.

If I missed this in the guide sorry- I checked twice however.

Also, all the time spent with IVTC does not decrease the size of the file as far as I can telll.

ALSO, in the guide, do you mention the performance slider? Tools->->Options->Performance.

I have been using it all the way to the left and cannot see a differnece in output quality however the time it takes to encode is 3x faster then the default setting.

Great work. Much better then wading through the 9000+ other posts

post #27 of 752
Thread Starter 

Thanks for the praise; it is much appreciated.

Setting the frame rate in the compression properties in the encoder ONLY controls the maximum frame rate of the encoder output. It has nothing to do with the frame rate of the input. If you have a prefect film-source telecined input stream and are IVTC then the input frame rate should always be around 24fps. You can check this on the monitor screen by looking at the statistics tab while an encoding job is running. I have set the output frame rate as a test in the encoder to 29.97 and with a good IVTC source it will still run at roughly 23.98. Keep in mind that with our methods we are IVTC before WME9 sees the input. In fact, I turned off software deinterlacing in the Elecard MPEG2 decoder and it is STILL feeding 24fps IVTC input to WME9. So I don't know what the deal is with that setting.

In a perfect world the encoder should see nothing but progressive film rate frames (for film sources). Of course, the world is not perfect but for HBO transfers this how I run the encoder and I have yet to be disappointed with the results. Obviously if your file is a 29.97 source encoded as video then you should set the encoder's max frame rate at 29.97 (the default). I also think that dealing with video sources is a job best left to the AVIsynth method and not the Elecard method.

The performance slider is discussed in the guide.

post #28 of 752
Great work, Jerome!

Looks like someone had a busy Connecticut snow day.

post #29 of 752
Amazing, Joe! Thanks for the guide! Had been waiting for this so long.

I do have a question. Is it worthy to record movies on HD HBO or SHO if the movie will come out on DVD soon? What I mean is, what is the real source that HBO-HD or SHO-HD are using? If those stations are simply upconvert 480p to 1080i, then why not wait for the DVD to come instead of all the work? Do the stations get better resolution than DVD?

No matter what is the real source resolution is compare to DVD, I still think it is a great hobby to discover this whole encoding process.
post #30 of 752
Thread Starter 
Ok guys...not to toot my own horn here but Joe (Jamoka) did not write the guide...I did. Please, call me Jerome.

But to give Joe credit a lot of his ideas and help he has given me from time to time did go into it.

New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Home Theater Computers
AVS › AVS Forum › Video Components › Home Theater Computers › ***The Comprehensive Windows Media 9 HDTV Encoding Guide***