Synology DSM3.2 and older rsync implementations….

datePosted on 15:38, January 25th, 2012 by Many Ayromlou

Got my hands on a new Synology 1511+ a few days ago and discovered something odd. Where as before on the QNAP TS-409 Pro I could easily turn on the rsync server and start syncing files/folders off my OSX machine, the process did not work with the new Synology NAS running DSM3.2. I kept getting the error “@ERROR: auth failed on module NetBackup”. It turns out DSM3.2 is now using encrypted passwords for the root/admin account and this encryption breaks the older rsync version on the mac. The easiest way I found to fix this — and YES I realize that this “potentially” reveals the root/admin password if your NAS is wide open to the world, mine is at home behind a NAT and I made sure the rsync password is different from my admin password — is to edit the /etc/rsyncd.secrets file (back it up first by copying it to rsyncd.secrets.old or something). Delete everything after “root:” and instead of it, put — in clear text — the password you want to use for rsync purposes (which can be the same as your admin password). Save the file and try rsyncing again. It should work now.

Share

Stream your Windows desktop using ffmpeg

datePosted on 10:26, November 3rd, 2011 by Many Ayromlou

I’ve already covered how to do this with vlc a while back in parts 1 followed by part 2. I just found out that something very similar in results can be done with ffmpeg. ffmpeg has recently added support for directshow filters which now allows one to capture the screen and stream and/or save it. Here is how you can do this:

1.) Grab a copy of the Screen Capture DirectShow source filter from Unreal Streaming Technologies. It’s about half way down that page. They have both the UScreenCapture X86 Edition and the X64 Edition (depending on your OS installation). I used the 64 bit filter on a Windows 7 64 bit installation.

2.) Install the filter and make sure you make the following changes to your windows registry using regedit. The default frame rate for UScreenCapture filter is 10 f/s and we need to boost this to 30 frames/sec. You need to find the key HKLM\SOFTWARE\UNREAL\Live\UScreenCapture and insert a DWORD value of 30 for FrameRate (You have to create FrameRate, it does not exist by default). Once you’ve done the registry tweak, reboot.

3.) Install the latest greatest version of ffmpeg for your windows version from Zeranoe. I grabbed the 64 bit Static build since I didn’t want to deal with libraries and such. Extract it and stick it somewhere on your hard drive. Remember the path to this folder since we will need it later.

4.) Open a command line window and cd to the directory where you extracted ffmpeg into, find the bin directory and cd into it. This is were the ffmpeg executable resides. In my case (I extracted the ffmpeg files into “Program Files” directory) it is C:\Program Files\ffmpeg-git-059707e-win64-static\bin.

5.) If you’ve made it this far, hand in there, we’re almost home. Now you need to issue the command that gets the screen streaming going. But first we need to find out the name of the Screen filter device. So issue the following command:

ffmpeg -list_devices true -f dshow -i dummy

In the output look for a device called “UScreenCapture“. Hopefully if everything is working with the directshow filter you have a entry in the list. That’s the name of our device that we need to pass onto ffmpeg. While you’re there also look for your audio device entry as well. Mine was the truncated word “Stereo Mix (Realtek High Defini” (Yes mine was missing the end of that line). Jot that down somewhere as well. I will show you how to get audio going as well.

6.) So first step is to get video going. Assuming you have a “UScreenCapture” device (You could use another directshow filter if you like, this will work with most of them. I just used the Unreal filter for the heck of it), here is the command to start encoding and sending video:

ffmpeg -f dshow  -i video="UScreenCapture"  -r 30 -vcodec mpeg4 -q 12 -f mpegts udp://aaa.bbb.ccc.ddd:6666?pkt_size=188?buffer_size=65535
  • -f dshow specifies that you’re going to be using a directshow device as your input.
  • -i video=”UScreenCapture” is the name of the input directshow device which we picked up in step 5.
  • -r 30 is the frame rate.
  • -vcodec mpeg4 is our video codec of choice.
  • -q 12 is a quality measure for the encoding process (1 is the best and 30 the worst). We’re doing VBR encoding so this measures the compression ratio vs. picture quality.
  • -f mpegts is our output filetype. In this case mpeg-2 transport stream. Yes, we’re encapsulating mpeg4 video inside a mpeg-2 transport stream…..why?….google it.
  • udp://aaa.bbb.ccc.ddd:6666?pkt_size=188?buffer_size=65535 this last bit specifies the address and port number of the recipient machine (aaa.bbb.ccc.ddd is the ip address of that machine and 6666 is my arbitrary port number). We’re also instructing ffmpeg to create smaller 188 byte size udp packets (which is the size of the transport stream packets) to decrease latency and our buffer size is 64kb.

7.) On the receiving machine you should be able to use vlc, ffmpeg or mplayer to catch the stream. In vlc simply open the Network stream rtp://@:6666 , in ffmpeg you can use the command ffplay -i udp://:6666 or using mplayer you can issue the command mplayer -framedrop -double udp://:6666 .

8.) Now to optionally add sound to the whole thing we can use this command on the encoding machine (instead of step 6). You need to know the device name for your sound card and you probably want to turn the volume down (at least initially) on the decoding machine.

ffmpeg -f dshow  -i video="UScreenCapture" -f dshow -i audio="Stereo Mix (Realtek High Defini" -r 30 -vcodec mpeg4 -q 20 -acodec libmp3lame -ab 128k -f mpegts udp://141.117.224.74:6666?pkt_size=188?buffer_size=65535
  • -f dshow specifies that you’re going to be using a directshow device as your input (VIDEO).
  • -i video=”UScreenCapture” is the name of the input directshow video device which we picked up in step 5.
  • -f dshow specifies that you’re going to be using a directshow device as your input (AUDIO).
  • -i audio=”Stereo Mix (Realtek High Defini” is the name of the input directshow audio device which we picked up in step 5.
  • -r 30 is the frame rate.
  • -vcodec mpeg4 is our video codec of choice.
  • -q 20 is a quality measure for the encoding process (1 is the best and 30 the worst). We’re doing VBR encoding so this measures the compression ratio vs. picture quality. I went with 20 instead of 12 from step 6 since the audio encoding slows the machine down a bit.
  • -acodec libmp3lame is our video codec of choice
  • -f mpegts is our output filetype. In this case mpeg-2 transport stream. Yes, we’re encapsulating mpeg4 video inside a mpeg-2 transport stream…..why?….google it.
  • udp://aaa.bbb.ccc.ddd:6666?pkt_size=188?buffer_size=65535 this last bit specifies the address and port number of the recipient machine (aaa.bbb.ccc.ddd is the ip address of that machine and 6666 is my arbitrary port number). We’re also instructing ffmpeg to create smaller 188 byte size udp packets (which is the size of the transport stream packets) to decrease latency and our buffer size is 64kb.
Share

Using iCloud to sync files just like dropbox

datePosted on 13:41, November 2nd, 2011 by Many Ayromlou

If you didn’t know, iCloud has a really neat feature that allows it to act just like dropbox. If you activate the “Document & Data” synching option in the iCloud pref panel, it allows you to sync any file using iCloud. This is contrary to what Apple is selling the service as being just for “Custom” Apps that have the iCloud feature (i.e.: keynote, numbers, etc.).

So here is how you take advantage of this. Once you’ve turned on the feature in the preferences panel, you open up Finder. Hold down the “option/alt” key and from the finder menus choose “Go/Library“. This should land you in your not so secret Library directory. You need to hold down the option key to see this, since OSX Lion hides the users Library directory by default. Now in the Finder window find the “Mobile Documents” folder (and if you like) drag it to the favourites list in Finder (in the left pane). Done. Now whatever file you save into “Mobile Documents” folder from any application will “sync” with all the other mac’s you’ve setup with this feature. You can treat it like your “free” 5GB dropbox account.

Share

R.I.P. Dennis Ritchie

datePosted on 10:49, October 13th, 2011 by Many Ayromlou

Wow…..what can I say….First Jobs, now Ritchie…..I don’t like October anymore :-(

Share

R.I.P. Steve Jobs

datePosted on 20:00, October 5th, 2011 by Many Ayromlou

Share

Lion Tip: Adding your digital signature to PDF files….

datePosted on 11:24, August 4th, 2011 by Many Ayromlou

If you ever are in need of signing a PDF file, you don’t need to print/sign/scan it anymore, Lion’s new preview app lets you insert/sign those pdf docs in a flash. Here is how you get your signature “scanned”.

  1. Use a Sharpie marker and sign your name on a plain piece of paper. Make sure it’s a plain sheet of paper with nothing written on either side.
  2. Open the Preview App and go to Preferences>Signatures and Press the small + button to add a new signature.
  3. A new window will pop up with your webcam video inside.
  4. Hold up the paper with your signature in front of the camera and make sure there is enough light in the room for the camera to get a clean image
  5. Align the signature — by moving it back and forth — with the blue line and wait for the machine to give you the clean scan of it in the window beside it.
  6. Press Enter to accept the signature when you’re ready.

I had to do this twice, but it’s very easy and quick to do. You can even have multiple pics taken of your signatures (or other peoples sig in your household).

Share

Lions new Finder Tricks….

datePosted on 15:21, July 26th, 2011 by Many Ayromlou

Now that I’m getting settled in the latest OSX, I thought I share with you a couple of finder gems that might not be obvious right from the get go:

1) You now have the ability to select multiple files in a folder and right click on them to choose “New Folder with X Selections”. This will create a new folder and move the selected files into that folder. Kinda neat and makes the process of moving large number of files a bit simpler.

2) You can now “move” files and folders from one place to another. First “copy” the file/folder in question by selecting it and using the command-c shortcut. Then find the place you want to move them to and instead of using the usual command-v (which copies the files/folders) use command-option-v instead. Yeaaaaa, we can finally be just like our windows cousins :-) .

3) To remove something from the finder sidebar, hold the command key as you drag it out.

4) In the Finder’s “Go” menu hold the option key to reveal a “Go to Library” menu item.

Although not strictly a new finder gem, Window resizing now supports standard modifier keys, so holding Shift while resizing a window constrains it to its existing aspect ratio, while holding Option resizes the window from its center point.

Share

ICAD Kinect Demos….

datePosted on 15:05, May 26th, 2011 by Many Ayromlou


On May 17, 2011 Ryersons’ Interactive Computing Applications and Design Group (ICAD) demonstrated their latest projects. The session starts with a demonstration of using Microsoft Kinect hardware to control a computer mouse. Next, the group shows the use of a gestural interface to control Google Earth, followed by a demo of using Kinect to control a avatar in Second Life.

The session continues with a demonstration of a potential application to control a small arduino based robot over bluetooth using gestures. Following this the ICAD staff show the use of Kinect as a tracking and control mechanism for a Point-Tilt-Zoom (PTZ) camera. This approach allows them to track up to five people without active trackers. The data from the Kinect camera is used to instruct the PTZ camera where to “look”. Once a person is identified (by putting up their hand) the kinect will try to track the person around the room and make sure the PTZ camera follows the person as well. Switching the tracked person is done by raising ones hand.

Their last demo will show a gestural based keyboard that will eventually be tied into a interactive phonebook application where the user can type the name of a contact using gestures and automatically dial the number through a voip application (ie: google talk).

Individual project videos below….

1) Kinect Windows Mouse Interface

2) Kinect Google Earth Interface

3) Kinect Second Life Interface

4) Kinect Bluetooth Robot Interface

5) Kinect Tracker-Cam Interface

6) Kinect Interactive Phonebook

Share

Amon Tobin rocks my world….

datePosted on 13:49, April 29th, 2011 by Many Ayromlou

Well, just finished listening to the full ISAM release by Amon Tobin on SoundCloud. Wow, dynamite. If you like electronic music, you really should check this out. The one aspect that stood out for me was his use of SoundCloud’s commenting system to create a commentary captioning “trail” throughout the performance. This got me thinking, why can’t we have a system that allows music file “links” be posted to twitter and then have the backend service cull all the people listening to that piece of music and grab their comments via hash tags/RSS in real time and interleave it for all the “participants” in each of the “shared” music spaces. Neato, new term…..”Shared Realtime Collaborative Music Experience”. Time for someone to “make an app for that” :-) . BTW, major credit to Create Digital Music for pointing the way. More details on the Tobin performance here.

Share

NAB2011 – Flying Carpets, Tufas and Castles in the desert….

datePosted on 19:56, April 25th, 2011 by Many Ayromlou

Just got back from NAB2011 in Vegas and this year lots of crazy/fun stuff happened. We setup our booth on Saturday and a bunch of us decided to go for BBQ in the desert, so we rented a car packed up our two crappy coolers and headed out to Red Rock Canyon.

_DSC4049 _DSC4060 _DSC4121 _DSC4088 _DSC4148

The Canyons were as awesome as usual. We had a late lunch/dinner and (surprisingly) ended up seeing a lot of wildlife around the place.

_DSC4050 _DSC4072 _DSC4079 _DSC4190

Next, we went through NAB, which is always fun. On thursday (last day) we took off around 2:30pm and started our trip around the sierras. We had intended to get to Tonopah, NV by around 18:00′ish, but had a bit of run in with a flying carpet on I-95 North. This thing flew off the back of the pickup (in picture) and shattered/cracked the front windshield. You can see the glass shards on the dashboard. It all turned out okay, we stopped the guy, got his info, went back to the car rental and swapped the van. We got to Tonopah around 21:00 and pretty much had dinner and slept right through the night.


Next day (Friday), we drove up to Mono Lake, CA. One of my favourite places of all time (aside from Yosemite and Bryce NPs). I’d been there before a couple of years ago, but this time there was snow in the mountains and the lake was really calm. Since it was a nice sunny day with lots of puffy clouds in the sky I figured I try my luck with some HDR images, for that “out of this world” look.

_DSC4281_HDR _DSC4294_HDR _DSC4320 _DSC4327 _DSC4338

We then left Mono Lake and since the Tioga Pass into Yosemite was still closed, we drove all the way up I-395 to Minden, CA. Next morning (Saturday) we left there and headed south-west on I-88 and eventually made it into Yosemite through the west entrance via CA-120.

_DSC4385 _DSC4390 _DSC4453 _DSC4472_HDR (1) _DSC4473_HDR

We left Yosemite and stayed the night in Oakhurst, CA. On Sunday we drove through the foggy Sequoia NP.

_DSC4513 _DSC4526 _DSC4544 _DSC4579 _DSC4592

We stayed Sunday night in Bakersfield and headed out the next day (Monday) with the intention of visiting the northern parts of Death Valley. We kinda made it down to Baker, CA and decided it might be a wiser idea to drive straight to Vegas (It was really windy and dusty), stay the night and drive back to Death Valley early in the morning. That was a great idea since the next morning was sunny, hot and slightly breazy, but no dust :-) . We drove through the northern part all the way to Scotty’s Castle and drove back to Vegas for the last day of the trip.

_DSC4626 _DSC4641 _DSC4692 _DSC4728 _DSC4775 _DSC4779 _DSC4781

As usual the complete flickr set can be found here.

Share

Recent photo shoots with Toronto Strobist Group….

datePosted on 13:35, April 25th, 2011 by Many Ayromlou

It’s been a while since I’ve posted a photo post, so here is a newish one from a couple of recent shoots with TSG (Toronto Strobist Group).

First a sample from our Holiday 2010 shoot (Full flickr set can be viewed here).

The Look Noir Want some candy? These eyes _MG_0962 _MG_1105_long _MG_1090

Next is the Stroboscopic shoot which was a lot of fun (Full flickr set can be viewed here).

_DSC3818 _DSC3836_HDR _DSC3857 _DSC3866

The final set is from a quick get together with a couple of the members to try and produce a sport/jogging commercial photo (Full flickr set can be viewed here).

_DSC3933 _DSC3991_HDR IMG_2074

Share

Tethering iphone 3GS and ipad 1G using bluetooth…

datePosted on 22:21, March 19th, 2011 by Many Ayromlou

Yep, it works. I was kinda disappointed when firmware 4.3 was introduced and the 3GS owners were left in the cold as far as wifi hotspot sharing. Apple only activated that function on the iphone 4. Anyhow, after messing around with the menus a bit tonite, I figured out how to do something similar to wifi tethering (hotspot) of ipad to the iphone 3GS using bluetooth. Here is how you do it:

  1. Turn wifi off on your 3GS and ipad device. I’m testing from home so I wanted to make sure I was NOT using wifi.
  2. Turn on Bluetooth on both your 3GS and ipad device. This is under Settings/General
  3. On the iphone 3GS turn on “Personal Hotspot”.
  4. On the ipad go back to the Bluetooth menu and let it scan for a second. You’ll find a Entry for your iPhone soon. Click on the entry and connect.
  5. You’ll be prompted on the iphone and the ipad to make sure you see the same code. Just say Okay/Yes.
  6. Viola, you’re tethering your ipad to your iphone 3GS using bluetooth. You should see a Blue throbbing menu bar on top of your iphone 3GS saying “Personal Hotspot: 1 Connection”.

To stop turn Personal Hotspot off on the iphone. If you need to connect again, turn Personal Hotspot on (assuming BT is on already) and click on the iPhone entry in the Bluetooth menu on your ipad.

N.B. The iphone can also “share” it’s wifi connection with the ipad using bluetooth. Neato :-) . Oh and that GPS location transfer thing that people are talking about using wifi tethering doesn’t seem to work when using BT…..Oh well, small price to pay.

UPDATE: After a bit of testing here are some numbers. These were done around midnight on Rogers/Fido Network through bluetooth (iphone 3GS on 3G):

  • Ping: ~320ms
  • Download: 1.53 Mbps
  • Upload: 0.23 Mbps

Not bad for bluetooth I guess.

Share

TeamCoCo does it again…..

datePosted on 13:52, March 4th, 2011 by Many Ayromlou

Absolutely hilarious parody video of iPad2……Gooo Team COCO :-)

Share

PodCamp Toronto 2011 is almost here…..

datePosted on 12:46, February 25th, 2011 by Many Ayromlou


Yep it’s that time of the year again. Mark February 26 & 27 in your calendars…..PODCAMP TORONTO 2011 IS COMING TO TOWN. PodCamp Toronto 2011 is a FREE “unconference” bringing together professionals and hobbyists from Toronto and the surrounding area to explore the cutting edge of new and social media. If you are an online content creator – hobbyist and professionals – who are building communities online in a variety of ways, then PodCamp Toronto 2011 is for you. Share ideas, discuss theories and learn lessons from an audience of experts.

We’ll be at Ryerson University’s flagship centre for studies in converging communications and interactive media — Rogers Communications Centre. In operation for almost twenty years, the Rogers Communications Centre has grown to become Canada’s premier facility for education in digital media communications.

The Rogers Communications Centre is about design and research in a community employing both current and advancing communications technology. These five themes have placed the Rogers Communications Centre among the best educational communication and design facilities internationally.

Just steps away from Yonge Street and the heart of Toronto, the Centre is located at the core of Canada’s electronic media and digital communications culture.

So have you reserved your seat yet? Why the hell not? :-) .

Share

Adding mcrypt support to builtin php5 on OSX Leopard….

datePosted on 17:51, February 4th, 2011 by Many Ayromlou

I got a request to add mcrypt support to our Leopard server today and here is a brief step-by-step installation instruction. This works well under the current 10.5.8 server installation. It should also work for 10.6 (snow leopard), but I have not tried it. Before you start here are the requirements:

  • Backup your system
  • Install (and update) the latest XCode (I’ve got version 3)
  • Install X11 client stuff from your server install DVD
  • install X11 SDK stuff from your server install DVD
  • Ensure you have server 10.5.8 (latest update as of Feb.04.2011)
  • Make sure you have not tried to install mcrypt using another method. We need a “virgin” 10.5.8 install (as far as homebrew/local installs)
  • BACKUP

Please note that this will add mcrypt support to php. This is NOT the same as compiling mcrypt.

Okay, so now that we have all the requirements, you need to get a command line window opened and get a root shell (sudo -i). The rest of this document assumes you’re typing the commands in a root shell.

There is one dependency that we need to clear before we actually get down and dirty and that is libmcrypt. Follow the instructions below to get this installed:

mkdir /SourceCache
cd /SourceCache
curl http://sourceforge.net/projects/mcrypt/files/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.bz2/download -o libmcrypt-2.5.8.tar.bz2 -L

This is the latest version as of this writing (Feb.04.2011).

NOTE: If you’re compiling on a G5 machine you’ll need to tell the compiler that you want to build/configure for a ppc64 target so instead of the below configure command you need to use this:

MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS=" -arch ppc64 -g -Os -pipe -no-cpp-precomp" CCFLAGS=" -arch ppc64 -g -Os -pipe" CXXFLAGS="-arch ppc64 -g -Os -pipe" LDFLAGS="-arch ppc64 -bind_at_load" ./configure --enable-shared
tar -xjvf libmcrypt-2.5.8.tar.bz2
cd libmcrypt-2.5.8/
./configure
make
make -n install

The last command will simulate the installation process. Make sure the stuff is getting installed in /usr/local/lib

make install

At this point you should have a working installation of libmcrypt. This next command prints out the current version of your php engine. In my case under 10.5.8 it’s php 5.2.14.

server:libmcrypt-2.5.8 root# php -v
PHP 5.2.14 (cli) (built: Oct  6 2010 16:57:10)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies

Grab the appropriate php-5.2.XX.tar.bz2 file from php.net. I just grabbed the stock PHP 5.2.14, since I wanted a perfect match between my php engine and the extension. I transferred the file using sftp to the /SourceCache folder on the server.

NOTE: If you’re compiling on a G5 machine you’ll need to tell the compiler that you want to build/configure for a ppc64 target so instead of the below configure command you need to use this:

MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS=" -arch ppc64 -g -Os -pipe -no-cpp-precomp" CCFLAGS=" -arch ppc64 -g -Os -pipe" CXXFLAGS="-arch ppc64  -g -Os -pipe" LDFLAGS=" -arch ppc64  -bind_at_load" ./configure --with-php-config=/Developer/SDKs/MacOSX10.5.sdk/usr/bin/php-config
cd /SourceCache
tar xjvf php-5.2.14.tar.bz2
cd /SourceCache/php-5.2.14/ext/mcrypt
phpize
./configure --with-php-config=/Developer/SDKs/MacOSX10.5.sdk/usr/bin/php-config
make
make test
make -n install

The last command will simulate the installation process. Make sure the stuff is getting installed in /usr/lib/php/extensions/no-debug-non-zts-20060613

make install

Now we need to modify our php.ini file and tell the php5 engine of the availability of this new module. To do this you need to copy php.ini.default to php.ini (in /etc directory). For details of why have a look at this article.

cd /etc
cp php.ini.default php.ini

Edit the newly created/copied php.ini using your favourite editor. Add the following line to the appropriate location (read the comments in the file to find the location):

extension=mcrypt.so

Still in the same file find the variable “extension_dir” and change it’s value to “/usr/lib/php/extensions/no-debug-non-zts-20060613″ path instead of “./”. Save the php.ini and use the following command to see if mcrypt extensions are available:

server:etc root# php -i |grep mcrypt
mcrypt
mcrypt support => enabled
mcrypt.algorithms_dir => no value => no value
mcrypt.modes_dir => no value => no value

Done. Restart Apache service from the server manager (just for the sake of completeness).

Share

Adding GD support to builtin php5 on OSX Leopard….

datePosted on 15:17, February 4th, 2011 by Many Ayromlou

I got a request to add GD support to our Leopard server today and here is a brief step-by-step installation instruction. This works well under the current 10.5.8 server installation. It should also work for 10.6 (snow leopard), but I have not tried it. Before you start here are the requirements:

  • Backup your system
  • Install (and update) the latest XCode (I’ve got version 3)
  • Install X11 client stuff from your server install DVD
  • install X11 SDK stuff from your server install DVD
  • Ensure you have server 10.5.8 (latest update as of Feb.04.2011)
  • Make sure you have not tried to install GD using another method. We need a “virgin” 10.5.8 install (as far as homebrew/local installs)
  • BACKUP

Please note that this will add GD support to php. This is NOT the same as compiling the GD graphics library (libgd).

Okay, so now that we have all the requirements, you need to get a command line window opened and get a root shell (sudo -i). The rest of this document assumes you’re typing the commands in a root shell.

There is one dependency that we need to clear before we actually get down and dirty and that is libjpeg (known as jpegsrc). Follow the instructions below to get this installed:

mkdir /SourceCache
cd /SourceCache
curl -O http://www.ijg.org/files/jpegsrc.v8c.tar.gz

This is the latest version as of this writing (Feb.04.2011).

NOTE: If you’re compiling on a G5 machine you’ll need to tell the compiler that you want to build/configure for a ppc64 target so instead of the below configure command you need to use this:

MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS=" -arch ppc64 -g -Os -pipe -no-cpp-precomp" CCFLAGS=" -arch ppc64 -g -Os -pipe" CXXFLAGS="-arch ppc64 -g -Os -pipe" LDFLAGS="-arch ppc64 -bind_at_load" ./configure --enable-shared
tar -zxvlf jpegsrc.v8c.tar.gz
cd jpeg-8c/
./configure
make
make test
make -n install

The last command will simulate the installation process. Make sure the stuff is getting installed in /usr/local/lib

make install

At this point you should have a working installation of libjpeg. Now we double check our php version.

server:jpeg-8c root# php -v
PHP 5.2.14 (cli) (built: Oct  6 2010 16:57:10)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies

Notice in the output that I have php 5.2.14 installed on the machine (again the latest update as of Feb.04.2011). Apple does not provide source code for this exact version of PHP. On top of that The numbering scheme that they use is weird. On my machine it is “apache_mod_php-44.6″, you can find yours using the following:

server:jpeg-8c root# php -i |more
phpinfo()
PHP Version => 5.2.14

System => Darwin saturn.rcc.ryerson.ca 9.8.0 Darwin Kernel Version 9.8.0: Wed Ju
l 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386
Build Date => Oct  6 2010 16:55:34
Configure Command =>  '/SourceCache/apache_mod_php/apache_mod_php-44.6/php/confi
gure'  '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--
disable-dependency-tracking' '--with-apxs2=/usr/sbin/apxs' '--with-ldap=/usr' '-
-with-kerberos=/usr' '--enable-cli' '--with-zlib-dir=/usr' '--enable-trans-sid'
'--with-xml' '--enable-exif' '--enable-ftp' '--enable-mbstring' '--enable-mbrege
x' '--enable-dbx' '--enable-sockets' '--with-iodbc=/usr' '--with-curl=/usr' '--w
ith-config-file-path=/etc' '--sysconfdir=/private/etc' '--with-mysql-sock=/var/m
ysql' '--with-mysqli=/usr/bin/mysql_config' '--with-mysql=/usr' '--with-openssl'
 '--with-xmlrpc' '--with-xsl=/usr' '--without-pear'

The thing you’re looking for (“apache_mod_php-44.6″) is under Configure Command. If you go to the following URL (http://www.opensource.apple.com/source/apache_mod_php/) in your browser (safari, firefox) you’ll soon discover these weird directory names with numbers that don’t match the php versions. Again, as of this writing (Feb.04.2011), I can’t find apache_mod_php-44.6 folder in the listing so I grabbed the nearest numbers apache_mod_php-44.2 which is php 5.2.8…….close enough. It seems to work. Follow the steps below to get the file and compile the GD portion of it. Remember we’re not recompiling the entire php, just the GD plugin portion.

UPDATE: You CAN install the exact version of your PHP’s GD extension. Instead of grabbing the file from Apple, figure out the version of your PHP using “php -v” and grab the appropriate file from php.net instead. I just recompiled the GD portion of PHP 5.2.14, since I wanted a perfect match between my php engine and the extension. The instructions below (except curl which needs to be modified) work.

NOTE: If you’re compiling on a G5 machine you’ll need to tell the compiler that you want to build/configure for a ppc64 target so instead of the below configure command you need to use this:

MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS=" -arch ppc64 -g -Os -pipe -no-cpp-precomp" CCFLAGS=" -arch ppc64 -g -Os -pipe" CXXFLAGS="-arch ppc64  -g -Os -pipe" LDFLAGS=" -arch ppc64  -bind_at_load" ./configure --with-zlib-dir=/usr --with-jpeg-dir=/usr/local/lib --with-png-dir=/usr/X11R6 --with-freetype-dir=/usr/X11R6 --with-xpm-dir=/usr/X11R6
cd /SourceCache
curl -O http://www.opensource.apple.com/source/apache_mod_php/apache_mod_php-44.2/php-5.2.8.tar.bz2
tar xjvf php-5.2.8.tar.bz2
cd /SourceCache/php-5.2.8/ext/gd
phpize
./configure --with-zlib-dir=/usr --with-jpeg-dir=/usr/local/lib --with-png-dir=/usr/X11R6 --with-freetype- dir=/usr/X11R6 --with-xpm-dir=/usr/X11R6
make
make test
make -n install

The last command will simulate the installation process. Make sure the stuff is getting installed in /usr/lib/php/extensions/no-debug-non-zts-20060613

make install

Now we need to modify our php.ini file and tell the php5 engine of the availability of this new module. To do this you need to copy php.ini.default to php.ini (in /etc directory). For details of why have a look at this article.

cd /etc
cp php.ini.default php.ini

Edit the newly created/copied php.ini using your favourite editor. Add the following line to the appropriate location (read the comments in the file to find the location):

extension=gd.so

Still in the same file find the variable “extension_dir” and change it’s value to “/usr/lib/php/extensions/no-debug-non-zts-20060613″ path instead of “./”. Save the php.ini and use the following command to see if GD extensions are available:

server:etc root# php -i |grep GD
GD Support => enabled
GD Version => bundled (2.0.34 compatible)

Done. Restart Apache service from the server manager (just for the sake of completeness).

Share

Hauppauge Broadway: OTA ATSC streaming for iOS devices….

datePosted on 23:27, January 16th, 2011 by Many Ayromlou

Yep, just like the title says, hauppauge has announced the Broadway, a new “set-top” aimed at iPhone, iPad and iPod touch users. The hardware streams live OTA HDTV to an Apple handheld after first compressing the video using H.264. The resulting media can be delivered locally over Wi-Fi, or to a remote place using any Internet connection. Over-The-Air ATSC signals can be captured using a built-in ATSC tuner, while cable is supported through clear QAM. Pricing is a bit steep at $199 and the box is scheduled for February release.

Share

Controlling Humanoid Robot with Kinect

datePosted on 22:45, January 16th, 2011 by Many Ayromlou

aka. the coolest kinect hack I’ve seen to date. Very cool demo.

Share

Optimizing Snow Leopard for SSD drives….

datePosted on 22:13, January 16th, 2011 by Many Ayromlou

I just installed a new 128GB SSD drive in my older C2D 17″ macbook Pro and let me tell you….WOW….This thing is on fire. The system is extremely responsive and apps literally jump onto the screen. The machine now boots up to full desktop in roughly 17 seconds. Now that’s nice. I did do a bunch of changes to the way Snow Leopard is setup to optimize a couple of things that are normally tuned for HDD’s.

  • Turn off Sudden Motion Sensor (SMS): If you are replacing your primary (and only) HDD internal drive with a SSD, you can get a bit of a performance boost by turning off the Sudden Motion Sensor technology that comes with your laptop. Remember your SSD doesn’t use read/write head on rigid platters so there is no reason to keep this feature turned on. You can safely turn it off by issuing the command below in Terminal, type in administrator password when asked.
    sudo pmset -a sms 0
  • Turn off hibernation and delete sleepimage file: Using SSD, you can achieve under 20 seconds boot-up time. Why bother using Hibernation and waste too much space on your SSD. To do so, issue the commands below in Terminal, enter administrator password when asked.
    sudo pmset -a hibernatemode 0
    sudo rm /var/vm/sleepimage
  • Reduce disk I/O by mouting partition with noatime: Stop OSX from updating “last access time” or atime everytime a file is touched on your filesystem. This is IO expensive and unnecessary. In a terminal window create a file called com.nullvision.noatime.plist under /Library/LaunchDaemons folder and stick the following lines in the file. Save the file (you need to sudo when you edit the file) and reboot your machine.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
            "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
        <dict>
            <key>Label</key>
            <string>com.nullvision.noatime</string>
            <key>ProgramArguments</key>
            <array>
    		<string>mount</string>
                	<string>-vuwo</string>
                	<string>noatime</string>
                	<string>/</string>
            </array>
            <key>RunAtLoad</key>
            <true/>
        </dict>
    </plist>

    Once the machine has rebooted you can check to make sure your root partition is mounted with noatime by issuing the following command

    mount | grep "/"

    and look for something similar to this in the output

    /dev/disk0s3 on / (hfs, local, journaled, noatime)

This should do it. Have fun with your new SSD drive.

Share

Homebrew 8mm film telecine machine…..

datePosted on 21:47, January 16th, 2011 by Many Ayromlou

From the pages of Make magazine……Absolutely awesome homebrew. >16,000 frames at 2.4 seconds per frame…..simply brilliant :-)

Share
123... 282930Next