Sounds like you're hitting a known bug in Windows Media. I think Service Pack 1 for Windows 7 fixed this, but I'm not positive about that.
I have sp1 installed and all important updates. I have been encoding WMV using Expression Encoder (even in batch) and Premiere Pro without issue.
I would use EE but it doesn't accept MTS officialy. I could choose "All files" from the file chooser to force it to load them, which has worked in the past, but then the files crash loading up. Not sure if that is related to the AME issues.
If it's the bug I'm thinking about, the key is that system memory usage exceeds some threshold--4GB rings a bell. My recollections of the fix are hazy as my involvement with this issue goes back nearly a year. I know Microsoft provided us a file to swap in place of a WindowsMedia dll. We did a second round of testing after SP1 was released, but I don't remember whether that testing, too, required manually swapping in the file with the fix.
In your case, what is the memory usage at the moment when AME crashes?
Physical Memory (MB)
Kernel Memory: 297 paged 84 nonpaged
Commit (MB) 6865/9195
(these values fluctuate as i was recording them so they are off a little bit in relation to each other)
I have also set my page file to go from 256mb MIN to 1024mb MAX because I have a SSD for Windows and i wanted to save space. I heard it was not neccessary if you have a lot of ram... I will have 16gb of ram again soon (as i just sent the other 8gb in for replacement). So maybe this could be an issue..?
You should let Windows manage the paging file. Messing with that can definitely cause programs to crash and Windows to hang.