Archive for the ‘Computers & Tech’ Category

The all new 52″ Apple Cinema Display.

Sunday, December 13th, 2009

No words….

The new 52" HD Apple Cinema Display

The new 52" HD Apple Cinema Display

Updated HE-AAC (aacPlus) reference encoder for Mac OS X

Monday, December 7th, 2009

This is an updated build of the 3GPP group AAC Plus (or HE-AAC) reference audio encoder for Mac OS X 10.5 “Leopard” or newer.

You can get the binary build (3 way universal binary with PowerPC, i386 and x86_64 architectures) here:

enhAacPlusEnc for Mac OS X Leopard, Binary build with 3 architectures.

Xcode project (3.2 or newer) can be downloaded here:

enhAacPlusEnc Xcode project (3.2 or newer)

For more info visit the original post here.

Samsung 206NW ColorSync Color Profile for Mac OS X

Monday, December 7th, 2009

Im just tired of having to recalibrate my LCD every time i re-install Mac OS X or just reset my user account, so im just saving here for my own use, a ColorSync profile for my Samsung 206NW displays.

If you happen to use a Samsung NW series LCD display with a Mac, feel free to give this profile a test. It is calibrated with Photo / Video editing in mind, that being said, the color temperature (white point) is “warmish”.

Cheers.

Instructions: Just unzip and move the .icc file inside /Library/ColorSync/Profiles/Displays/

Open display preferences and select the new color profile.

Download Below:

SyncMaster 206NW Mac OS X ICC ColorSync Profile

Download Thingy, a free Download Manager for the Mac

Saturday, September 19th, 2009

Download ThingyIm working in a new piece of software called “Download Thingy” (at least for now).

It is basically a Download Manager for Mac OS X. The main reasons why I am doing this are simple: There seems to be not a single Download Manager for the Mac that complies with the following:

  • It is Free.
  • It doesn’t have a lot of features that i will NEVER use.
  • Comes with a simple UI putting the main focus on the Downloads and not on other stuff I don’t care.
  • Allows segmented / multi threaded downloads.
  • Allows limiting the download speed in a “per download” or “overall” basis.

For this project I’m using the amazing libCurl library as the download engine backend.

Anybody who is interested to participate in a private alpha testing of this (yet prototype) app feel free to comment on this post and i will get back to you when an alpha version is ready for testing.

Cheers, Diego.

The digital certificate breakage

Saturday, September 5th, 2009

So um… some weeks ago I released a new version of MediaInfo Mac with several fixes on my own code, with also a newer build of the MediaInfo Lib by Jerome Martinez, and, finally, a newer version of Sparkle (the amazing framework that i use for the automated software updates).
To make a really long story very short, Sparkle changed an important behavior: Now each and every update that I release has to be signed with a digital certificate, which is nothing but good, because it gives an extra layer of security for the final users.
Bad news are that I totally missed that part in Sparkle’s release docs, so I released an update without the certificate, and from there on, users were stuck on that version without the possibility to update.
I still had the ability to show to the users a nice dialog informing them about my error and kindly asking to update manually, but even that, i still can see that a LOT of people is still using the broken version (0.7.7.58), which leads me to the following conclusion:
Most people will NOT upgrade their software unless the process is totally automatic and painless, not even users of MediaInfo which are usually over the “Average Joe”.

This can be seen on the usage statistics that i keep (which I did reset some hours ago btw, due to some preparations for the upcoming MediaInspector beta) where you can see that there are still a LOT of users stuck on 0.7.7.58.
So to sum things up:

  • If you are using Mac OS X 10.4 “Tiger”, the latest version that you can use is 0.7.17.3, get it here.
  • If you are on Mac OS X 10.5 “Leopard” or newer, just get the latest version here.

Cheers!.

Diego.

Why the new tabs in Safari 4 are a shame…

Wednesday, February 25th, 2009

So yesterday I downloaded the new Safari 4 beta release from Apple… and yes, it is faster, the new “top sites” feature is kinda “cool”, but I happen to see way too much “Chrome like” UI features here, specially, the new tabs design. Apple clearly wanted to imitate the tabs in Chrome, but they did it wrong, because, if you have 3 opened tabs and you want to reach the 3rd one, the distance between Tab 1 and Tab 3 is more than 2/3 of your screen (or more than 1000 pixels in most standard screens).

Die hard apple fanboys have told me things like “It’s just a matter of getting used to them” or “You have to use keyboard shortcuts to switch tabs”.

Well, let me tell you that i see no reason why i should “get used” to something that I don’t like at all, and let me also tell you that when I’m browsing the web, i usually DON’T use the keyboard at all which is why I’m blaming at the new tabs. Of course, thanks god you can switch back to the old tabs scheme, but right now, the preference is hidden, so i really hope that apple adds this as a standard preference for the final release.

Anyway, a video is better than a thousand words.

Last minute note…. while editing this post, i found that Safari 4 breaks the Rich Text Editor in WordPress, but since it is yet a beta, i guess it’s ok.

[flashvideo file=”/wp-content/uploads/2009/02/safari-4.mov” /]

I have bought an EasyCAP

Tuesday, October 21st, 2008

So i have a lot of family videos on several analog media (VHS-C, Super VHS, Hi-8 and 8mm) that i want to finally convert to something not so vulnerable to aging, DVD being an option but Blu-Ray saying “me! me!” on my head.

Even the fact that I have several workstations with professional level video capture devices, those machines are usually working doing renders or any other thing and is not that I can waste days capturing all that media there, so i decided to buy one of those EasyCap devices on eBay and give it a try.

The specifications are pretty outstanding for what it is, and specially, for the $15 price… AND it is compatible with Mac OS (by using the non-free VideoGlide app) which makes it even better.

Just some highlights:

  • Complies with Universal Serial Bus Specification Rev 2.0
  • Supports NTSC, PAL (B), Video format
  • Video input: RCA composite or S-Video
  • Audio input: Stereo audio (RCA)
  • Dimension(Main Body): 8.8cm x 2.8cm x 1.8cm typical credit card size is 8.5cmx5.4cm)
  • Powers by USB 
  • Supports high quality video resolution for 
  • NTSC: 720 x 480 @30fps
  • PAL: 720 x 576 @25fps

Im still waiting for it to arrive, and i will post several video examples and personal impressions as soon as i get it.

MKMP4: An automated H264 / HE-AAC (aacPlus) encoder script for Mac and Linux / Unix

Friday, September 26th, 2008

I have been nothing but amazed about the feedback that i got on my prior tutorials on how to automate the whole chain of free and open source tools to create amazing quality video at really low bitrates (great for flash streaming, etcetera).

I usually write such tools and scripts for myself or for clients, but due to the fact that it seems a lot of people is interested in the process, I’m releasing here the new version of my encoding tools for the Mac and any Linux / Unix variant.

Needed tools and applications

For all this to work, you will need the following things

Extra pre-requisites for Mac OS X

Mac OS X users need to install the Apple Developer Tools (aka XCode) in order to compile software, also, for building the x264 encoder, you will need to get and install YASM.

Now, you have to build and install all the tools, AND they have to be on any directory in your executable path. My scripts assume that all the tools are in your executable path.
(more…)

MediaInfo Mac 0.7.7.58, revisited.

Sunday, September 21st, 2008

As you maybe know, time is a commodity these days, but i took some hours to fix some bugs and update several things in MediaInfo Mac.
Most of the fixes are related to the usability aspect of this little tool, as in, improved open and save dialogs, etc, but there is also some speed improvement in the parsing routines, and, the application is 64bit ready now (for capable hardware).
For the late comers, MediaInfo Mac is a Macintosh version of an amazing tool (called MediaInfo) created by Jerome Martinez, you can find more info about his incredible work by going here.

If you want to download MediaInfo Mac, you can visit the official site by going here… or, if you are lazy, you can just grab the latest version by clicking here.

Below is a little video demo of what the application can do and what kind of detailed information you should expect when processing video / audio files.

[flashvideo filename=/wp-content/uploads/2008/09/mediainfo_demo.mp4 /]

As usual, questions, comments and suggestions are welcome :)

Keeping track of your users hardware / Software with Sparkle and PHP.

Tuesday, April 15th, 2008

Some months ago I started using the amazing Sparkle framework to manage the auto-update features on my MediaInfo Mac application, and it wasn’t until today that I decided to update my Sparkle version to the latest one from the SVN and give it a try, mostly because I’m planning to release upcoming MediaInfo Mac builds as 32 and 64bit Universal Binaries, but that’s a different story.

I have found that with the new Sparkle version, you can kindly ask the user if he/she wants to send anonymous information about the system they are using to run your application, like the MacOS version, amount of RAM, number of processors, language, etc. This is specially useful for many reasons (at least for me), first, I’m starting the process of localizing my application, so that gives me a pretty good idea of what languages are the most used so far, and, finally, it will let me now when I could stop caring about Tiger and start a Leopard only version of my Software.

The idea is pretty simple, you have a PHP script that generates the whole AppCast compatible feed, and all the hardware / software information is passed as url parameters, as in feed.php?osVersion=10.2.5&lang=en … etc.

So, by using good old Google, i found a really good script to generate the AppCast feed, but, i also needed a way to store the tracking data into a DB for later usage, and, i came up with this (really barebones, but working) prototype.

So, i did some minor modifications to the original PHP code; first, i changed the way to parse the version number from the file names, so as long as you use the application_name_1.5.zip pattern it will work, please note that you can put as much revision or subversion numbers as you wish: application_name_1.2.3.4.5.zip should also work.

This is the code snippet as i have it working now on my development server:

<?php
// ----------------------------------------------------------- //
// Script to generate an RSS appcast from folder contents
// Version 1.0.1
//
// (cc) Random Sequence 2007, Some Rights Reserved
//
// Licenced under a creative commons Attribution ShareAlike licence
// http://creativecommons.org/licenses/by-sa/3.0/
// ----------------------------------------------------------- //
// REQUIRES PHP 5 or greater
// Tested with APACHE 1 & 2 on Mac OS X, Debian Linux   

// -------------------- BEGIN CONFIG ------------------------- //

$title = "Downloads";           // Used as feed title in feed readers
$description = "File List";     // Used as feed description in feed readers

// these are the types of files to list in the appcast & their MIME Types. Use lower case.
$fileTypes = array( "zip"=>"application/zip",
                    "tgz"=>"application/x-gtar",
                    "tar"=>"application/x-tar",
                    "dmg"=>"application/octet-stream"
                    );

// -------------------- END OF CONFIG ------------------------ //

$appcastHeader = "<?xml version=\"1.0\" encoding=\"utf-8\"?>
<rss version=\"2.0\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:sparkle=\"http://www.andymatuschak.org/xml-namespaces/sparkle\">
<channel>
    <title>MediaInfo Mac Software Updates Feed</title>
    <link>http://massanti.com/mediainfo</link>
    <description>AppCast compatible feed for MediaInfo Mac Updates</description>
    <language>en</language>
";
$appcastTemplate = "
        <item>
            <guid  isPermaLink=\"false\">*guid*</guid>
            <title>*title*</title>
            <description><![CDATA[*description*]]></description>
            <pubDate>*pubdate*</pubDate>
            <enclosure
                sparkle:version=\"*version*\"
                type=\"*type*\"
                url=\"*url*\"
                length=\"*length*\" />
        </item>";

$appcastFooter = "
</channel>
</rss>";
$dir = getcwd()."/releases";
$files = scandir("$dir");
$etag = sha1(implode("/",$files));
rsort($files);

// support for conditional fetch
if (isset($_SERVER['HTTP_IF_NONE_MATCH']) && $_SERVER['HTTP_IF_NONE_MATCH'] == $etag) {
    header('HTTP/1.1 304 Not Modified');
    exit;
}

$appcast = $appcastHeader;

$link = "http://".$_SERVER["HTTP_HOST"].$_SERVER["PHP_SELF"];

$appcast = str_replace("*link*",$link,$appcast);
$appcast = str_replace("*title*",$title,$appcast);
$appcast = str_replace("*description*",$description,$appcast);

foreach ($files as $file) {
	preg_match("/.*\.([a-z09]{1,3})$/i",$file,$matches);
	if (isset($matches[1]) && isset($fileTypes[strtolower($matches[1])]) !== false) {
		$appcastFile = $appcastTemplate;
		$folderUrl = "http://".$_SERVER["HTTP_HOST"].substr($_SERVER["PHP_SELF"],0,strrpos($_SERVER["PHP_SELF"],"/"))."/releases/";
		$guid = $folderUrl.sha1($file);
		$path_parts = pathinfo($file);
		$title = mb_convert_case( str_replace("_", " ", $path_parts['filename']) , MB_CASE_TITLE, "UTF-8");
		//$description = preg_replace("/^(.*?)([0-9]+[a-z])\.([a-z09]{1,3})$/i","$1",$file);
		$description = getFileDescription("releases/".$file.".html");
		$pubdate = date("D, d M Y H:i:s",filectime("releases/".$file));
		$type = $fileTypes[strtolower($matches[1])];
		$url = $folderUrl.$file;
		$length = filesize("releases/".$file);  
		preg_match("/(\d+\.)+\d+/", $file, $m_version);
		$version = $m_version[0];
		//$version = preg_replace("/^(.*?)([0-9]+[a-z])\.([a-z09]{1,3})$/i","$2",$file);
		$appcastFile = str_replace("*guid*",$guid,$appcastFile);
		$appcastFile = str_replace("*title*",$title,$appcastFile);
		$appcastFile = str_replace("*description*",$description,$appcastFile);
		$appcastFile = str_replace("*version*",$version,$appcastFile);
		$appcastFile = str_replace("*pubdate*",$pubdate,$appcastFile);
		$appcastFile = str_replace("*type*",$type,$appcastFile);
		$appcastFile = str_replace("*url*",$url,$appcastFile);
		$appcastFile = str_replace("*length*",$length,$appcastFile);                                    
		$appcast .= $appcastFile;
	}
}

// Reads a file called filename.html and returns the HTML output

function getFileDescription($fileName) {
	$handle = @fopen("$fileName", "r");
	$rValue = "";
	if ($handle) {
		while (!feof($handle)) {
			$buffer = fgets($handle, 4096);
			$rValue .= $buffer;
		}
		fclose($handle);
	}
	return $rValue;
}

$appcast .= $appcastFooter;
/*"GET /u.php?UUID=F2958FD0-2EC9-40CA-8171-C63D663AAE90&
		osVersion=10.5.4
		cputype=7
		cpu64bit=1
		cpusubtype=4
		model=P5KC
		ncpu=4
		lang=en
		appName=MediaInfo%20Mac&appVersion=0.7.7.50
		cpuFreqMHz=2400
		ramMB=2048 HTTP/1.1" 200 575 "-" "MediaInfo Mac/0.7.7.50 Sparkle/282"
		*/
// Database Functions

$vars = array('osVersion' , 'cputype', 'cpu64bit', 'cpusubtype', 'model', 'ncpu', 'lang', 'appName', 'appVersion', 'cpuFreqMHz', 'ramMB', 'UUID');
$values = array();
$shouldInsert = true;
foreach ($vars as $item) {
	if (isset($_GET[$item])) {
		$values[$item] = html_entity_decode($_GET[$item]);
	} else {
		if ($item != 'cpu64bit') {
			$shouldInsert = false;
		}

	}
}
if (isset($_GET['cpu64bit'])) {
	$values['cpu64bit'] = html_entity_decode($_GET['cpu64bit']);
} else {
	$values['cpu64bit'] = '0';
}

if ($shouldInsert == true) {
	$mysqli = new mysqli("yourDBHost", "yourDBUser", "yourDBPassword", "yourDBName");

	if (mysqli_connect_errno()) {
	    printf("Connect failed: %s\n", mysqli_connect_error());
	    exit();
	}

	$stmt = $mysqli->prepare("INSERT INTO stats (os_version, cpu_type, cpu_64bit, cpu_subtype, model, n_cpu, lang, app_name, app_version, cpu_freq, ram_mb, UUID) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
	$stmt->bind_param('siississsiis', $values['osVersion'], $values['cputype'], $values['cpu64bit'], $values['cpusubtype'], $values['model'], $values['ncpu'], $values['lang'], $values['appName'], $values['appVersion'], $values['cpuFreqMHz'], $values['ramMB'], $values['UUID']);
	$stmt->execute();
	$stmt->close();

}

header("Content-type: application/xml; charset=UTF-8");
header("ETag: $etag");

echo $appcast;
exit;
?>

As usual, suggestions or improvements are welcome ;)