Technology – Trancefussion https://www.trancefussion.com/blog Tell me this is real. Are you ...? Tue, 06 Jul 2010 14:52:39 +0000 en-US hourly 1 https://wordpress.org/?v=6.4.4 Windows Media Player 12 – wmplayer.exe or wmpnetwk.exe 100% CPU – FIX https://www.trancefussion.com/blog/?p=120 https://www.trancefussion.com/blog/?p=120#comments Tue, 06 Jul 2010 14:40:09 +0000 http://www.trancefussion.com/blog/?p=120 I seem to keep running into this problem with every installation of Windows I have, but until recently I figured out exactly what was really happening. First, I’ll give you some background of the issue.

If you’re in an urgency, scroll down to “OMG a Fix!”.

Background

Apparently, WMP12 (and possibly 11, too) is an incredibly stubborn piece of software that *insists* on keeping a Library of all your media, be it pictures, movies, music, anything that it can possibly read. This usually wouldn’t be a problem, as it can keep things organized and centralized in a very annoying and awful nice place, but all that sweet concept ends when it finds media that it cannot recognize, such as corrupted music files, or avi movies encoded by some experimental and very advanced program that only its creator can understand; when this happens, WMP simply goes into brainless mode and stubbornly locks itself trying to read the media, consuming all your CPU for as long as the process is active. Normally, you’d think reading a massive library would take quite some time to do it, except WMP will never succeed, ever (trust me, I’ve left the computer alone for hours to see if it eventually manages to do it).

The best solution for this, would be to check your media files and be sure they’re not corrupted, to be standard compliant, not broken, virus free and other stuff like that, but this is not so simple when you have tons of stuff lying around, specially if you’re someone that works constantly and simultaneously with lots of media.

OMG a FIX!

So, the solution? There seems to be quite a few suggestions. Take this URL for instance, it’s from the Microsoft forums. The tech guys in there suggest disabling a lot of things, or even tell you that your installation is simply badly done so you should reinstall everything. Hell, some even tell you to not have your media on places like Music, Videos and Pictures, but why would we want to do that as a workaround in the first place? Those suggestions are terrible.

My solution, though a workaround still, is a bit less “user friendly”, but it’s a permanent one for as long as your installation stays the same. It involves tweaking a file that seems to be holding the Library data. When this file is locked to not receive data (read-only), WMP stops trying to fill it, and therefor stops to try to index your media. The file in question is called “CurrentDatabase_372.wmdb“, which might be named differently on your system, and is allocated at “C:\Users\[Your Username]\AppData\Local\Microsoft\Media Player” for users on Windows 7 and Windows Vista.

All you gotta do is find it via Windows Explorer, then right click on the file, then choose Properties, and then change the attribute “Read-Only” by marking the checkbox, followed by Apply or OK. I recommend that you either backup the file or delete it and then replace it with a dummy with 0 bytes on it (such as an empty text file by creating a new one in the same directory). Obviously, you should do this when both wmplayer.exe and wmpnetwk.exe are closed. To do this, just goto the Windows Task Manager, then Processes and kill both of them.

The inconvenience? Well, by doing this you’re completely disabling the Media Library for Windows Media Player, and while this may seem like a bad trade-off, for those of us that really do not have a use for it, it’s a completely harmless sacrifice. The Library won’t be able to receive any changes unless you go to that directory and revert the changes so the file is no longer Read-Only.

Also, if this seems like a bad solution for you cause you want to keep your Media Library, you should check the state of your files. The lockout suffered by either of these processes reflects an issue with your media, which doesn’t necessarily mean you’re doing anything explicitly wrong, it’s just that WMP is very tricky when it finds something it doesn’t like. This often happens when you hold mp3s in your Music directory, that were encoded by some of the newest (or perhaps strangest) encoders of late, which again it doesn’t mean they’re bad, it’s just that they may be using instructions that WMP doesn’t recognize.

Anyway, hope you find this solution useful. If you got any questions, feel free to drop a comment.

]]>
https://www.trancefussion.com/blog/?feed=rss2&p=120 8
How to play MKV Files in Windows 7 x64? https://www.trancefussion.com/blog/?p=115 https://www.trancefussion.com/blog/?p=115#respond Fri, 27 Nov 2009 01:55:03 +0000 http://www.trancefussion.com/blog/?p=115 Well, apparently it’s not a simple task … or is it. It can be complicated until you get ahold of the right tools, cause the normal “method” (as in grabbing a single piece of software) that you can just install and make it all work doesn’t seem to exist for Windows 7 yet. If any of you can prove me wrong, please do so.

So, I’ve spent a few hours looking … ok, just one. But I figured this could help others in case you had the same problematic I’m on, as I do not like to download those “codec packs” that add more to your system than you need to. Think about it as eating a Windows 7 burger altogether when all you need is a just a small meal. Ok, that’s bad joke.

Anyway, these instructions are for the 64bit version of Windows 7. I’m not positive this can work on the x86 versions, but I have a good feel it can work on them too. Just be advised I haven’t tested it on a x86 installation, so your results may vary.

So with that said, let’s start!!!!

Things you will need:

– AC3Filter 1.63b FULL for Windows x64 from: http://ac3filter.net/
– Divx Tech Preview for Windows 7 from: http://labs.divx.com/mkvwin7preview

At the moment I wrote this, the latest version for AC3filter was 1.63b, and the tech preview of DivX for Windows 7 was still in beta. I’m sure these will remain at those versions for a while, but, shall that tech preview come out of its testing I hope you won’t need this guide anymore. Make sure you get the FULL version of AC3Filter, as this is the one that contains the files you’ll need for the x64 bit version of Windows 7.

So, anyway. You gotta install the DivX Tech Preview. I preferred to do a custom installation and just installed the MKV Splitter and nothing more, no DivX codecs, no players, etc. Just so nothing unnecessary got installed, as Windows 7 itself has its own codecs for DivX already installed. Just be advised that this little piece of software will want you to install the Google Bar crappy ass shit thing, so if you’re a bit desperate when installing things, do yourself a favour and do not click continue so fast. If you wish to install everything else that’s perfectly fine, but all you’re gonna really need from this is the MKV Splitter which is under DivX Plus DirectShow Filters.

After this, you could even uninstall the DivX Tech Preview, it won’t touch the MKV Splitter. But as it is right now, all you gonna get is Video, no Audio. The reason for this is that you also require the AC3 Filters, and that’s what the other app is for.

So, you install AC3Filter, and make *sure* that you pick the 32bit filters, you may ask why? That’s because the videos are coded in 32bit, hence why they require the 32bit version of the codec. A bit confusing, isn’t it?

After that, you’re done. With AC3Filter you should be able to play and hear your MKV files fine. Hooray! The only caveat to this is the tech preview splitters do not support subtitles … personally I do not know what that means, I have never seen MKV files with subtitles in them (I do not own that many MKV files to know for sure, so whatever).

That should be it. You should now be able to play MKV files on Windows 7, with the advantage of having hardware accelerated decoding that the DivX tech preview drivers provide.

As usual, if you got any questions, comments or noticed anything wrong in my guide, feel free to leave a message.

]]>
https://www.trancefussion.com/blog/?feed=rss2&p=115 0
Pdftk not working on Ubuntu 9.10 – Fix https://www.trancefussion.com/blog/?p=101 https://www.trancefussion.com/blog/?p=101#comments Thu, 05 Nov 2009 01:07:33 +0000 http://www.trancefussion.com/blog/?p=101 NOTE: This patch is no longer required for Ubuntu 10.04, as this problem seems to have been fixed. If you notice any errors, and you’d like to contribute, please leave a comment.

I maintain several websites where this utility is used to produce PDFs. I took the bold decision to upgrade one of my production servers to 9.10, regardless of the risks. Reason being that I rather learn to operate a new operative system, for whenever it happens that a client decides to commit the same mistake bold decisions like me.

So anyway, after the update to 9.10, Pdftk stopped working. I wasn’t really sure what the problem was after looking at the logs, so I googled around for an answer. The error I was getting was this message, whenever I tried to make a PDF with Pdftk:

glyphlist.txt loading error: glyphlist.txt not found as resource. (It must exist as resource in the package com.lowagie.text.pdf.fonts)
Helvetica not found as resource. (The *.afm files must exist as resources in the package com.lowagie.text.pdf.fonts)
Unhandled Java Exception:
ExceptionConverter: com.lowagie.text.DocumentException: Helvetica not found as resource. (The *.afm files must exist as resources in the package com.lowagie.text.pdf.fonts)
at com.lowagie.text.pdf.Type1Font.(itext-2.1.5.jar.so)
at com.lowagie.text.pdf.BaseFont.createFont(itext-2.1.5.jar.so)
at com.lowagie.text.pdf.BaseFont.createFont(itext-2.1.5.jar.so)
at com.lowagie.text.pdf.BaseFont.createFont(itext-2.1.5.jar.so)
at com.lowagie.text.pdf.DocumentFont.doType1TT(itext-2.1.5.jar.so)
at com.lowagie.text.pdf.DocumentFont.(itext-2.1.5.jar.so)
at com.lowagie.text.pdf.AcroFields.decodeGenericDictionary(itext-2.1.5.jar.so)
at com.lowagie.text.pdf.AcroFields.getAppearance(itext-2.1.5.jar.so)
at com.lowagie.text.pdf.AcroFields.setField(itext-2.1.5.jar.so)
at com.lowagie.text.pdf.AcroFields.setField(itext-2.1.5.jar.so)
at com.lowagie.text.pdf.AcroFields.setFields(itext-2.1.5.jar.so)

Basically, what this error is saying is that the itext-2.1.5 library cannot be found, even though it’s already installed. It took me quite a while to understand this exactly, apparently this error is due to a hardcoded line that wasn’t changed in the newer builds, or something to that effect. So the solution is to tell Pdftk where to find it.

I spotted the solution in this URL but the explanation was a bit obscure. The person answering there says we should edit certain files in the patches, the problem is that for common or not so-savvy people (like me) that line wasn’t quite clear enough.

So I went and investigated a bit, until I finally figured it out. Here’s the solution:

IMPORTANT NOTE

Per suggestion of people that have read my post, I’m including the next commands. These steps weren’t necessary for my installation, but some of you might need it.

apt-get install dpkg-dev
This installs the dpkg-source for source-manhandling done in the downloading step

apt-get build-dep pdftk
This ensures all the necessary pre-reqs are installed for the compilation step

Obtain the source from the Ubuntu 9.10 repositories

For this, goto a safe directory where you can work the files, it can be anywhere as long as you remember where it is. Once there, you get the source with this command:

apt-get source pdftk

This will download the source to your current directory and make it available for you to manipulate.

Applying the “fix”

Now you gotta apply the solution mentioned in the other page I mentioned earlier, which is to edit a file called set_classpath and it’s included inside yourworkingdir/pdftk-1.41+dfsg/debian/patches. To do this, use:

nano pdftk-1.41+dfsg/debian/patches/set_classpath

This is if you’re in a terminal. Either use nano or your favourite text editor.

Next, you gotta add the itext library to this file, which would usually look like this:

Description: introduce path to bcprov.jar and bcmail.jar
Author: Johann Felix Soden

--- a/pdftk/pdftk.cc
+++ b/pdftk/pdftk.cc
@@ -2655,6 +2655,10 @@
bool synopsis_b= ( argc== 1 );
int ret_val= 0; // default: no error

+ // set classpath:
+ static char my_classpath[]="CLASSPATH=/usr/share/java/bcprov.jar:/usr/share/java/bcmail.jar";
+ putenv(my_classpath);
+
for( int ii= 1; ii< argc; ++ii ) {
version_b=
(version_b ||

Notice the part where it says CLASSPATH? That’s where we have to add the itext library, by switching the line to look like this:

+ static char my_classpath[]="CLASSPATH=/usr/share/java/bcprov.jar:/usr/share/java/bcmail.jar:/usr/share/java/itext.jar";

Notice the packages are separated by colons “:”. After doing this, you gotta compile it with the next line:

apt-get -b source pdftk

NOTE: Make sure you’re NOT in another directory when using this command, you must be in the same root directory you used to download the source, otherwise you gonna end up with exactly the same faulty pdftk installation.

After the compilation process is complete, you gonna have a file named pdftk_1.41+dfsg-1_i386.deb (depending on your architecture you might have an slightly different one) which we gonna use to install the fixed pdftk package. To do this, use the next command:

dpkg -i pdftk_1.41+dfsg-1_i386.deb

After doing this, pdftk will get installed in its adequate place, and voila! Problem Solved.

If you got any questions feel free to drop a message, I’ll respond as soon as I can. Also, read the comments, a few have contributed with extra steps for other applications, as its the case with Vanguard.

]]>
https://www.trancefussion.com/blog/?feed=rss2&p=101 19