Archive for December, 2008

Published by Arto Jarvinen on 30 Dec 2008

If you tolerate this…

Old TV
Back in the good ol’ days of decent genlock

There is a lot of focus on HTPC (home theater PC) spatial resolution and color resolution, but there is rather less focus on the temporal resolution. The fact is that your regular PC is not at all intended for video. It is intended for word processing and similar stuff for which it doesn’t matter if a letter shows 20 ms late on the screen. This is evident from the architecture of the PC with a graphics board display refresh rate that is disconnected from everything else in the computer, including any incoming video content. This means that the display refresh rate may or may not match the frame-rate of the incoming video. And over a long period the difference between even very close (manually adjusted) rates will build up to one whole frame. The consequence of this is stutter (judder) as a frame is either skipped or repeated depending on whether the graphics board runs slower or faster than the incoming video. (After that “adjustment” a regular media player usually runs in sync for a while again but may sometimes end up stuttering for some time of reasons that I haven’t fully looked into.)

A regular TV is much better in this respect as the display is “genlocked” to the incoming broadcast video, i.e. they are entirely synchronized. The HTPC has certain other advantages still making it worthwhile to try to fix its deficiencies.

The GothPlayer works like a TV; it syncronizes the display refresh rate to that of the incoming video. Unfortunately there is no standard way of doing that in e.g. DirectX (which would have been great) so the GothPlayer uses a third-party software called PowerStrip to control the display refresh rate. PowerStrip gives better access to the graphics board’s parameters than anything that I’ve seen from NVidia, ATI or Microsoft.

Unfortunately most of the graphics boards that PowerStrip supports are legacy boards and not sold anymore. The PowerStrip developers seem to depend on documentation leaking out from the graphics board vendors and obviously the NVidia security policy has worked very well lately. Today there is no overlap whatsoever between the NVidia boards supported by PowerStrip and available NVidia boards. I will put an order on the only overlapping ATI board tomorrow, just in case my current HTPC board breaks down.

I would urge NVidia and ATI/AMD to either leak their documentation pronto to EntechTaiwan or else to implement an API function for setting the refresh rate accurately (within a few hundreds of a Hz) during the vertical blank of a video frame. That way we could bring real HD video resolution to the PC along all the three dimension of space, color and time.

Published by Arto Jarvinen on 29 Dec 2008

New version of GothPlayer

At the time I created GothPlayer, the DirectShow base classes were not migrated to Visual Studio 2005 so I had to fork off my own version of them. I have now made the necessary adjustments so that GothPlayer compiles with all the latest libraries and base classes from Microsoft. It now requires:

  • Microsoft DirectX SDK (November 2008)
  • Windows Software Development Kit (SDK) for Windows Server 2008, version 6.1 (funny name that since it is the general SDK for for instance Windows XP development)

The new version includes a couple of bug fixes and can be started from the command line. This means that you can make it the default player for video files by entering “C:\Program Files\GothPlayer\gothplayer.exe” -a “%L” into the default action for the video file type. (This dialog can be found through Tools -> Folder options… -> File types -> (select file type) -> Advanced.)

The player includes an aggregated (COM) VMR9 renderer with a custom allocator-presenter that:

  • Uses exclusive mode for presenting fullscreen video and can toggle between windowed and fullscreen mode. The standard VMR9 does not use exclusive mode and is therefore prone to tearing in some configurations.
  • Tweaks the display refresh rate to match that of the incoming video (just like a regular TV!).

The implementation of the exclusive mode fullscreen was not entirely straightforward since one needs to entirely disconnect the renderer from all upstream filters to be able to toggle between a windowed Direct3D device and a fullscreen (exclusive mode) Direct3D device. If you intend to do something similar, you might find the source code interesting (it may not be the prettiest solution but neither is VMR9).

For more info and downloads of the new versions of the application and source code see the GothPlayer pages.

Published by Arto Jarvinen on 26 Dec 2008

Stirred, not shaken

Steady
Steady!

When I looked at the first shots with my HandyCam recorder, I noticed a certain degree of judder in the background when recording moving objects such as a horse on a show jumping course. I guessed this had something to do with the anti-shake feature of the camera that cleverly locks on to scenes so I turned it off once when I went on a show jumping competition with my daughter. I shouldn’t have done that. It came as a bit of a shock to realize what the video looks like with the feature turned off. It wasn’t pretty. Especially with the camera in the hands of a nervous father and with full zoom. Needless to say, my daughter wasn’t very impressed with the results of my experiment either.

Desperate for a remedy I finally stumbled upon the Deshaker plugin for the VirtualDub video processor. Both are freeware. After some tweaking the Deshaker produced an impressive result from the rather hopeless original video. Both versions can be found here. The left video is the original, the right video is processed. I guess one could also crop the processed video to get a steady frame but I haven’t got around to that yet. A shaky frame is at least way better than a shaky picture.

I have turned on the anti-shake function of my HandyCam. Permanently!

Published by Arto Jarvinen on 26 Dec 2008

A video editor that works

I ended up purchasing the Vegas Movie Studio Platinum 9.0 for Windows. I found out it had all the functionality that I came to like in the trial version of the Vegas Pro 8 and it set me back less than $100. I prefer open source when I can but what the heck, everybody has to make a living.

So far the editor hasn’t let me down once. It’s stable and it can render in a multitude of formats, including AVCHD without any quality degradation. I haven’t even started using the multichannel audio editing functions. The interface may not be as clean as that of some other products and I’m not sure it makes use of all of my four CPU kernels as it didn’t get noticeably faster when I upgraded my hardware. But those are minor details.

I definitely recommend this product together with the Sony Handicam recorder.