Archive

Uncategorized

Rockingham Street Q-Park car park, Sheffield, UK.

After a partially voluntary and partially involuntary hiatus, I am back in flight. After significant work commitments, then getting married with a honeymoon in Barcelona, ES, I am back in Sheffield, UK, the greenest city in England. As this project is currently unfunded, and solo, I’m updating things as-and-when.

I promised you some performance tests and here they are. I’m am perfectly satisfied with the installations of Ubuntu Linus 8.04.1 on blue-and-white G3s and 10.04 on grey-and-white  Macs. As suspected, the GUI is a major burden on the system and opening a folder of about 3,000 jpeg images can take a full 5 minutes because of the overhad loading all the thumbnails.

The solution is simple. Don’t.

For my purposes this is no problem. I want to use these machines as workhorses and don’t need the GUI.

I’m going to be using FFmpeg to convert and compress a folder full of images into a movie. However, I came across a well-documented problem immediately. FFmpeg will not continue if a.) the first file is not numbered xxxxxx1 and will fail if there is a gap in the numbering.

Fortunately, I easily found a Bash script to sort this out, and I found it here:

http://stackoverflow.com/questions/2829113/ffmpeg-create-a-video-from-images

x=1; for i in *jpg; do counter=$(printf %03d $x); ln “$i” /tmp/img”$counter”.jpg; x=$(($x+1)); done

(Also see the revision below).

This works but note the format of the filename extensions is case-sensitive. Helpfully (not), the script just fails if you do not get this correct. It renames all the images in a folder beginning at xxxxxx1, so if you sequence does not, or it is missing one or more images in the middle, it will not cause FFmpeg to fail. I’ll deconstruct this script in a later blog post.

Even more usefully, Linux does not actually duplicate the binary files, it just creates link files which can be safely deleted afterwards.

These tests were done on a 1 GHz PowerMac G4 with 640 Mb RAM & 21 Gb HD.

Rename 2933 files – 23 seconds

Using FFmpeg:

Encode jpeg files at 1600×1200 to mjpeg – approx 9 min 30 secs – 192.4 MB
Encode jpeg files at 1600×1200 to mjpeg – approx 8 min 11 secs – 192.4 MB
Encode jpeg files at 1600×1200 to mjpeg – approx 8 min 12 secs – 192.4 MB

Encode jpeg files at 640×480 to mjpeg AVI – approx 10 min 15 secs – 40.4 MB – atrocious quality
Encode jpeg files at 640×480 to mjpeg AVI – forgot to time it but similar – 199.5 MB – quality set to 1

This last set of tests was done whilst messing about within the GUI. I don’t really know enough about what is going on under the hood, but it seems that things slow down a lot and this might be due to caching thumbnails or, err, whatever. After a restart performance increased dramatically.

Rename 2,933 items – 1’05’’
Rename 2,933 items – 1’12’’
Rename 2,933 items – 0’20’’ (after restart)

For my purposes the performance seems acceptable at this stage.

One other revision I had to make was to compensate for the original file numbering restarting. Canon Powershot cameras create jpeg images with filenames of the format “IMG_xxxx.JPG” and shooting timelapse with them quickly reaches numbers in excess of 9,999. For consumer-level snap cameras, this number is probably well in excess of a normal user’s needs but I can easily shoot that many in one day. Consequently, the image numbers cannot solely be relied upon to reference the images in the correct chronological order, hence this revision which sorts them into creation order before renaming.

x=1; for i in $(ls -t -r *JPG); do counter=$(printf %04d $x); ln “$i” /Users/richardbolam/Desktop/testout/img_”$counter”.jpg; x=$(($x+1)); done

I’m still a bit of a noob when it comes to Bash scripting, but I will write another post soon that disassembles these scripts, partly for your benefit, but also to help me learn more about what I’m doing. This script was revised with the invaluable help of the technical staff at Access Space. Stay tuned.

access-space.org

“Personally, I liked the university, they gave us money and facilities. We didn’t have to produce anything. You’ve never been out of college! You don’t know what it’s like out there! I’ve worked in the private sector, they expect results.” Dr Ray Stanz, Ghostbusters, 1984, Ivan Reitman.

One of the major frustrations with computers is ambiguous error messages. They’re just machines, and no-one expects them to work without failing occasionally, but give us a break. The next biggest frustration is explicit error messages that give you every detail but nothing you have the remotest chance of doing anything about. Linux tends to fall into the latter category. Windows even gives you hexadecimal memory addresses. Gee thanks.

In Final Cut Pro, Apple’s professional video editor software for Mac OS X, I regularly get a message saying “General Error”. That’s no help at all, and whilst it is quite fascinating to see all the text status messages scrolling up a screen, so beloved of science fiction films, much of it is so minutely detailed, but abstracted from anything remotely helpful, that it might as well just say “FAIL!”.

I’ve worked on Macintosh computers since the early ‘90s and one of the advantages is the relatively small number of hardware configurations. However, even given identical specifications, sometimes things just don’t work for no reason you can identify. My parents would say “you’ve got to hold your mouth right while you do it”. This means that it’s achievable but not necessarily using logical or sound procedural methods, just luck.

Installing Ubuntu Linux on legacy Macintosh computers has been like that.

It was amazingly easy on my knackered and flaky first generation Macbook, running OS X 10.6 Snow Leopard. Partially following instructions I found online, I used the included Bootcamp utility (originally intended to allow dual booting of OS X and Windows) to create a partition that I then installed Ubuntu 11.10 on the other partition from a CD boot disk.

However, this is all academic and I have a job to do. Although it’s interesting and valuable to be able to re-purpose otherwise obsolete computers, this geekery is not what the project is about. I need to keep in sight the fact that the only reason I am using the Macs is that they are free and not doing anything else, and the project has no funding. Out in the private sector, where I work, I need achieve some results and get these machine producing something.

I have four working blue-and-white G3s and a 400 MHz G4. I have managed to get two of the G3s to run Ubuntu 8.04.1 and the G4 to run Ubuntu 10.04. I am certain the problems I have had with the other two are peculiar to faults with the individual machines, rather than PowerPC Linux, but I am yet to solve them. I was hoping to get all four G3s working as I have an idea for an art installation and need three, so this would give me a spare.

Anyway, it’s time to move on.

I’m convinced that Linux (rather than MacPorts on OS X) is the way forward, and I’m not going to give up on these working machines, but I have more to achieve.

Stay tuned for performance tests..

Flight of the Phoenix (1965 dir Robert Aldrich)

Flight of the Phoenix (1965) is a rollicking good adventure yarn about a group of heroic failures whose plane crashes in the desert and they attempt to build a new one from the leftovers. It’s a great film and I highly recommend it, although please don’t bother with the bizarre, homoerotic and Hollyoaks-esque 2004 remake.
http://www.imdb.com/title/tt0059183/

Here is some detail about my ongoing quest to bequeath a new lease of life to old, wilderness-bound PowerPC-based Macintosh computers.

Having successfully installed Ubuntu 8.04.1 on a blue-and-white G3 (see video), a few days later it refused to boot either from the internal hard drive or the boot CD. I have three other similar G3s and they all refused to boot from the CD. One of them just sat there, making a metallic flapping sound. I still don’t know why.

In a slight aside, sometimes both the G3s and G4s just refuse to start up. No lights, no action, no nothing. A couple of tips I picked up somewhere are 1) try pulling the clock battery and 2) unplug it a leave it for an unspecified amount of time. Both seem to have succeeded for me on occasion.

So, after an initial success, I couldn’t get any of the G3s to boot from the 8.04.1 CD ROM. So I tried the 6.06 Dapper Drake disk and this installed successfully.
http://old-releases.ubuntu.com/releases/6.06/

However, when I tried to install gPhoto2 and FFMpeg, it could not find the repositories. I guess it’s old and they’ve all moved. However, the G3 would now boot from the 8.04.1 Hardy Heron alternate install disk and I successfully upgraded the system to 8.04.1.
http://cdimage.ubuntu.com/ports/releases/hardy/release/

Linux MintPPC seems to have many successful installations but I couldn’t get it to work.
http://www.mintppc.org/content/imac-g3-bondi-blue-and-bw-g3

At this point I bet you’re thinking “I’m sorry, but just remind me why you’re telling me all this.”

It’s a long story, but the upshot is that I have a load of old Macs that are doing nothing and I’d like to put them to work. However, Apple OS X has abandoned them although there is life in the old monkeys yet. It’s not just about Macs though, and I have work for lots of computers. Linux is platform-independent and has some very valuable, although almost invisible and ambiguously documented, resources that can be pressed into service. And, in the spirit of open-source, I’m publishing the information as I go along.

I’d like to use the blue-and-white G3s to capture timelapse images from Canon Powershot cameras and for the G4s to collate those images into movies. Although they do not have the horse-power to play the movies back, they do have the monkey-power to capture, collate and compress the stills into usable files that can either be transferred to another playback device, or uploaded to the internet. To this end, I’m testing which systems will work on these old machines and writing shell scripts. Having dismissed the use of MacPorts on OS X (on pre-Intel machines), the next stage will be to write some scripts and test the performance of Linux-based utilities.

Conclusion

Ubuntu 8.04.1 seems viable on blue-and-white G3s, and I have successfully installed FFMpeg, gPhoto2 and ImageMagick.

Ubuntu 10.04 Lucid Lynx seems viable on G4s, and I have successfully installed FFMpeg, gPhoto2 and ImageMagick.

Stay tuned for performance comparisons and some actual code.

FAIL

I first heard the term “fail early, fail often” in a talk by one of the lead animators on Disney-Pixar’s “Ratatouille” (2007, dir Brad Bird, Jan Pinkova), when he explained that they went back to the drawing board with the characterisation and animation nearly a third of the way into the production schedule. If you google the term you can find lots of variations on the same phrase including “fail often, fail fast, fail cheap”, but no definitive attribution. Google fail.

Undeterred after my failure (also known as a “successful test”) installing MacPorts on a old blue-and-white G3 (see below), I installed 10.04 Lucid Lynx on the second drive of a well-cared-for 400 MHz G4. I had already installed MacPorts on the OS X drive but interrupted installation of FFMpeg after two hours.

I managed to limp it over one hurdle by cleaning glib2 with the command

sudo port clean glib2

After that it installed glib2 successfully.

The following day I tried installing FFMpeg again on the OS X and it took all day. No really, ALL DAY. I didn’t time it exactly, but I started it at about 9am and it was still going when I went out at about 3pm.

I returned about 5.30pm to find that it had fallen at the last fence and failed to install FFMpeg itself. I tried the same trick again:

sudo port clean ffmpeg

But it did not solve the problem.

I booted the same machine into Ubuntu Linux 10.04 and it took about a minute to download and install FFMpeg and a few seconds each for gPhoto2 and ImageMagick.

I really don’t know enough about this to know why there seems to be such a bottleneck on the Mac side, after all they are the same libraries, running on the same processor.

What I do know is that MacPorts does not appear to be viable on old G3s or G4s, although I have it running very successfully on more recent Intel Core Duo and Core 2 Duo systems running OS X 10.6 Snow Leopard, yet to be performance tested.

After the above shenanigans, I found the following resource online about installing on FFMpeg on Mac OS X, but I don’t think I’m going to pursue this given simpler routes through.
http://stephenjungels.com/jungels.net/articles/ffmpeg-howto.html

Conclusion

For my purposes, Linux is the way forward on G3s and G4s. Mac OS X 10.4.11 Tiger works fine on these machines, but I couldn’t get MacPorts to work satisfactorily.

I didn’t fail fast, but at least I’m failing often and cheap. More economical failures soon…

The Lament For Icarus (1898) – Herbert James Draper

For completeness, I’m including all the detail but if you don’t want to be bored witless, just skip down to the “Conclusion” below.

I successfully installed Ubuntu 8.04.1 on a separate disk in a 350 MHz blue-and-white G3 (circa 1999) with 384 Mb RAM and 6 Gb HD. FFMpeg installed fine, although I have not carried out any performance tests yet.

In order to compare performance, I installed OS X 10.4.11 on the other HD, also 6 Gb. After installing Xcode 2.5 and MacPorts, I ended up with less than 400 Mb free disk space even after trashing everything that I dared. MacPorts seemed to be working fine but FFMpeg failed to install due to (I assume) lack of disk space.
http://www.everymac.com/systems/apple/powermac_g3/specs/powermac_g3_350_bl.html

MacPorts 2.0.3 for OS X Tiger is available from the MacPorts website.
http://macports.org

Xcode is required to run MacPorts and upgrading to 2.5 is recommended. Download it here:
http://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=19907

I tried the same OS X setup on a 400 MHz blue-and-white G3 with 512 Mb RAM and 12 Gb HD.
http://www.everymac.com/systems/apple/powermac_g3/specs/powermac_g3_400_bl.html

After about a day and a half of failure to get FFMpeg to install on either machine I decided to move onto gPhoto2. After all, I am hardly likely to be compiling of compressing movies on an old G3, but might want to capture from digital still cameras. Unfortunately, gPhoto2 would not install either, as it seems to rely on glib2 as well. Please let me know if you know different but MacPorts does not seem to be viable on the old blue-and-white G3s, at least not for my needs.

Conclusion

MacPorts is not viable on blue-and-white Mac G3s.

Stay tuned for the next thrilling episode when I install and evaluate Ubuntu Linux on the same machines.

FYI here are some other epic failures, easily avoided.

Using a two-input monitor and thinking that your computer is not starting up because the monitor is switched to the other input.

Plugging your camera into a different computer that is not switched on, and then wondering why it cannot be detected by the one you are working on.

Not reading the instructions, too many examples to include here.

Forgetting to take vital installation disks to where you are working on-site.

Not using a proper Mac keyboard, connected directly. KVM switches don’t necessarily send the correct keystrokes to a Mac, so trying to boot from CD can be a frustrating experience. Also, the Mac keyboard layout is different from your average PC keyboard which makes it difficult to reproduce some of the key combinations in Linux.

To be continued…

This is how I imagine myself, but I think I would stand somewhere else. (Photo: archive.org)

Q. Why are we doing this?

Flying Monkey TV was conceived as a collaborative documentary filmmaking project using low-impact methods and available technology.

A. Because we can. Because it’s a great idea. Because we want to.

We have had a small amount of funding in 2010 from Arts Council England, via The Culture Company,  but the project is currently unfunded. However, I decided to embark upon the development stage of getting the FMTV software up and running so that we can use it to do more critical content tests.
http://www.artscouncil.org.uk/
http://www.theculturecompany.co.uk/

Having knocked about at Access Space for many years, I am acutely aware of how much redundant technology is lying around, unused or at least underused. So, I decided to try and press some of these sleeping monkeys into service in order to get more horsepower(?) for the unenviable task of post-processing.
http://access-space.org

As I keep saying, shooting is easy, and that’s the problem. I am developing ways of using old computers to post-process the hundreds of gigabytes of timelapse media that I can capture on the two-dozen or so CHDK-enabled Canon Powershot cameras that I have.
http://CHDK.wikia.com

My aim is to learn Bash-shell UNIX commands and programming on Linux-based machines so that we can create a suite of software tools to compile, scale, crop etc images files into movie files. Some of these tools may exist already, and our aim is to use what exists, and create what doesn’t.

Q. Why run Linux on a Mac?

I do not necessarily need OS X at all for my purposes, but it’s very convenient to have a mature and stable GUI on any machine. After some research and advice from Access Space, it seems that using the freely available Linux libraries gPhoto2 (for accessing the on-camera files) FFMpeg (for assembling images into movies), and (amongst others) ImageMagick for manipulating images.
http://gphoto.org/
http://ffmpeg.org/
http://www.imagemagick.org/

A. Because we’ve got some, and they’re not doing anything else.

Many of these libraries are also available for OS X Macs via the MacPorts project, and I will be doing some performance comparison tests to see which route is more efficient.
http://www.macports.org/

Q. So if I can run Shell scripts on OS X anyway, why use Linux at all?

Access Space has a very strict policy of using free, open-source and legal software. I am not as philosophically pure, but I like to remain legal. At home all my Macs run on a retail multi-license of Snow Leopard, but as far as I am aware, I cannot buy earlier versions of OS X, and in the absence of the original install disks, Linux is the only legal choice.

Actually, installing Ubuntu on a PowerMac G4 was pretty trivial, but not at first.

The first attempt was using the Debian 6.0.4 PowerPC net install image from a CD boot disk. This worked fine until reboot, and then left me with a black screen. The install seemed to have gone fine but I was unable to get it to drive the monitor correctly once the GUI started. After 4 hours of clutching at straws and unsuccessful editing of the Xorg file I decided to try another approach.

With the help of Access Space, the second attempt was much more successful, using a downloaded CD image of Ubuntu Linux 10.04 Lucid Lynx, and it worked first time. This was on a 450 Mhz PowerMac G4 with 256 Mb RAM, although it did feel a bit sluggish, probably due to the low memory.
http://cdimage.ubuntu.com/ports/releases/lucid/release/

As an additional test, I installed Ubuntu 10.10 on another G4 and then followed the upgrade path suggested by the installer to 11.04 Natty Narwhal, but this led to hundreds of error messages during install and failure to boot. So, for the time being I’m sticking to 10.04 on the PowerMac G4.

One other G4 failed to boot after install but I suspect it is a hardware error with the hard disk, rather than the software.

I also created a dual boot on my first-generation, and distinctly cranky, MacBook 1.8 Hhz Core Duo, with OS X 10.6 Snow Leopard on the Mac partition and Ubuntu 11.10  Oneiric Ocelot on the other partition. The partition was created using the Bootcamp utility and the installation was performed from a CD boot disk from Ubuntu.
http://releases.ubuntu.com/11.10/

I also installed the rEFit boot menu as detailed in this how-to guide.
http://scottlinux.com/2011/06/14/how-to-dual-boot-os-x-and-linux/

I also installed MacPorts in order to use the same libraries, but it is unreliable on this machine. I believe it is the knackered old Macbook that is the problem, and I have MacPorts working fine on other machines.

A. Macs are relatively expensive and my purpose is utility, so that I can use the Macs that I’ve got, but also press PCs into service as I stumble over them.

Phew! It’s here at last!. A promo edit of the material we captured at the Sheffield Cultural Olympiad Open Weekend 2011.

For more information about the Sheffield part in the London 2012 Olympic and Paralympic Games, please see the Lighting the Flame for Sport website.
www.sheffield-lightingtheflame.co.uk

For this event the FMTV crew was Richard Bolam, James Price, Pixelwitch JaQ, Laurence Alexander and Tara Armstrong, and the promo is a mixture of material from all the collaborators. Music by Laurence Alexander.
richardbolam.net
jamesmprice.wordpress.com
pixelwitchpictures.co.uk
laurencealexander.wordpress.com

Welcome to Flying Monkey TV, a playful, collaborative documentary film-making project by Richard Bolam and Matt Lewis, embracing the rapidly changing landscape of digital social media.

We will be going live 23 July 2011 as part of Sheffield City Council’s “By Any Means” event in Tudor Square, Sheffield UK.

We are independent media producers and have worked together on arts projects, live events and video productions since 2001. We were part of the prize-winning Electric Chaos team that won the 2 Weeks 2 Make It music promo competition in 2009.

In the meantime, check out Richard’s progress on his research & development bursary at Access Space, Sheffield, UK.
http://fmtvmissinglink.wordpress.com

Contact us on info(at)flyingmonkey.tv

Twitter: @flyingmonkeytv

facebook.com/flyingmonkeytv

oooweb.co.uk

richardbolam.net