Archive for the ‘vista’ Category

h1

Monaday #2

December 17, 2007

powershell logo At first I was quite enthusiastic about PowerShell. Far better to have a modern scripting shell, made of the same fabric as current versions of Windows, than some stale leftover from 16 bit DOS.

Having taken my first few tentative steps, I set about creating the PowerShell equivalent of a DOS batch file. It would be an interesting learning process to, say, migrate my command line solution for video encoding to the new scripting medium.

I soon discovered the PowerShell equivalent of the .bat file is the .ps1 file. Simple experiment: put a PowerShell command such as “get-process” in a text file, save and rename so it has a .ps1 extension, double-click and it should run. But it just opens as a text file.

A bad sign. The .ps1 extension does not become associated with PowerShell when you install the latter. You can of course associate .ps1 with PowerShell manually. I tried that, double-clicked, PowerShell opened …. (yes! yes!) … then a load of red error messages appeared for a couple of microseconds and PowerShell closed again.

Apparently there is no way to run a PowerShell script by double-clicking a script file in an explorer window. You have to launch PowerShell manually and then run the script explicitly, giving its full pathname. This is for security reasons. It’s all explained here and is all about preventing “command hijacking”.

No wonder the .ps1 file extension does not get associated with PowerShell. There’s no point if you can’t run a script by clicking on the file.

Well I’m delighted that PowerShell is so secure, but less thrilled that it’s so inconvenient to use. So inconvenient as to make it all but useless. What is the point of a scripting language if you can’t use it to make life easier by replacing a series of commands with a simple click? Am I missing something?

I’m well aware of the security issues, including command hijacking, but there must be a better way to stop hackers dead in their tracks than crippling the scripting system to the point where it’s more trouble than it’s worth to use it.

What is Microsoft’s strategy here? Do they want to promote the new and safer PowerShell and phase out the old DOS box? You’d think so. To achieve that they need to encourage users to adopt PowerShell by promoting it and making it easy to use. But there is scant publicity and the security lock-down is a killer. Meantime the DOS box is still there with all its security vulnerabilities.

Which of the two do Microsoft expect real people to use? How does releasing a technologically up to date, secure but inconvenient new scripting system, while leaving the old insecure but easy to use system in place, help anyone migrate towards safer practices? Or reap any benefits for that matter?

I’m in two minds whether to bother with Monaday #3 et seq. If the DOS box is dead then PowerShell may soon be joining it in the same coffin.

AddThis Social Bookmark Button

h1

Vista Temperature Check

December 11, 2007

Vista busy cursor Judging by the search strings which bring visitors to this website, the pattern of problems encountered by Vista users is changing. There are still people looking for solutions to slow performance and freezes, but there are far larger numbers more concerned with specific issues, such as how to enable the audio “what you hear” channel (which Microsoft deliberately crippled in Vista) or why it is almost impossible to do any kind of video encoding in Vista without something major crashing.

Here is a selection of “Vista problem areas” (in order of number of relevant hits on this site) and the related search strings:

COM Surrogate and Windows Explorer Crashes Associated with Video encoding

Description:
Tendency for the “COM Surrogate” process to crash when encoding video, and for drag/drop operations on video files to crash Windows Explorer where certain video codecs are used.

Related posts:
Vista’s Video Nasties

Search strings:
Host Process of windows services stopped, folder containing video crashes explorer, vista avisynth avi fail, com surrogate, program crash opening avi file in vista, what is COM Surrogate, windows explorer crash dllhost.exe, dllhost.exe com surrogate + vista, xvid com surrogate, recycle bin explorer crash windows vista, avi encoding pc crashes vista, explorer crashes when moving folders, recycler bin explorer crash windows vista, Vista crashing a lot com surrogates, buffer overrun while running mp4 content, mp4 crashes vista, vista and video crashes, DllHost com surrogate vista, why is video playback so bad in vista, Video crashes explorer vista, buffer overrun while running mp4 content, dllhost com surrogate vista, dllhost COM Surrogate in the DEP

“What You Hear” Disabled

Description:
Disabling of “stereo mix” or “what you hear” audio channels

Related posts:
With Vista what you hear is not what you get

How to get what you hear

Search strings:
recording what you hear on vista, “what you hear” in vista, vista audio capture what you hear, stereo mix vista, what you hear sound driver, vista disabled audacity streaming audio, enable what you hear in vista, what you hear audacity, “Stereo Mix” o “What you hear” vista, what you hear windows vista, “what you hear” vista, audacity “what you hear”, vista record what you hear

Nero 6 does not work with Vista

Description:
Nero 6 does not install or does not work correctly in Vista

Related posts:
Nero Burning Rage
ImgBurn the answer?

Search strings:
fix for nero 6 in vista, nero will not work on vista, nero burning update for vista, problem nero 6 not working in vista, Specified host adapter invalid nero, nero burning on vista compatibilty

MS Visual Studio 6 does not install correctly on Vista

Description:
Installation of Visual Studio 6 on Vista does not complete correctly so that service packs cannot be installed

Related posts:
Getting Visual Studio 6 to install on Vista

Search strings:
Is Visual Studio 6 compatible with Vista, vb6 vista ole error, vista & vs6, visual studio 6 vista compatible, “Visual Studio 6″ Vista, visual studio 6 setup fails, visual studio ver 6 vista, install visual studio 6 on vista

Confusing UAC messages caused by some startup programs

Description:
Vista repeatedly blocks some programs that launch on start-up (eg Adobe Update Manager) because they trigger User Account Control

Related posts:
Now UAC it, now you don’t
Vista: Confusion, alarm and annoyance all rolled into one

Search strings:
vista blocking adobe update manager, vista startup items always ask, vista startup programs safe to stop, adobe update manager and windows vista, adobe update manager vista startup

Vista’s Slow performance & Tendency to Freeze

Description:
Vista tends to perform sluggishly, particularly on lower end machines, and can lock up altogether with some applications

Related posts:
Vista and the Curse of the Rotating Blue Bagel
What’s so great about Vista that it’s worth crippling my PC for?

Vista’s Morning Sickness
Vista’s voracity for RAM
The suckiness of Vista was evident long ago
The majority of Vista PCs being sold right now aren’t powerful enough to run Vista
Well worth the upgrade from Vista to XP
Dipping my toe back in

Search strings:
Performance/freezing issues with iTunes iTunes runs slow on vista, itunes vista freeze, itunes slow launch vista, does itunes slow down vista, itunes causing vista to freeze Relevant posts Vista performance, resource requirements vista runs like a dog,”windows vista runs slow” “cpu”, superfetch sucks, 1gb enough vista Relevant posts Vista freezes vista freeze, why does vista freeze right up, busy cursor freeze vista

AddThis Social Bookmark Button

h1

Monaday #1

December 10, 2007

powershell logo The DOS box is dead, long live the DOS box!

Except we now call it Windows PowerShell 1.0. Originally codenamed “Monad”, Windows PowerShell is a replacement for the old familiar cmd.exe DOS prompt. It provides a command line interface with Windows but is claimed to be a major advance.

PowerShell works with both Vista and XP SP2 but is bundled with neither. It is though freely available for download from Microsoft here.

This is an old-ish article on Monad, but still interesting background.

I’ve decided to start a series exploring PowerShell, weekly on a Monday, so I’m calling it the Monaday series. Quirky, I know, but it will remind me to post a new item on time.

So far I’ve not got much further than downloading and installing it. But I have made a useful discovery. The old DOS commands (think of dir, cd, etc) seem to work on PowerShell so Microsoft appear to have had the good grace to make it backwards compatible. Still, we’re supposed to get used to the new style commands with a verb-noun format (eg get-process) because that will make use of PowerShell more intuitive as we get into it more. The clever bit is that if you use the get-help command with an old DOS keyword it will give you the new format equivalent, as in the example below:

windows powershell monad

The old DOS box is still available but I’m hoping to learn, over the coming weeks, whether PowerShell genuinely is the more modern and technically superior alternative.

AddThis Social Bookmark Button

h1

Vista’s Video Nasties #4: H.264 recipe revealed

December 4, 2007

Vista busy cursor Here is the promised magic recipe, the complete solution, for automated H.264 encoding on Vista (or XP for that matter).

(Note that since I first published this post I have found an alternative, direct way to embed video into blogs where the video quality is as high as I wish. Details are here.)

Scenario

Input: The video to be encoded is an avi file in DV format, such as you might capture from a camcorder using Windows Movie Maker or other video editing application. The video may have been edited, so long as the edited footage has then been saved in DV format in an avi file. Audio content is assumed to be in PCM (uncompressed) format, typically with a 48,000 Hz sampling rate.

Output: The encoding process results in an mp4 file containing H.264 encoded video and AAC audio. The output file is suitable for uploading to on-line video hosting services such as youTube or vimeo.

Defaults: The default settings are video resolution of 448 x 336 and H.264 encoding quality of 26. These can be overridden by changing the relevant lines in the video.avs and video.bat files (see below).

Preliminary

It makes sense to create a folder on your PC where you will keep the relevant programs and working files. For the purposes of the post I will assume this is c:\videoenc

What you need to download and install

AviSynth

AviSynth 2.5 is a frameserver which we use here to perform the preliminary processing such as cropping and deinterlacing. Download the file Avisynth_257.exe from here. Run it to install AviSynth. Accept all defaults.

Smooth Deinterlacer

Get it from here and save the file smoothdeinterlacer.dll to c:\videoenc. Be sure to select the version designed to work with AviSynth 2.5x not the older version for AviSynth 2.0x.

x264

This is the H.264 encoder program itself. You can get it from here*. Click on any of the mirror links, e.g. mirror 01, next to x264.exe in the table of encoder download options. Save the x264.exe file to c:\videoenc. You don’t need to install anything. The file just needs to be in that folder.

[*Update 5 Dec 07: The link above appears to be down or unreliable. I have found another source for the x264.exe file here but have not yet had the opportunity to check its origin, version or to test it]

MP4Box

MP4Box takes the raw compressed video file and places it in an mp4 container file. The program is available from here. I downloaded version 0.4.4 compiled 3 June 2007. Again, you just need MP4Box.exe to be in the folder c:\videoenc.

MPlayer

You can get this from here. Download “MPlayer 1.0rc1 Windows” (not the GUI version) from any of the mirror site links. You need MPlayer to extract the uncompressed audio from the DV video file, so it can then be compressed as AAC audio. You only need the mplayer.exe file. Put it in c:\videoenc.

faac

The utility that compresses your extracted audio in AAC format. Available from here. Download the faac-1.26.1.zip file. Place the faac.exe file in c:\videoenc.

Creating the text files that automate the process

Within the c:\videoenc folder create a text file called video.txt. Open it and copy the following text into it:

LoadPlugin(“SmoothDeinterlacer.dll”)
DirectShowSource(“c:\videoenc\video.avi”)
SmoothDeinterlace(tff=false, doublerate=false)
LanczosResize(448,336)
converttoyv12()

Close it, saving the changes. Change the filename to video.avs.

Next create another file called video.txt. Open it and copy the following text into it:

@ECHO OFF
x264.exe –fps 25 –qp 26 –progress –output video.264 video.avs
MP4Box -flat -add video.264:fps=25 -v -new video.mp4
mplayer -vc null -vo null -ao pcm:fast video.avi
faac -b 128 –mpeg-vers 4 audiodump.wav
MP4box -add audiodump.aac video.mp4
PAUSE
CLS
EXIT

Close it, saving the changes. Change the filename to video.bat.

NOTE: The commands in video.bat as shown above assume a PAL DV source hence a frame rate of 25 fps. If your source video is in NTSC format you need to modify lines 2 and 3 to refer to a frame rate of 30 fps.

Encoding a DV avi file

Just save your raw or edited DV file to the c:\videoenc folder. It has to be called video.avi so save it under that name or rename it as applicable.

Double click the video.bat file in the same folder.

That’s it. The whole encoding process will now run from beginning to end under control of the commands in that file. You can go and make a cup of coffee.

Meantime a DOS box will open and display lots of stuff. Eventually, the display stops changing and the bottom line reads “Press any key to continue …” When you do that the DOS box disappears.

You can then find your encoded file, containing H.264 encoded video and AAC encoded audio, in c:\videoenc. It is called video.mp4. You can now upload it directly to youTube, vimeo, veoh, whatever.

Changing settings

The default resolution is 448 x 336 pixels. If you want something different just change line 4 of the video.avs file. You can just open the file with Notepad to make the changes. You must though ensure that both the horizontal and vertical resolutions are multiples of 16.

The default H.264 encoding quality is 26, on a scale from 1 to 51, using single-pass encoding. You can modify the quality setting by changing the “qp” parameter in line 2 of video.bat. Lower values for qp improve quality but increase the bitrate and filesize, vice versa for higher values.

In principle it should be possible to obtain better quality for the same filesize by using 2-pass or 3-pass encoding. So far I haven’t seen much improvement in my experiments with multi-pass encoding but it’s early days. I’ll report on my discoveries in a future exciting episode of Vista’s Video Nasties.

Credits

I found this very helpful when I was getting started with a command line solution for use of x264. It seems to be part of an encoding guide that looked highly promising but was abandoned years ago. Shame.

The rest of it was down to trial, error and slog.

AddThis Social Bookmark Button

h1

Vista’s Video Nasties #3

November 30, 2007

Vista busy cursor I promised in #2 of the Vista’s Video Nasties series that I would publish a complete Vista-compatible solution for producing decent quality H.264 mp4 videos from camcorder DV footage, for uploading to on-line video hosting services such as youTube and vimeo.

I have my solution sorted and it will appear shortly as #4 in the series.

What gets me is that I have had to resort to DOS-style batch files, having had no joy with Windows user interfaces for x264 such as meGUI.

The batch file approach is not so bad. Once all the right command line instructions are in place you can double-click your batch file and the entire encoding process is pretty much automatic from there.

It does though seem ironic that despite two decades of successive versions of Windows, each supposedly a step forward from its predecessor, the technology is still so rickety that you can find yourself having to resort to the world of DOS when things get too complicated.

AddThis Social Bookmark Button

h1

The public lambasting of Vista goes on

November 28, 2007

Vista busy cursor More public criticism of Vista courtesy of CNet UK. This time Vista’s qualities are celebrated by inclusion in CNet’s alarmingly alliterative “Top ten terrible tech products” parade, alongside all time venerated designs such as the Sinclair C5 and Amstrad’s E-m@iler Telephone.

From CNet’s Crave column:

“Any operating system that provokes a campaign for its predecessor’s reintroduction deserves to be classed as terrible technology. Any operating system that quietly has a downgrade-to-previous-edition option introduced for PC makers deserves to be classed as terrible technology. Any operating system that takes six years of development but is instantly hated by hordes of PC professionals and enthusiasts deserves to be classed as terrible technology.

Windows Vista conforms to all of the above. Its incompatibility with hardware, its obsessive requirement of human interaction to clear security dialogue box warnings and its abusive use of hated DRM, not to mention its general pointlessness as an upgrade, are just some examples of why this expensive operating system earns the final place in our terrible tech list.”

I really can’t argue with any of these points. They are borne out by my own experiences and conclusions as reported in this blog.

The best thing you can say about Vista is that not everybody hates it. Hardly “The WOW Starts Now!”

AddThis Social Bookmark Button

h1

How to get what you hear

November 25, 2007

Vista busy cursor In a comment to my previous post, Jay of vistasucks fame pointed out that Microsoft deliberately disabled the “what you hear” and “stereo mix” audio input options in Vista to stop people using software such as Audacity to strip DRM from audio content.

It makes a lot of sense. You could play back an encrypted song on say iTunes while recording it off the “what you hear” channel using Audacity. The resulting sound file would be a new, unencrypted recording.

I guess there would be some loss of quality because the recording is capturing the signal after conversion from digital to analogue for playback over your loudspeakers. Still, many users wouldn’t care too much about that.

Jay is probably right about Microsoft crippling part of the audio functionality in Vista deliberately to thwart DRM circumvention and please the record labels. He is not alone in being of that view. It would be entirely in keeping with the pandering to the studios that has led to the elaborate copy protection systems built into Vista for HD video playback.

Happily, Microsoft’s dabblings are not terminal. All you have to do is flush out Microsoft’s DRM friendly audio drivers by installing the drivers provided by the soundcard manufacturer. In most cases, the proprietary drivers will support “what you hear”. The low down on the whole process is described here.

In my case that meant downloading and installing the Asus AudioMAX drivers for my on-board sound chip. I could then enable “what you hear” and “stereo mix” from the Sound applet in the Windows Control Panel as described in the Audacity link above.

I call this the Silk Purse solution.

AddThis Social Bookmark Button

h1

With Vista what you hear is not what you get

November 23, 2007

Vista busy cursor I’m a fan of the free open-source (and cutely named) Audacity application for editing audio. Among other things it allows you to capture streaming audio as a sound file. Unless you’re running Vista, that is.

My son, Jonny, had been interviewed for a BBC radio program, The World This Weekend, because they were in Oxford, reporting on the LibDem leadership contest, and he is an Oxford student and well-known LibDem blogger. The program went out last Sunday 18 November at 1pm and then continued to be available from the BBC website as streaming audio for a further week. I thought it would be nice to have a permanent record of Jonny’s broadcast observations about the on-going scrap between Messrs. Clegg and Huhne. One (among many) for the parental pride scrapbook.

Vista had other ideas. Normally, when you use Audacity, you get a choice of inputs from which to record. These include “stereo mix” or “what you hear” or somesuch. The point is that whatever audio is being played by the PC’s soundcard, and out through the speakers, is also available as an input to Audacity and can be recorded as a wave file or other sound file. Malheureusement, with Audacity running under Vista, you can only record from the microphone input. Quel surprise!

Methinks Microsoft have made a pig’s ear of audio on Vista.

pig's ear

It seems that by default Vista installs its own audio drivers which do not offer stereo mix or “what you hear”. You are supposed to install drivers provided by the soundcard manufacturer, if you’re reasonably tech savvy that is, or just go mad with frustration if you’re not.

I thought I had the latest Asus motherboard drivers installed and that included the onboard sound chip. Maybe not. No doubt I’ll find a solution somewhere. Just another annoying little trial and needless waste of time that characterises the Vista user’s world.

Update 25/11/07:  Solution in this post

AddThis Social Bookmark Button

h1

Vista’s Video Nasties #1

November 7, 2007

Vista busy cursor After my early trials and tribulations with Vista, as detailed in earlier posts, and having briefly sought refuge in XP, I have for the last few months been settled in a sort of Vista comfort land. Some improvements to hardware, a few key updates from Microsoft and finding workarounds to some of the most annoying problems had combined to bring me to the point where everyday use of Vista had ceased to be painful or aggravating.

But then I decided to start dabbling in video work, for the first time in earnest since acquiring a Vista PC. I’m now in a world where the COM Surrogate crashes with alarming regularity, the video tools I try to use (eg meGUI) stop working and even Windows Explorer keeps going down. To add to this disconcerting mix, a couple of days ago Outlook 2007 crashed while downloading mail (it looked like a buffer overrun stopped by DEP) but I couldn’t really tell whether that was related to all the other crashes or if it was something genuinely up with Microsoft Office. In any event, Vista invited me to install the latest Office updates and Outlook seems to have been fine since.

The Explorer crash seems to be associated with video files that have been consigned to the Recycle Bin, in particular videos encoded with codecs that Vista or possibly DEP don’t like. I would open the Recycle Bin and select all the files, to see how much space the Bin was taking up. That would be enough to crash Explorer. Selecting the one problem file would also do it. I could not delete it singly – any attempt to highlight it for deletion would bring on the Explorer crash – so I had to empty the whole Bin.

I also tried running DEP at its less intrusive level, where it only guards against exploits in Windows components, but that did not stop the flurry of crashes so I turned it back up to full coverage again.

My confidence in Vista has been shaken again. I’m well out of comfort land and have had to return to XP for recent video encoding work. Not satisfied that this is sustainable in the long run I’ve started the slow painful process of finding workarounds so I can encode my video reliably in Vista.

I will continue to document my experiences on this blog, in future posts under the Vista’s Video Nasties series. The aim is to arrive at robust methodology for creating high quality video that I can upload to one of the better on-line video hosts such as Vimeo. I will document the definitive process for anyone who is interested.

Wish me luck and patience.

AddThis Social Bookmark Button

h1

Time to rock the bloat

October 26, 2007

Vista busy cursor There is hope for Microsoft. Well a bit, anyway.

This from a recent article in NetworkWorld:

“The core code for Microsoft’s Windows OS is undergoing a rewrite to make it slimmer for use in a wide range of future products, including Windows 7, the OS that will succeed Vista.

The internal project, code-named “MinWin,” is not being readied for a product just yet but will be part of Windows 7, said Eric Traut, a distinguished engineer, during a recent presentation at the University of Illinois. A video of his talk has been posted online”.

So it has finally hit home that they have allowed bloat from one incarnation of Windows to another to get totally out of hand. It has a lot to do with backwards compatibility, but they have in the past either overdone the latter or been lazy in the way they’ve bolted on new features, or more likely both.

This sounds like the right move, but to do the job properly they would need to strip the code down to the essentials and rebuild it from the ground up. This sounds more like an attempt to streamline a kernel which was maybe not the root of the problem, to compensate for bloat in other areas.

If so it will not solve the problem, just delay the inevitable.

AddThis Social Bookmark Button

Follow

Get every new post delivered to your Inbox.

Join 383 other followers