Posts Tagged ‘mac’

Quirky error in Google Chrome for Mac (Beta)

Wednesday, December 9th, 2009

While testing some of my own JavaScript code in the new beta build of Chrome for Mac, i was presented with this error:

Chrome for Mac error

Chrome for Mac error

Download Thingy, it slowly starts to make sense.

Tuesday, September 22nd, 2009

I have been working for the past days in the foundation for a new Download Manager that I’m writing for the Mac platform, and this is just an “status quo” about how things are evolving.

What is done so far.

  • A certainly modern multi-threaded Cocoa Framework implementation around libCurl‘s C API, which allows me to get my hands on the whole power of Curl, but without leaving the beauty of Objective-C and the Cocoa API’s at any moment.
  • A pretty basic prorotype kind of UI which allows simple segmented download of files for the time being.

    Download Thingy, the prototype UI

    Download Thingy, the prototype UI

  • A custom (and open, XML, standards based) file format baptized (you guessed) “.thingy” which takes care of storing partial download segments, some basic (for now) binary and redundancy checking, and of course, the ability to reconstruct itself into the original file.

    A standard .thingy container.

    A standard .thingy container.

  • Main Launch Services integartion is partially done too.
  • Some basic implementation of automatic mirror discovering.

What needs to be done.

  • I have to write the foundation for a proper queue management system.
  • Network Usage / Bandwidth Limiting logics are in the “to do” list too.
  • A proper User Interface.
  • A public alpha version with basic usability that people can start to use and report so i can accelerate the development based on actual user’s requests.
  • A Safari / WebKit plugin.

So far, this is looking pretty nice and i think it will become a pretty interesting utility for the Mac community.

Automatic build numbering increase with xCode

Sunday, September 20th, 2009

I had this problem some days ago where i wanted to automatically increase the build number of my Application in xCode, every time that i actually made a new build. xCode comes with a tool called agvtool which is supposed to fill this gap, but the main problem with this is that it needs the project to be actually closed, for some reason that i certainly ignore.

After some searches, i finished at this interesting post by Chris Hanson, but this was not exactly what i wanted to do, again, i wanted a simple approach to increase the build number with every build.

So this is what i did.

First I created a new configuration settings file in xCode, as shown below.

Creating a new Configuration Settings File in xCode

Creating a new Configuration Settings File in xCode

After this, i ended up with an empty configuration file, so i added the following inside it:

CURRENT_PROJECT_VERSION = 1

xCode uses this variable to store your application’s build number, so we are going to tell it to use this file in order to get the value for the CURRENT_PROJECT_VERSION variable.

Go to your target’s properties, be sure to select All configurations and All Settings, then base your target’s config in your newly created version.xcconfig file, and set the version variable to our new version variable as shown below:

Configuring the Target to use the new variable in the version.xcconfig file.

Configuring the Target to use the new variable in the version.xcconfig file.

After all this is done, all you have to do is create a new “Run Script” build phase, and place the following inside it:

NEW_VERSION=`cat "$SRCROOT/version.xcconfig" | awk '/CURRENT_PROJECT_VERSION/ { print $3 + 1 }'`
sed -i '' "s/CURRENT_PROJECT_VERSION = .*/CURRENT_PROJECT_VERSION = $NEW_VERSION/" "$SRCROOT/version.xcconfig"
CURRENT_PROJECT_VERSION=$NEW_VERSION
touch "$SRCROOT/version.xcconfig"

Obviously, if you changed the file or variable names, you will have to adapt the script as needed.
Now, every time you build the app, the build number is automatically increased by one, and included in your application’s plist file as shown below:

Build number being shown in the built app.

Build number being shown in the built app.

A whole thanks goes to the guys at #macdev on freenode Diabolik and KonaBlend who helped with the bash scripting!

Encoding high quality h.264 / aacPlus v2 media for web streaming with Flash 9, version 2.

Tuesday, January 1st, 2008

Update Notice

This post has been updated with a newer and improved script and instructions, please visit the new one HERE.

It was some months ago when I wrote a tutorial about how to encode good quality h.264 video with aacPlus audio in order to use the great capabilities of the new flash player version 9.0.115 (that in case you missed it, now can play h264 video and aacPlus v2 audio).
Due to some personal convictions for my prior tutorial, i decided to use FFMPEG, and while it does the job pretty well, it has some limitations (specially in the video scaling / resizing area). So in my particular case, I had to use several php / bash scripts in order to feed the encoders with the proper resizing data, etcetera.
Well, let me introduce you to the 2nd version of my h.264 / aacPlus v2 tutorial.

This time I used Mencoder, an amazing tool that comes with the mPlayer package, and i also created what i think is a really nice bash script to make the process almost 100% smooth and simple.

These are the things you will need:

(more…)

HE-AAC Plus encoder for Mac (Universal Binary)

Sunday, September 30th, 2007

This post is outdated, for a more up to date version of both the binary encoder and the sources, please visit this new post.

I needed a native solution to encode HE-AAC Plus audio on a Mac, but there is not any native solution so far right now, so i compiled the reference encoder (enhAacPlusEnc) published by the 3GPP group.
I also created an xCode project to make it easy to manage future builds.
This is an “Universal Binary” build, meaning that it will work on both, Intel based and PowerPC based Macs.

You can download the universal binary encoder by clicking here, and you can download the xcode project by clicking here.

Keep in mind that i had to make some minor modifications in order to make it compile as Universal Binary, so you wil find some minor diferences when comparing with the original source code released by the 3GPP group.

If you have any question, leave a comment here.

Creating good quality h264 video for the upcoming Flash Player and Flash Media Server

Friday, September 28th, 2007

Important

This tutorial has been updated (and improved) a lot, for the new version please follow this link.

UPDATE: I realized that when i read a tutorial about anything, in most cases, i want to first see what result im going to get so then i can decide if the tutorial is worth reading (or not), so here is a head by head comparison: 

This is an h264 file encoded by the guys at apple.com, it’s the TV Commercial for the brand new iMac: ORIGINAL VIDEO

This is the same file re-encoded using the steps on this tutorial: RE-ENCODED VIDEO

Obviouisly, there is an small quality degradation, but keep in mind that apple’s original movie is 14MB in size, while mine is 1.5MB ;).
You can play my MP4 video with almost any video player out there, but remember that not all video players out there support HE-AAC audio (or aacPlus) and b-frames, so if you play the file with a player like QuickTime, it is NOT going to work.
I recommend mPlayer or VLC media player to play this kind of video, and obviously, Flash Player will play the file perfectly too.

Update for Macintosh users:

I updated the bash script on this post so it can be used also by Macintosh users, so instead of using the NERO Digital AAC Encoder, Macintosh users can take advantage of the native 3GPP AAC Plus V2 encoder that i just compiled. Visit this post for more information about it.

Like a lot of people out there, i was really happy when i found the press release from Adobe, stating the addition of h.264 video support and HE-AAC Plus audio to their upcoming Flash Player versions, and also, to the upcoming Flash Media Server.
After following several “Tutorials” all over the web, i found that there was not any single one that gave me the results that i wanted; that is, good video quality, with the less possible file size, so after a lot of trial and error and after a lot of help and optimizations by the guys at the ffmpeg and x264 IRC channels, i decided to create this tutorial that will most probably help you a lot to encode good quality h264 video, with HE-AAC Plus Audio, and all this inside an MP4 container with tags and all ready to deliver to your visitors.

There are several things that you will need in order to do this:

Some friendly bookmarks:
SVN checkout for x264:
svn checkout svn://svn.videolan.org/vlc/trunk vlc-trunk
SVN checkout for ffmpeg:
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg

First of all, I’m assuming that you are running Linux, Mac-OS X or any other UNIX variant. I never tried this on windows because I am pretty sure that there are lot of really nice programs that you could buy to do the job.
(more…)

CSSEdit 2.5, a visual CSS Editor that doesn’t suck.

Thursday, September 27th, 2007

CSSEdit 2.5 screenshotOh my God, some weeks ago I bought a license for this amazing piece of software made by the guys at macrabbit.com. This is not just another CSS Editor, this is **THE** CSS Editor.
Not only you can edit each and every aspect of the css code in a visual manner, but also, every change that you do is reflected in the display window in real time! Yay!
One of the features that i really love about this software is the “X-Ray” function, where you basically click on the different elements of the webpage you are working on, and it tells you all the CSS classes that are affecting it, you also see the full inheritance tree and you can, obviously create new CSS Classes with full inheritance control thanks to the “inspector” window.
(more…)