September 21st, 2008 | Tags:

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.

Get the Flash Player to see this content.

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

Social bookmarks

  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • BarraPunto
  • Bitacoras.com
  • RSS
  • StumbleUpon
  • Technorati
  • Tumblr
  • Twitter
  • Yahoo! Bookmarks
  • Live
  • PDF

Posted in Apple / Macintosh, Computers & Tech, Software | 25 Comments »

September 20th, 2008

So you are moving your website or blog to a new domain / url, but what happens to all that people and search engines trying to reach the OLD domain that you are leaving ?

Well, as you maybe noticed, I have moved my blog to a subdomain (yes, now this blog is at http://blog.massanti.com) and i was somehow worried about how to deal with all that people and search engines still going to the OLD url (http://massanti.com), so obviously, one thing came to my mind: “Apache redirects”.

This took me a whole 5 minutes to write, so I’m writing it here just for anybody interested.

Basically, the goal was to redirect anybody going to massanti.com/someblog/post/here to blog.massanti.com/someblog/post/here AS LONG as the file doesn’t exists on massanti.com: i.e: i don’t want massanti.com/somedir/somerealpage.html being redirected to blog.massanti.com/somedir/somerealpage.html.

So what i did was to create a .htaccess file in the root directory of massanti.com with the following contents:

<ifmodule mod_rewrite.c>
   RewriteEngine on
   RewriteCond %{REQUEST_FILENAME} !-f [NC]
   RewriteCond %{REQUEST_FILENAME} !-d [NC]
   RewriteRule ^(.*)$ http://blog.massanti.com/$1 [R=301,L]
</ifmodule>

Let’s analyze this:

  • The ifmodule encapsulation is self explanatory, it basically means “do whatever you find inside me only if the mod_rewrite module is enabled”.
  • The first RewriteCond line takes whatever url parameter we get and checks if a real file exists, while the 2nd line does the same, but for directories.
  • The “[NC]” bit in each of the conditions tells mod_rewrite to ignore casing.
  • The RewriteRule line will only execute IF ANY of the 2 RewriteCond conditions is TRUE (if no real file and no real directory is found in the file system matching the URL request), AND if that happens, it will redirect the client’s browser or search engine to the new page (blog.massanti.com/ + the requested URL) and it will send a 301 permanent redirect header, telling the browser and search engines that the redirection is permanent, hence, causing most search engines, browsers and RSS readers to automatically update all the URL’s to the new ones.

Social bookmarks

  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • BarraPunto
  • Bitacoras.com
  • RSS
  • StumbleUpon
  • Technorati
  • Tumblr
  • Twitter
  • Yahoo! Bookmarks
  • Live
  • PDF

Posted in Web & Design | No Comments »

August 31st, 2008

How can you feel sad for the passing away of somebody that you don’t even know in person, how could you cry like a baby about somebody you only knew on an internet forum and IRC Channels…

Am i weird ? am i sick ?

It was with terrible sadness that i did read the news today, one of our members at insanelymac, just passed away… 17 years old, Cancer.

His name was Anthony Muoio and he was better known in the community under the nickname “PRawker”.

I don’t have words to express what i feel inside myself right now, I’m trying too hard not to cry again, and the sound of the unexplanable is the only thing that i can hear.

I think i will miss you, I think we all will miss you, like somebody else said…

“Goodbye, Prawker, you were taken from us far too soon.”

Social bookmarks

  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • BarraPunto
  • Bitacoras.com
  • RSS
  • StumbleUpon
  • Technorati
  • Tumblr
  • Twitter
  • Yahoo! Bookmarks
  • Live
  • PDF

Posted in General Rants | No Comments »

August 8th, 2008

Hi there visitors, I’m amazed to see the growing numbers on the stats for this site, so, thank you very much to all the people who comes here to read (and comment) about some of my writings, specially the video / audio related ones.

I am also amazed by the fact that i have 762 suscribers to this blog, i NEVER expected to reach that number…. really, so Thank you again.

There are some posts on this blog who happen to have more than 60 comments, and i was thinking about the possibility to add a forum to this site, in order to create a better place to discuss, share and learn about the things we happen to share ( serverside video encoding techniques, audio encoding, etc ).

I am pretty aware that there are already several forums and communities covering those aspects, but they are, imho, too big and they cover way too much topics.

So I’m hearing for opinions, do you think that adding a forum to this site could help to a better discussion and sharing of knowledgements ? Any feedback is welcome :)

Diego.

Social bookmarks

  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • BarraPunto
  • Bitacoras.com
  • RSS
  • StumbleUpon
  • Technorati
  • Tumblr
  • Twitter
  • Yahoo! Bookmarks
  • Live
  • PDF

Posted in General Rants | 2 Comments »

August 5th, 2008 | Tags: , , , ,

It was some days ago when i was contacted by one of the visitors of this blog in order to create a “black box” solution to solve the video encoding part of a video sharing website similar to youtube.com.

As you maybe know, i have posted some months ago a really basic script to automate some of the tasks, but, what about integration with your actual website framework ? what about queue management, what about multi-server encoding environment ?

Those are all the usual questions when a potential customer calls, so i spent some days developing a complete black-box solution for this issue, using all open-source software, with the following features.

  • Fully automatic video encoding queue management.
  • Support for 1 to n encoding nodes with fully automatic transaction control (still in beta-testing).
  • Support for the following video formats: Windows Media, Quicktime, DV, Avid DV, DivX, xVid and almost any imaginable format (any format supported by mplayer is actually 100% supported)
  • Support for HE-AAC audio (Stereo near-CD quality sound at 48kbps).
  • Fully automatic thumbnail generation in 3 different positions of the video stream, supported output formats are JPG, PNG and GIF.
  • Fully automatic metadata injection, including all the popular “iTunes like” tags.
  • Fully automatic iPod Touch / iPhone compatible stream generation.
  • Support for more than 1 output format (managed from a presets file).
  • Fully automatic Pixel and Display aspect ratio correction for proper video resizing and scaling.
  • Possibility to select how many CPU cores to use for the encoding process (only on multicore cpu’s)

There are a several more features that I’m still developing. If you are interested and you want more details, you can contact me at: diego (at sign here) massanti.com. I don’t bite ;)

Social bookmarks

  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • BarraPunto
  • Bitacoras.com
  • RSS
  • StumbleUpon
  • Technorati
  • Tumblr
  • Twitter
  • Yahoo! Bookmarks
  • Live
  • PDF

Posted in Software, Video Encoding, Web & Design | 7 Comments »

April 15th, 2008 | Tags: , ,

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 ;)

Social bookmarks

  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • BarraPunto
  • Bitacoras.com
  • RSS
  • StumbleUpon
  • Technorati
  • Tumblr
  • Twitter
  • Yahoo! Bookmarks
  • Live
  • PDF

Posted in Apple / Macintosh, Computers & Tech, Software | No Comments »

April 13th, 2008 | Tags:

Hi there, just a quick note to let you know that a new version of MediaInfo Mac (0.7.6.30) has been released, not only it includes several bugfixes and improvements in the Cocoa arena, but also a new build of the MediaInfo engine which features the following improvements:

  • AVC: Count of reference frames.
  • AU: Comments.
  • Some global speed improvement.
  • Id3v2: Unsynchronized frames support (v2.3 & v2.4).
  • MKV: handling of files created for streaming.
  • MPEG-4: Handling of corrupted stream size info with some PCM streams.
  • DVD video: Hebrew patch (“iw” code is mapped to Hebrew).
  • MPEG-4: better handling of bitrate mode (VBR or CBR).
  • AVI: MediaInfo reads now the framerate value from the container rather than the stream value.
  • AC3: TrueHD detection.
  • MPEG-TS (or Bluray): VC-1, AC3+ and AC3 TrueHD detection.
  • AVC in MKV: all SEI userdata infos from x264/eavc in Writing library settings.
  • EVO: Better detection of duration.
  • Dirac: raw files parsing.
  • MPEG-TS: Dirac management.
  • MPEG-TS: DVB subtitles/Teletext management.
  • MPEG-4 Visual (DivX/XviD): writing library name was missing.
  • MPEG-Video: some DTS files with wrong extension were detected as MPEG-Video.
  • SWF: Compressed SWF files support is back.

If you are an actual user, just launch the application and use the auto update feature, or you can get the latest version by visiting the official MediaInfo Mac website.

As usual, feel free to leave any comment or suggestion in here.

Enjoy :)

Social bookmarks

  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • BarraPunto
  • Bitacoras.com
  • RSS
  • StumbleUpon
  • Technorati
  • Tumblr
  • Twitter
  • Yahoo! Bookmarks
  • Live
  • PDF

Posted in Apple / Macintosh, Software | 4 Comments »

April 12th, 2008 | Tags: , ,

After a lot of work I’m happy to say that Sticked is ready!

Sticked is a WordPress theme that i had in mind since too many time ago, and now, i am sharing it with you all :).

Features

  • Customizable background and body textures. [Click here to see screenshot]
    You can select from a bunch of available textures for both your page background and your main body background, you can even create your own if you feel like.
  • Customizable colors for “Stickies”. [Click here to see screenshot]
    Sticked will add a new setting in your admin UI, there you can select an specific color for each post.
  • Compatible with most modern (and not so modern) browsers.
    Sticked has been tested with the following browsers: 

    • Internet Explorer 6: 80% – (Some minor image glitches due to the lack of support for PNG transparent images in this browser).
    • Internet Explorer 7 & Internet Explorer 8: 100%.
    • Safari for Mac and Windows: 100%.
    • Opera 9 for Mac and Windows: 100%.
    • Firefox for Mac and Windows: 100%.
  • Styled blockquotes:
    By using the <blockquote> tag, you can create specific boxes to highlight parts of your content, examples below: 

    This text is enclosed between <blockquote></blockquote> html tags.

    This text is enclosed between <blockquote class=”mac”></blockquote> html tags.

    This text is enclosed between <blockquote class=”warning”></blockquote> html tags.

  • Proportional fonts:
    Sticked uses proportional fonts, that means that the text size will be readable and consistent at any resolution, including big LCD screens.
  • Widgets Ready:
    Sticked is compatible with most WordPress sidebar widgets out there.

Theme Downloads and Tools

CLICK HERE to download the latest version (0.6) of Sticked for WordPress 2.5

CLICK HERE to download a PSD (Photoshop) file containing a blank header.

Installation is like with any other WordPress Theme, just upload the contents of the zip file inside your wp-content/themes/ directory and you are done.

If you have any question or suggestion, feel free to leave a comment here.

Social bookmarks

  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • BarraPunto
  • Bitacoras.com
  • RSS
  • StumbleUpon
  • Technorati
  • Tumblr
  • Twitter
  • Yahoo! Bookmarks
  • Live
  • PDF

Posted in Web & Design | 3 Comments »

April 8th, 2008 | Tags:

Well, it looks like I got tagged. Here are the rules: 

  • Each player starts with eight random facts/habits about themselves.
  • People who are tagged need to write a post on their own blog (about their eight things) and post these rules.
  • At the end of your blog, you need to choose eight people to get tagged and list their names.
  • I like absurd humor movies, specially old ones like The Pink Panther series, almost anything from Peter Sellers, stupid things like “The Naked Gun“, etc. I also enjoy quality love / history stories like “Cinema Paradiso” or “Somebody like You”.
  • I enjoy sharing my skills with different people, and also learning from them, that makes me discover new things almost daily and meet new cool people all around the world.
  • I **AM** an addict to technology, specially computers and synthesizers.
  • I believe that the whole internet era changed the meaning of the word “Friend”, I truly believe that you can feel “friendship” for people that you don’t know in real life, that usually put me in terrible discussions with other people who seems to believe the contrary.
  • I am a person who likes good Wines and quality Food, i like to cook my own food and usually i like to invite friends to enjoy whatever i prepare.
  • Unless I am in a relationship with some girl, I´m usually a lonely person, maybe because I am more of a creative person, and creativity usually comes when you are relaxed and alone.
  • I do believe in love more than anything else, thats a fact.
  • I enjoy helping others as much as i can, I believe that it is a good way to feel realized about yourself.

After all this rant about myself, I’m tagging the following people:

Zach & Timothy, sadly, most of my friends don’t have blogs, so that’s all :p

Social bookmarks

  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • BarraPunto
  • Bitacoras.com
  • RSS
  • StumbleUpon
  • Technorati
  • Tumblr
  • Twitter
  • Yahoo! Bookmarks
  • Live
  • PDF

Posted in General Rants | No Comments »

April 6th, 2008 | Tags: ,

Hi there, as you maybe noticed, I did a complete redesign of this blog and I am using for the first time a custom WordPress Theme that i have created from scratch.

This is my first ever WordPress Theme so i hope you like it :)

The idea for Stck’d was to create a theme with some smooth visual elements while maintaining an easy to the eyes structure and focusing on the contents, instead of graphics.

It is on my plans to release this theme for free as soon as i finish fixing bugs, etc, so if you like it or you have any comment / suggestion, feel free to leave a comment in here, any feedback is appreciated.

April 7, some updates:

Per-post color selection:

It is now possible to select the post-it color on a per post basis, just add a custom field called “color” to your post, and it will automagically change the paper color for said item. Available colors are:

  • Cyan.
  • Green.
  • Pink.
  • Yellow.
  • Magenta.

Adding a custom color field for a post.

Stck’d is now compatible with the following browsers:

// Diego.

Social bookmarks

  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • BarraPunto
  • Bitacoras.com
  • RSS
  • StumbleUpon
  • Technorati
  • Tumblr
  • Twitter
  • Yahoo! Bookmarks
  • Live
  • PDF

Posted in Web & Design | 5 Comments »