Now's the time to start getting video programming online. Those of you with
broadband access are lucky enough to be able to suck heaps of cool content,
such as...
Most of these come from the people who brought you TechTV, and who are now
bringing you...
get this on G4TechTV, Australians on
the HOW TO Channel, others
please fill in the form on the official site and meanwhile download the
torrents (which I won't link to))
A blog about tech things as they occur to me. Often Mac and Linux related, often blogged on the bus or train. At least that was the theory -- now I just put things here whenever I have something to say.
Friday, 27 May 2005
High quality technology TV online
Update: Adding movies to iTunes for Tiger
Here is an Automator workflow (why not?) which converts movies into
QuickTime Media Link documents and then imports them into iTunes 4.8.
This is an update to the earlier hint which didn't work in Tiger.
- Create a new Automator workflow by opening Automator.
- Add an "Ask for Finder Items" action, type Files, and tick the Allow
Multiple Selection box. - Add a "Run AppleScript" action. The script box should be edited to match
the below script:on run {input, parameters}
set itemno to 1
repeat (count of input) times
set str1 to POSIX path of (item itemno of input)
set str2 to ""
set charno to 1
repeat (length of str1) times
if (character charno of str1 is equal to character 1 of " ")
then
set str2 to (str2 & "%20") as string
else
set str2 to (str2 & character charno of str1) as string
end if
set charno to (charno + 1)
end repeat
set astring to {"<?xml version=\"1.0\"?><?quicktime
type=\"application/x-quicktime-media-link\"?><embed src=\"file://localhost"
& str2 & "\" />"} as string
set afile to open for access (((item itemno of input) as string) &
".mov") with write permission
write astring to afile as string
close access afile
set mfile to alias (((item itemno of input) as string) & ".mov")
tell application "iTunes"
add mfile
end tell
set itemno to (itemno + 1)
end repeat
end run - Run the workflow. Select your movie files and they should get imported
into iTunes.
There are some limitations to this approach. I'm converting the file name to
a URL and the only character I'm fixing is the space. If your files contain
other special characters that can't occur in URLs, you'll have to rename
them or edit the script above. And in my opinion, while there is a lack of
useful actions, Automator is only slightly better than using AppleScript
directly.
Monday, 23 May 2005
iChat/MSN revisited
HOWTO: Your own private MSN gateway for iChat
Using iChat via MSN with your own Jabber server
This procedure is very long-winded (and could probably do with some automation). Look out for a revised version later.
Requirements:
- DNSUpdate (optional if you have a static IP address)
- A DynDNS.org account (or similar) for hosting your domain name
- Jabberd 1.4 Jabber server (I used 1.4.4)
- Expat XML Parser library (I used 1.95.8)
- GNU Libidn library (I used 0.5.16)
- GNU Pthreads library (I used 2.0.4)
- PyMSNt MSN gateway for Python (I used 0.9.3)
- PyCrypto (I used 2.0)
- PyOpenSSL (I used 0.6)
- Twisted 2.0 Sumo package (I used 2005-03-22)
- Psi (I used 0.9.3)
- Administrator access to your Mac
Procedure:
- Set up an account with DynDNS.org. Associate a hostname with the computer which will run your Jabber server.
- Install DNSUpdate. Run its application, letting it install its daemon. Enter the details for your account, and then your host and make sure it can communicate with the DynDNS server.
- Reboot the machine to allow DNSUpdate to start automatically. You may get a warning about DNSUpdate upon rebooting, if so click Fix and reboot again.
- Extract out Expat by double-clicking it in the Finder. Open a Terminal, type "
cd
" and drag the Expat folder into the window. Press Enter. - Install Expat by running "
./configure
" then "make
" and finally "sudo make install
" entering your password when asked. - Extract out Libidn by double-clicking it in the Finder. Switch to the Terminal, type "
cd
" again and drag the Libidn folder into the window. Press Enter. - Install Libidn by running "
./configure
" then "make
" and finally "sudo make install
" entering your password when asked. - Extract out pth (the Pthreads library) by double-clicking it in the Finder. Switch to the Terminal, type "cd " again, and drag the pth folder into the window. Press Enter.
- Install Pth by running "
./configure
" then "make
", "make test
" and finally "sudo make install
" entering your password when asked. - Extract out Jabberd by double-clicking it in the Finder. Switch to the Terminal, type "
cd
" again and drag the jabberd folder into the window. Press Enter. - Install Jabberd by running "
./configure
" then "make
" and finally "sudo make install
", entering your password when asked. - At this point, we have to configure the Jabber server. You will need to know your hostname that you got from DynDNS earlier. Follow the instructions in the Jabberd 1.4 Administration Guide and return here when done.
- You can now launch iChat and test it while your Jabber server is running. In the iChat Account Preferences (iChat > Preferences... or the Jabber page of the Assistant if it is the first time using iChat), put the user name you registered with your server during the test followed by @ followed by the hostname of the Jabber server. Enter the same password. Now try to connect. It will likely fail because iChat prefers secure communications. Go to Preferences... in iChat and click on Accounts, select your Jabber account and click on Server Settings. Untick the Connect using SSL box. Also if you are using the Mac OS X firewall, make sure port 5222 is open (the connection uses your external IP and so goes through the firewall for now). Now try logging in. Click iChat > Log In to Jabber. Your status should become Available. Note that you must be connected to the Internet for iChat to connect properly. Close iChat when it is working.
- Extract out pyCrypto by double-clicking it in the Finder. Switch to the Terminal, type "
cd
" again, and drag the pycrypto folder into the window. Press Enter. - Install pyCrypto by running "
python setup.py build
", then "sudo python setup.py install
", entering your password when asked. - Extract out pyOpenSSL by double-clicking it in the Finder. Switch to the Terminal, type "
cd
" again, and drag the pyopenssl folder into the window. Press Enter. - Install pyOpenSSL by running "
python setup.py build
", then "sudo python setup.py install
", entering your password when asked. - Extract out the Twisted Sumo package by double-clicking it in the Finder. Switch to the Terminal, type "
cd
" again, and drag the pycrypto folder into the window. Press Enter. - Install Twisted Sumo by the following commands. First install the provided Zope Interface. Type "
cd Zope-Interface
", press Tab and then press Enter. Install it by typing "python setup.py build
", "sudo python setup.py install
". Type "cd ..
" and press Enter to return to the Twisted Sumo folder. Install that by typing "python setup.py build
", "sudo python setup.py install
". Enter your password whenever asked. - Now extract and install PyMSNt by double-clicking it in the Finder. Switch to the Terminal and type "
sudo cp -r
" and drag the PyMSNt folder into the window, then press Enter, entering your password when asked. - Now follow the PyMSNt instructions, which involve editing your jabber.xml file again.
- We need to make a link between your Jabber account and your MSN Messenger account. To do this, with Jabber and PyMSNt running (use multiple Terminal windows), double-click the Psi disk image and double-click Psi in the window that appears. Log in as you did with iChat with your Jabber address and password. Right-click on your username and click on Available. Then right-click again, highlight Modify and click Service Discovery. In the window that appears, right-click on MSN and click Register. Now enter your MSN Messenger details. You will get a flood of authorisation requests for your existing MSN contacts. Ignore these now and close Psi.
- Open iChat again and log in to Jabber (it should do this automatically, otherwise choose iChat > Log In to Jabber). Accept all of the authorisation requests that appear. Close iChat.
- Now we need to get the server to start at startup, or at least while iChat is running. I chose the Startup Item approach to this, but be warned this method is obsolete in Tiger and I couldn't stop PyMSNt from running as root. You'll also need t o be familiar with editing permissions of files. I might leave this for another time, for now however you simply need to run both Jabber and PyMSNt before iChat to connect to MSN.
Happy chatting!
Saturday, 21 May 2005
My tip got posted!
Note that after I submitted that hint, I found a slightly better way, for Panther users at least. Panther users can exploit QuickTime Player's scriptability to get the movie exported as a QuickTime media link file which is draggable into iTunes. The AppleScript I used is below:
tell application "QuickTime Player"
--open theFile
set theName to name of (first movie)
export (first movie) to ("Panther:private:tmp:" & theName & ".mov") as QuickTime media link with replacing
close (first movie)
quit
end tell
tell application "iTunes"
add (file ("Panther:private:tmp:" & theName & ".mov"))
end tell
tell application "Finder"
delete (file ("Panther:private:tmp:" & theName & ".mov"))
end tell
tell application "iTunes"
activate
end tell
Note: Make sure you replace every instance of Panther in the script with the name of your boot drive (as it appears on the Desktop). This does not work with QuickTime 7.0 on Tiger (might work with Pro installed).
HOWTO: Analog Clock Screen Saver in Quartz Composer
On the post page is the text for the Analog Clock Screen Saver that I implemented in an hour on the bus earlier in the week. It's great that we can now do this kind of stuff! The resources (click the post title) page has a PDF version of the howto and a copy of this sample.
Update 19/6/2005: This has now been added to quartzcompositions.com's Wiki -- follow the link to read the howto, or download the PDF from my website.
Added shortened summaries for the front page
Added Blog resources page
Yahoo! also doesn't allow me to remote load or deep link so that's the URL you'll get in any future posts. The resources are identified chronologically like this blog so you'll find what you're looking for.
More Tiger impressions
(A test of Blogger Mobile) With Tiger, it is more the small things that count.
I've noticed Finder is faster and feels more robust than in the past. The ability to extract tar gz and bz2 is very nice - I haven't had to install StuffIt Expander yet. Only downside is that it does not delete the intermediate tar file meaning a lot of to'ing and fro'ing with the Trash.
The power management options have been improved.
Yet again my iBook misses out with display rotation, something I really would have liked for reading eBooks.
Safari's new built in PDF reader is great, but lets me down by not having a Save option in the right click menu.
I'm sure I'll think of more (just remembered the programmer's Calculator is great and Grapher is very cool but Apple why is it hidden away in Utilities?) Don't expect a comment on Mail though, I'm tied into Entourage.
Friday, 20 May 2005
As promised: Mac OS X Tiger 10.4 impressions
My first stop was DVD Player. This has received a massive upgrade in Tiger (plus there has since been a Software Update). But many of the new features are not available on older machines. Apple neglects to mention this on the box or in the feature list, but DVD Video Zoom and DVD Video Color are 'Unsupported' on my ATI Mobility Radeon 7500 chip. These are features my PC has had since the Pentium III days, and I feel shafted by this one.
Next stop was Quartz Composer. I am very impressed with this tool, so much so I want to post about it separately. This is going to be a very empowering tool for developers. It's got a bit of Flash in it and more, plus real-time rendering while you develop. This is going places. Even the PC can get in on the action as it can export QuickTime movies. I've yet to explore all of this application (like its patches for interactivity!) but it's more than just a tool for screen savers.
Look out for my post about making an Analog Clock screen saver in Quartz Composer in one hour on the bus.
Today I got around to one of my reasons for Tiger - the new iChat and its much talked about Jabber support. Finally a competent messenger that I have an account for (challenge extended to Microsoft to prove me wrong...). However I took this a step further - I've installed a Jabber server on my laptop and have it working so I don't have to rely on an external Jabber server - only MSN.
Can't say Dashboard has me excited, and I've noticed some glitches in Expose that I don't think were there before (sheets on windows don't highlight, new windows pop up above the Expose layer), but overall if you can't afford to upgrade your Mac (this is the preferred way to get Tiger) it may still be worth the purchase, but you won't get everything.
The obligatory first post
Let's outline what I propose to do here. I want to use this blog as a way of storing techniques that I use for doing things that might not be trivial (technically) and that are fun. I also want to (selfishly) have a storage location for all of these things so I can refer to them later.
Most of this content will be Mac and Linux (and hence tech-based) related, but I might throw some other things on here -- but you should be able to filter out what you want to see. I'll be linking this to my digg (http://www.digg.com) account as well.
On to the real first post -- I got Tiger this week and I want to make some comments about that.
PS. The transit part of the name? Well, I plan on blogging to this from my 'phone (via e-mail) from time to time. I get a LOT of time in transit.