Make MKV files run smoothly

August 30, 2009

Preface

Or what it is that makes the Media Player Classic Home Cinema and Vista combination superior to any current GOM/VLC and XP combination.

This one is for the peeps with somewhat older processor hardware prior to Intel Core (2). However aimed at older hardware, the stuff explained hereunder also makes for more effecient hardware usage on Core 2 Duo systems. These newer types processors seemingly already render MKVs natively, as it should be .

Proof of concept: relative low CPU usage

Why the following boring theory isn’t all talks.

Refer to picture 1 (click to enlarge…) for proof of what you can achieve by applying the hints and tips in this blog entry. Displayed on the left is the Windows Task Manager. On the right is a HD test under Media Player Classic Home Cinema x64.

picture 1

This low CPU usage whilst displaying a HD movie leaves more room for running other more CPU instensive tasks in the background. The screenshot was shot on a 3-year-old Intel Pentium D.

Change the way MKVs are rendered

Obviously, you have to have some power in your computer. The reason why new systems in general handle MKV files nicely is because of their better performance when it comes to floating point numbers.

Older processors don’t have these capacities. But this doesn’t mean your computer as a whole doesn’t have the power. It just might be found in the CPU but rather the GPU.

  1. CPU: Any (max. 3-year-old) AMD Athlon X64 or Intel Pentium D (and up) CPU combined with a decent GPU will do. Do some research if you are unsure if your CPU supports x64. Nowadays, a rather low-budget CPU will do the trick. On some Pentium 4 systems you might also be able to smoothen out performance using some of the steps below.
  2. GPU: I have gotten result working with a nVidia GeForce 6800. I recommend a GeForce 8(9)xxx for H.264 only or ATI Radeon HD series for H.264 and VC-1 decoding (or comparable chipset). You can definately get one of these under 40 bucks.
  3. Operating System: Windows Vista (preferably 64 bits, though 32 bits might show improvements as well because of EVR support is also present in the 32 bits editions of Vista). I’ve gotten it to work on Windows XP also.

If you are unsure if your system will cut it, just try it out but be sure to always make back-ups!

Test systems

"For your consideration." I tried testing the above on my pc and the pc of a friend who had the same problem as me with .mkv files. On both systems, the steps below worked out great.

  1. Pentium D, 4GB, Vista, GeForce 8600GTS, 64 bits Windows Vista
  2. Pentium D, 1GB, XP, GeForce 6800, 32 bits system Windows XP

I also own a laptop with a Core 2 Duo and 2GB of RAM which natively plays MKV’s smoothly using GOM Player. Nonetheless, the steps below did reduce CPU load on this system too, so processes in the background will run faster with these tweaks than without.

It’s all about CPU bandwith

Like most humans own a clock, all computers do too, internally. As each day is divided into [24 x 60 x 60] 86400 seconds, each second of a computer clock is divided into so-called "clock-cycles".

When buying a new PC, you might have heard about e.g. an "AMD Athlon 2,2 Ghz" or a "Pentium 4 3Ghz". For the Ahtlon this means that each second the processor (=CPU) theoretically is capable of outputting a maximum number of 2200 small pieces of data to computer memory (=RAM).

And this is where the bits kick in. These aforementioned small pieces of data nowadays are either 32 or 64 bits in length. It’s obvious that more data can (but does not necessarely!) be put through at once in a CPU processing 64 bits per clock-cycle.

For future reference, "Windows for 64 bits processors" very commonly is abbreviated by "x64". "GPU" stands for "Graphics Processing Unit", most commonly referred to as "graphics card". "CPU" means "Central Processing Unit", this is the main/system/general purpose processor we all have heard about.

Why all this technical nonsense?

Because each statement needs facts and arguments. But to you, the end user, it’s suffice to say this time there is really more to get out of the box. For example, Matrosjka Video files (*.mkv) blipping, stalling or halting in VLC or GOM on 32-bit Windows are more likely to be played decently using Vista x64 and MPCHC.

Use 64 vs. 32 bits, install an x64 operating system.

An important field in which x64 and especially GPUs prove themselves to be worth the little extra cost is… video playbacking!  Using 64 bits Media Player Classic Home Cinema on Vista x64 (on a 64 bits capable processor) IS a whole lot faster compared to GOM and VLC Media Player, especially on computers aged 3 to 4 years playing MKV, MPEG4, H.264 and Blu-Ray disks and files.

Most people nowadays use either GOM or VLC Media Pleyer for video playback. Yet, both are native 32-bits applications and as such can not benefit from the capabilities 64 bits processors provide. Only half of the memory bandwith of a 64 bits processor can be put to use using GOM or VLC. Whether they’re run on top of 32 or 64 bits Vista, it does not matter since they’re programmatoricaly incapable of throughputting more than 32 bits at once. WPCHC, on the other hand, is a native 64 bits application capable of using the full 64 bits of memory bandwith.

GOM and VLC on Windows x64 are run in a sort of "emulator" called WoW (Windows on Windows), requiring the CPU to make even more cycles on x64 than under regular 32 bits Windows in order to get the same results. This alone, is a strong argument as to why the usage of x86 applications on x64 Windows must be discouraged in favour of their x64 counterparts.

Use Vista instead of XP

Everyone claiming Vista wasn’t worth the trouble, you’re WRONG. Windows Vista ships with a new renderer called the Enhanced Video Renderer, a technology exclusive to Windows Vista. It supports DirectX Video Acceleration 2.0 which allows more (non-game-specific) operations to be hardware accelerated as well. This results in average CPU loads less than 10% on 3-year-old Pentium D 3Ghz with most of the calculations being done by the GPU.

Windows XP can only use the older GDI and VMR technologies for video playback, both of which are also integrated with Vista. As such most calculations are done by the (slower) CPU even if a killer GPU is installed. It won’t really use all the GPU’s capablities under XP (though performance will increase nonetheless).

So rather than being a 64 vs. 32 bits issue it’s more of a reason to buy a decent graphics accelerator card combined with any version of Vista for very performant playback of some video files (MPEG4/H264/Blu-Ray).

Think Neelie Kroes

Because you CAN choose.  GOM requires Windows Media Player to be installed. Both VLC and MPCHC don’t. Yes, some people actually use Windows N Editions. (Again, look it up ;) )

Finally! How to play .mkv files smoothly

The following steps proved to be succesful on both our (rather different) PC’s (refer to "Test Systems" paragraph below).

  1. Download the 32 bits or 64 bits edition from http://sourceforge.net/project/showfiles.php?group_id=170561.
  2. Un-pack the .zip file to "C:MPCHC".
  3. Right-click on "mplayerc64.exe" (for the 64 bits version) and copy it as a shortcut to desktop.
  4. Manually configure .mkv files to be associated with "mplayerc64.exe" by right-clicking the video file, selecting "Open with…", browsing to "C:MPCHC", selecting "mplayerc64.exe".
  5. When the movie player opens it first will appear that performance will be the same (sluggish). That is why we close the application. We have to make some adjustments first.
  6. Run the freshly made shortcut on the desktop.
  7. Follow the following screenshots:

picture 2

picture 3 
Windows XP users select VMR 9, Windows Vista Users select EVR Custom Pres. The settings shown worked on the 64 bits system. If (after restarting the program) results aren’t satisfactory, playing a bit with the custom preset settings will result in a better image quality. Nevertheless, High Definition files still will be of HD quality!

After all of these steps, performance in VLC and GOM on these same files will also be the same! Is this due to MPCHC setting global DirectX settings? I wouldn’t know but it results in good things!

Conclusions

picture 1

References

Original research +

  1. Download MPCHC 64-bit edition through the official website at http://sourceforge.net/project/showfiles.php?group_id=170561.
  2. Encountering any problems? Go and check out the official MPCHC homepage at http://mpc-hc.sourceforge.net/index.html.

CSS: Safari/Chrome 1px off compared to Firefox and Internet Explorer

August 21, 2009

Should you encounter the situation where Chrome and Safari are one pixel off compared to Firefox or IE, just try using a “float” instead of an “integer”.

By which I mean (in my case I encountered it with a navigation bar):

/*—-MENU—-*/
#navbar {
    margin-top: -43.5px;
    height: 69px;
    position: relative;
    margin-left: -40px;
}

instead of

/*—-MENU—-*/
#navbar {
    margin-top: -43px;
    height: 69px;
    position: relative;
    margin-left: -40px;
}

Should it not work immediately, try .4 or .7 or whatever instead of .5

This is better than so-called css hacks because it still validates using the W3C service, and Web Developer Toolbar for Firefox.


Software you should check out

July 20, 2009

Only products that are free and bound to improve health and productivity are listed here. “New” as in “new to the general public”. This list is updated every few months.

You might be using You should check out
  1. Adobe Acrobat Reader
  2. Foxit Reader

Digital Editions

  1. WinZip
  2. WinRAR
7-Zip
  1. Adobe Audition
  2. Audacity
  3. CoolEdit
Ubuntu Studio

July, a new start it is.

July 20, 2009

Though short as it might seem, already I have had some – what I call –“false starts” in my life. Songwriting turns out not to be as “easy” as a lot of you aspiring musicians – as myself just nearly a couple of months ago – might think.

What I have learned thus far though, is that “real life” is about priorities. I have also learned that I’m not good at setting those. I’ve got so many things going on (unfortunately in my head only); it’s just not easy to pick the things that are best for me.

But today, I’ve set one. Starting from tomorrow on, I’m not going to touch that guitar before september. I’m going to focus entirely on my studies now. I’m dead serious about that. Then and only THEN we’ll see what happens next.

So apart from maybe another two blogs today, so long for now. Oh, and I’ve cleansed a large part of my blog. You know, refurbished old posts, deleted unverified and unread ones.

G’d*, I’m stuck in IT…


Titanic: Adventure Out of Time: Screenshots

July 20, 2009

Introduction

As I was checking my old software archives, my eyes fell on this game I ordered over the net from a publisher called either Cyberflix, Hammerhead Entertainment or Baracuda-gssm. That was back in 2002. Some promotional screenshots were to be found on the installation disc and as, because of their nature, they are posted below.

Runs on 80486 and Windows 3.1

The publisher’s name unfortunately doesn’t really matter anymore as those companies basically were all the same, and now defunct. I don’t think you can buy this game anymore. At the time it was clearly already out to date, as was their website.

The install CD is so packed with Windows 3.1-era image formats it almost makes one melancholic. I must say I have always wondered why this game didn’t make it big over here. In all fairness, it didn’t have the gameplay of Duke Nukem 3D BUT it had the nicest graphics ever seen in a video game anno 1996.

Although the screenshots below cleary are “marketing-enhanced”, the product looks dazzeling for something that renders on a 486 in only 256 colours.

It wasn’t very fun to play. I purchased the game after seeing these very same on the net. Here I was thinking I could wander freely on a gigantic steamer, but I seemed to be mislead.

Moving and manipulating objects was very, very limited. Pressing one arrow key makes the lead character move as if he was a train on rails. During the whole game the place feels like a desolate ghost ship where, apart from the thirty-or-so characters, only 5 people seemed to be on board.

I guess the developers had to make some sacrifices in order to sport the rather limited hardware. And, after a three-hour play, the music – endlessly on repeat – got to me. But hell, it’s an odd piece of melancholy.

“Alleged” screenshots

1STCLASS

GEORGIA

GRANDST1

GRANDST2

GRANDSTA

ICEBERG1

ICEBERGS

ON_DECK

PARISIA1

PARISIA2

PARISIA3

PARISIAN

SHIPEXT1

SHIPEXTE

SMOKING1

SMOKING2

SMOKINGL 

TURKISH1

TURKISHB

WIRELESS


June: It’s a wrap.

July 4, 2009

Next monday I’ll start working for the company where recently I did an internship for. I have passed this internship gracefully with a 15/20.

They are employing me for another two weeks officially to optimise several computerized jobs… And a lot of other stuff too, I know ‘em.

I’ll do the job (not because I particulary like the place of employment) for the money obviously: I gain about €10 an hour. That’s decent money (10*8*10 = 800). It’ll allow me to save up for a decent electrical guitar because – as does virtually everyone else in the world – I play. And I do drums and sing, too. I urgently need money for decent equipment in order to “make things happen” – Light Edition style of course.

The software I created during the internship seems to be in demand. I got one potential client already. I’m thrilled, after all you can’t have many without one ;) . With that in mind, I’ll take development back up as soon as I (hopefully) graduate near the end of september.

“Will I see you soon in my hotel room for a holiday romance?”


Free Entrance Project

July 4, 2009

FES logo This one is not really meant to be released (any time soon). This “software project” has no value or intention in becoming a “full software product”. There are many reasons for this:

It would enable too many people with questionable morality, it’s not using any efficient algorithms so it wouldn’t be able to compete with similar projects. It’s just a personal research project in the field of both distributed computing and general algorithms.

A quick sneak-peak of the server GUI is to be seen in the image below.

FES

The basic idea behind it is that a dummy FTP server is set up with some kind of account configured. Once started, the Free Entrance Server seeks computers running Free Entrance Client. FES then coordinates the FEC in an “attack” on the dummy FTP server, trying to guess whatever username/password combination grants access to the account configured on the FTP server.

The goal is to see how many systems and connections it takes to guess what combination, should it be possible.


Stuck coding?

January 21, 2009

Insanity is doing the same thing over and over and expecting… different results.

– Benjamin Franklin

So, try this simple “algorithm”:

When stuck on a problem longer than 30 minutes, quit for some time and think using a different approach. Use different logic and variable namings.