Archive for the ‘annoying’ Category

Free way to trim a WMV File

Friday, August 12th, 2011

The other day I wanted a 5 minute segment from a WMV, Windows Media Video, file. To be more precise, the codecs used are WMA2 for audio and WMV3 for video, according to VLC.

My normal tools of choice for taking clips from video are VirtualDub, and Avidemux. Unfortunately, both of these tools failed on the WMV file. Both could preview the input file, but neither was able to create a new video file that worked. I tried both the fast “copy” method, and the full re-compress method. This didn’t surprise me too much, neither application is known to work very well with Microsoft WMV files, and I think I’ve run into this issue in the past. Both work great for AVI, MP4, and various other files that I’ve worked with over the years.

I really wanted this video clip, so I did some searching for some new tools to use.  I found AsfBin, which is free for non-commercial use. It worked like a charm.  The preview window seems a bit quirky for me, but the resulting file works fine, so I’m happy.

 

 

Disappointing Out of Box Experience of Gateway Netbook… in 2011!?

Thursday, January 6th, 2011

Every once in a while I get a reminder of why Apple is able to make 10 times as much money per computer than everyone else.  The end user experience is incomparable. From the moment you walk into an Apple store, through to the point where you use the device, someone has thought about your experience.

I just had the opportunity to setup a brand new (entry level) Gateway netbook.  There’s nothing special about it. It has an Atom processor and Windows 7 Starter edition. After opening the box, plugging it in, and following the on screen prompts, things seemed pretty good.  Then, it required a reboot to finalize the settings.

It took literally 30 minutes from reboot until I was able to login.  Literally.  It felt like 10 times that long.  I wasn’t really watching what it was trying to do, but whatever it is, it is embarrassingly long.  There aren’t any install options, this netbook is exactly the same as the  rest in the pile, so virtually all of this time should have been done before it left the factory.

So, that’s my first impression of that computer, and Gateway. Sitting around and waiting.  And no, this didn’t include the Windows updates that I did later in the evening.  Actually, this reminds me of the time I setup a Gateway laptop for a client – that was a disaster also, IIRC, I had to drive around the neighbourhood trying to find blank CDRs in order to get past the required initial backup – they had included some low end blank CD’s, one or two of them were bad!

First impressions count.

 

PHP PEAR HTML_Template_IT Eats Dollar Signs

Wednesday, December 29th, 2010

Sigh.  We discovered a bug in our recently reworked tools.perceptus.ca (“PWT”) site.

We have a simple, custom, partial MVC system that runs a few of our smaller websites.  That system uses the PEAR HTML_Template_IT package to do the final template rendering. We ported PWT to our MVC to make future site changes much easier.

A week after going live with the changes, we found a baffling bug.  The tools were eating the dollar sign and dollar amounts (but not the decimals) from the input text. E.g. “$103.00” would get returned as “.00”.  Not good.

Apparently, HTML_Template_IT defaults to processing all text with regex.  Not cool.

There might be a historical reason for this, but for new users, this has got to be confusing. Plus, this is NOT mentioned in the intro documentation: http://pear.php.net/manual/en/package.html.html-template-it.intro.php

We’re not the only ones caught by this: http://pear.php.net/bugs/bug.php?id=50.

The fix is to initialize and set the use_preg option, like this:

$tpl = new HTML_Template_IT(‘./’,array(‘use_preg’=>true));

I have glanced at the package pages, and while this behavior is  documented it is buried quite deeply in the documentation.

This also explains a typo we had years ago on a static page that had the text like $5 in it.  That time, we just changed the copy to read 5 dollars and got on with life.

 

A Web Based Adding Machine

Monday, December 13th, 2010

We have Perceptus’ Web Tools at the top of mind lately.  We’ve created another new tool, our minimal web based adding machine.

Have you ever had a half-hazardly formatted list of numbers to add up (maybe from an email?) and you didn’t want to do this:

  • open up Excel (or other spreadsheet program)
  • create a new file
  • paste the values
  • tidy them up so that they are  recognized  as numbers
  • create the SUM() function

Well, we have, and now we have created a tool to save us, and hopefully you, some time.

Visit our new web based adding machine tool and try pasting in a set of numbers like this:

10
-7.8
8 000
(92)
30.1

And be impressed when you get results like this:

Add Running Total
+0 0
+10 10
-7.8 2.2
+8000 8002.2
-92 7910.2
+30.1 7940.3

Impressed?  Did you notice that it handles negative numbers in (brackets) magically?  Or how about that awkward space in “8 000”?  We’re pretty proud of ourselves – even if you’re not impressed.

Comments and feedback is always appreciated!

 

Google Chrome Built-in PDF Viewer Incompatibility with IFRAME and a Workaround

Saturday, December 11th, 2010

With the recent automatic upgrade of Google Chrome to version 8, Google made their built in PDF viewer the default viewer *.  I.e. there is now no need to separately download Adobe Reader or Adobe Flash Player to browse the web with Google Chrome.

Generally, I like this addition to Google Chrome; however, it caused some work for us.  Our web based bingo card generator, print-bingo.com, is highly dependent on PDF’s.  That’s the sole reason why our bingo cards are dead-easy to print out by the hundreds.  Unfortunately, Chrome’s built-in PDF renderer does not display PDFs that are in an IFRAME tag properly.

For the last few days, this is what users of print-bingo.com would see after generating 5 pages of bingo cards on print-bingo.com:

 

Broken PDF rendering in an IFRAME in Google Chrome 8 - screenshot from print-bingo.com

Broken PDF rendering in an IFRAME in Google Chrome 8 - screenshot from print-bingo.com

Chrome tries to scale the parent page to fit everything in… and it fails badly.

We were not able to get things working 100% the way we would like, but we have a workable situation now.

The basic steps that we had to take:

  • Change from IFRAME to OBJECT tag.  For whatever reason, this fixes the zooming issue.  And it was quite simple.  In our case, there wasn’t much difference between the two HTML tags.
  • Unfortunately, we can’t find a way to get Chrome to print the contents of the object tag without printing the rest of the page (though, perhaps using CSS  might work).
  • Instead, we added some bold warning text that gives Chrome users instructions to use the manual download links. We use a little function to identify Chrome users – the two key lines of code are: 
    $u_agent = $_SERVER[‘HTTP_USER_AGENT’]; 
    if(preg_match(‘/Chrome/i’,$u_agent)) { $ub = “Chrome”; }

So, we ended up with a workaround.  We sincerely hope that Google will add the missing interface elements that will make things just work, but until then, we are doing some other site improvements as we prepare to bump up the price of Premium Access to $12 in 2011.

* If you want to go back to using Adobe Reader in Google Chrome, you can turn off the  built-in viewer by going to the special address about:plugins and change Chrome PDF Viewer to Disable.  Of course, website owners should not depend on end-users to do this just to visit your site!