Simple video backdrop with Quartz Composer

While playing with Quartz Composer, the only composition I made with a clear intention of using it was this one:

As you can see, it’s just my band‘s logo, subtly glowing (or breathing, as you wish). It’s a simple but effective animated stage backdrop. I haven’t used it in any of our concert, but next time a video projector is present on stage, I will ! :)

As usual, here is the source composition, and a preview of the patch:

Flame & Snow, using Quartz Composer particle system

After creating a series of compositions based on my kaleidoscopic patch, I played with Quartz Composer’s particle system, to create a flame and falling snow flakes:

As for the last times, both Flame and Snow source compositions are available. Flame’s patch looks like this:

And here is Snow’s patch preview:

Sharp scan-lines & Squared lava-lamp

Here are 2 new Quartz Composer compositions. Both of them are based on the same kaleidoscope patch from my last post, but are processed before the final rendering. This gives some interesting visual effects that are quite distant to the original kaleidoscopes.

As usual, sources of this Sharp scan-lines composition are provided. And for information, its patch looks like this:

Again, you can download the Squared lava-lamp source, and here is preview of its patch:

Export Quartz Composer to video

Quartz Composer is a really nice piece of software for visualists. It allows you to create animated and/or interactive compositions mixing sounds, images, effects, user inputs and any other kind of data. In fact, Quartz Composer was the main reason I bought a MacBook Pro 18 months ago.

The first composition I created was this simple kaleidoscopic effect with shifting colors:

The source composition is available under a Creative Commons 3.0 BY-SA license. And here is the screenshot of the main patch:

And this is how I designed the color wheel sub-patch:

If creating a composition is really simple and straightforward, exporting the result to a video file is another story…

I first tried the Export to Movie v1.3b plugin. But it didn’t worked on my Snow Leopard, throwing me this exception every time:

0x8272938b: -[QCContext renderPatch:time:arguments:]
0x8272906d: -[QCGraphicsContext renderPatch:time:arguments:]
0x827281bb: -[QCOpenGLContext renderPatch:time:arguments:]
0x0000d873
0x8276495b: -[QCView render:arguments:]
0x82763f68: -[QCView startRendering:]
0x0000cd80
0x8548584e: _nsnote_callback
0x81ccda90: __CFXNotificationPost
0x81cba008: _CFXNotificationPostNotification
0x8547c7b8: -[NSNotificationCenter postNotificationName:object:userInfo:]
0x86da2f5f: -[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:]
0x86da2bbe: -[NSWindow orderWindow:relativeTo:]
0x86da0544: -[NSWindow makeKeyAndOrderFront:]
0x86fa55c1: -[NSWindowController showWindow:]
0x0000ca7f
0x873461d3: -[NSToolbarButton sendAction:to:]
0x86fb73c1: -[NSToolbarItemViewer mouseDown:]
0x86ea4763: -[NSWindow sendEvent:]
0x86dd9ee2: -[NSApplication sendEvent:]
0x0000a994
0x86d70922: -[NSApplication run]
0x00001d2b

So I tried the old trick of importing compositions in iMovie. If this was possible in the past with iMovie ’06, Apple removed this feature in iMovie ’09.

My last chance was another plugin: Movie Exporter (v0.0.20091011). As the other one, you have to drop your original composition in a Render in Image macro block and export the resulting stream to the Movie Exporter block:

It did the trick but it looked like I messed things up: my goal was to export a 720p clip. But compression artifacts are so present in the final video that I think the exported images are blow-ups of a rendering executed at a much lower resolution. The rendering in the preview panel support this hypothesis:

Another big problem with this video export lies in the framerate: it cannot be set. For this composition the plugin exported a clip at 11fps. Which is far from fluid. I guess it’s because of the plugin grabbing images in real-time instead of taking the necessary time to render them one by one.

At the end, because of the reduced number of options available to export QC’s compositions to movies, and because of the proprietary nature of the platform, I don’t want to invest more time and energy in Quartz Composer.

I did some more experiments with it last year. I plan to share them with you and published them in the coming weeks. Then I’ll be free to sell my Apple machine and switch back to a full Open-Source stack (I’m thinking of Processing, PureData and their derivates here).

Making of “Info TGV” Android app video

Featured

Last week I was called by one of my co-worker from Uperto (the open-source division of Devoteam). He knew I worked on some video projects for my band, so he asked me if I wanted to help him create one. The video was meant to be released 5 days later, so we clearly were in a hurry. However this was a great oportunity to play with my Canon EOS 7D, so I accepted ! :)

The goal of the video was to show off an Android application we made, for a contest organized by SNCF (the french national railroad). The application, that we simply named Info TGV, is designed to centralize informations for on-board staff. This application will give train personnel better insights when delays or other kind of traffic perturbations arise.

Here is the final video we managed to create:

Now let’s talk about what happened behind the scenes ! :)

Shooting

In all of my projects, I want to use free and open-source software, and push their usage for every step of the creation workflow. For video recording, there is no open-source firmware for the 7D. Sadly, the Magic Lantern community seems to have reached a dead-end regarding 7D support. I’m quite sad as I choosed the 7D a year ago for 2 things: its video capabilities and the potential hackability of this camera (extrapolating Magic Lantern’s success on the 5D Mark II). But this doesn’t stop me to get usable footages. Far from it.

For this video, I choose to use my Sigma 30mm f/1.4 lens as it’s the fastest lens I have today. I wanted to reduce the depth of field as much as I can to emphasize the screen of the HTC Desire, as all the important “action” takes place in the plane of the phone’s screen.

So I set my 7D to record in 1080p at 25 fps, open the lens at f/1.4 and set the shutter speed to a traditional 1/50s. I then set the ISO to 160 (which is the lowest native ISO value available on the 7D). Still, the final image was over-exposed so I attached a variable ND-filter to the lens and tuned it until I had an acceptable result. I finally customized the white balance to match the ambient light temperature.

Here is a snapshot of this first test on my Samsung Galaxy S (notice the strong vignetting created by the ND-filter):

Here is how this first test setup looked like:

All these parameters were calibrated for an afternoon shooting session, but we really started to record in the evening (look at the phone’s clock in the video!). Because of this delay, I lost the white stripe of natural light coming from the top of the background. At the last minute, I started to play with the white balance. Then I changed my mind and removed the ND-filter. And closed the lens to f/3.5 to get a more manageable depth of field. In a word, I messed up all my initial settings resulting in a final video looking worse (in my opinion) compared to my first test. The better is the enemy of the good

But there is something I’m quite happy with from my last minute changes: dimming the phone’s screen brightness. Phone screens are so powerful nowadays that they create clipped highlights, thus reducing the readability of black characters on white background.

Here is a photo of the final setup, in which I marked the focus plan with black electric tape:

As you can see in the final video, I have some aliasing issues due to the pixelated nature of the phone’s screen and the line skipping happening on 7D’s CMOS sensor. I tried to reduce the aliasing by moving the phone to a distance were the natural softness of the Sigma lens will occur. I didn’t really succeed as it’s really hard to maintain a constant distance to the lens while holding the phone by hand.

Yes, I could have tried to put the phone on a stand but I really wanted to show the app on a real phone, into real hands, as to make it clear there was no special effects or compositing in action. The application is real, it’s running on bare metal, it’s not a mockup, showing that Uperto has tough engineers getting things done ! ;)

By the way, about hands: there a trick involved here. The left hand is mine, but the right one is my co-worker’s. There was a big advantage using this technic: with an eye on the 7D’s rear LCD monitor, I can fully concentrate on the image and micro-adjust the distance of the phone to the lens. In the same time, my co-worker can focus (pardon the pun) on the action and follow the script. The only time when you can see my right hand is when I take the Acer Liquid E to demonstrate the propagation of messages via Twitter:

Video editing

For video editing, I knew I’ll not be able to manipulate my 7D’s files natively. At least not with the default packages bundled with my Kubuntu 10.04. So monday morning I started to compile the trunk version of x264, FFmpeg and MLT. Then I realized a brand new version of Kdenlive (v0.7.8) was released. How did I missed such an important news about my favorite NLE ? :) Compliments must go to the Kdenlive team for providing up to date packages and all their dependencies !

So I did the entire video editing with Kdenlive. Here is what the final project looks like in the timeline:

Inter-title cards were created from scratch with Gimp:

Audio

Let’s talk audio now. I personally want to thanks Tomasito, Cool Cavemen’s saxophonist, who lends me his Shure Beta57A microphone and his Line 6 POD Studio UX1 interface for this project. With electrical tape, I attached the microphone on my Gorillapod, which serves as a mic stand. I used this setup to record Arnaud’s voice:

I wanted to record the speach on my linux machine but I didn’t managed to compile the Line 6 open-source drivers. In fact the module compiled but refused to load:

Sep 20 22:02:47 kev-laptop kernel: [  717.905187] line6usb: Unknown symbol snd_rawmidi_receive
Sep 20 22:02:47 kev-laptop kernel: [  717.905321] line6usb: disagrees about version of symbol snd_ctl_add
Sep 20 22:02:47 kev-laptop kernel: [  717.905323] line6usb: Unknown symbol snd_ctl_add
Sep 20 22:02:47 kev-laptop kernel: [  717.905379] line6usb: disagrees about version of symbol snd_pcm_new
Sep 20 22:02:47 kev-laptop kernel: [  717.905380] line6usb: Unknown symbol snd_pcm_new
Sep 20 22:02:47 kev-laptop kernel: [  717.905439] line6usb: disagrees about version of symbol snd_card_register
Sep 20 22:02:47 kev-laptop kernel: [  717.905440] line6usb: Unknown symbol snd_card_register
Sep 20 22:02:47 kev-laptop kernel: [  717.905498] line6usb: disagrees about version of symbol snd_card_free
Sep 20 22:02:47 kev-laptop kernel: [  717.905499] line6usb: Unknown symbol snd_card_free
Sep 20 22:02:47 kev-laptop kernel: [  717.905557] line6usb: disagrees about version of symbol snd_pcm_lib_preallocate_pages_for_all
Sep 20 22:02:47 kev-laptop kernel: [  717.905559] line6usb: Unknown symbol snd_pcm_lib_preallocate_pages_for_all
Sep 20 22:02:47 kev-laptop kernel: [  717.905667] line6usb: disagrees about version of symbol snd_pcm_stop
Sep 20 22:02:47 kev-laptop kernel: [  717.905668] line6usb: Unknown symbol snd_pcm_stop
Sep 20 22:02:47 kev-laptop kernel: [  717.905917] line6usb: disagrees about version of symbol snd_ctl_new1
Sep 20 22:02:47 kev-laptop kernel: [  717.905918] line6usb: Unknown symbol snd_ctl_new1
Sep 20 22:02:47 kev-laptop kernel: [  717.906043] line6usb: Unknown symbol snd_rawmidi_transmit_ack
Sep 20 22:02:47 kev-laptop kernel: [  717.906261] line6usb: disagrees about version of symbol snd_pcm_hw_constraint_ratdens
Sep 20 22:02:47 kev-laptop kernel: [  717.906262] line6usb: Unknown symbol snd_pcm_hw_constraint_ratdens
Sep 20 22:02:47 kev-laptop kernel: [  717.906379] line6usb: disagrees about version of symbol snd_pcm_lib_malloc_pages
Sep 20 22:02:47 kev-laptop kernel: [  717.906381] line6usb: Unknown symbol snd_pcm_lib_malloc_pages
Sep 20 22:02:47 kev-laptop kernel: [  717.906437] line6usb: disagrees about version of symbol snd_pcm_lib_ioctl
Sep 20 22:02:47 kev-laptop kernel: [  717.906439] line6usb: Unknown symbol snd_pcm_lib_ioctl
Sep 20 22:02:47 kev-laptop kernel: [  717.906546] line6usb: disagrees about version of symbol snd_pcm_lib_free_pages
Sep 20 22:02:47 kev-laptop kernel: [  717.906547] line6usb: Unknown symbol snd_pcm_lib_free_pages
Sep 20 22:02:47 kev-laptop kernel: [  717.906617] line6usb: Unknown symbol snd_rawmidi_transmit_peek
Sep 20 22:02:47 kev-laptop kernel: [  717.906771] line6usb: disagrees about version of symbol snd_pcm_set_ops
Sep 20 22:02:47 kev-laptop kernel: [  717.906773] line6usb: Unknown symbol snd_pcm_set_ops
Sep 20 22:02:47 kev-laptop kernel: [  717.906963] line6usb: disagrees about version of symbol snd_pcm_suspend_all
Sep 20 22:02:47 kev-laptop kernel: [  717.906965] line6usb: Unknown symbol snd_pcm_suspend_all
Sep 20 22:02:47 kev-laptop kernel: [  717.907035] line6usb: Unknown symbol snd_rawmidi_new
Sep 20 22:02:47 kev-laptop kernel: [  717.907095] line6usb: disagrees about version of symbol snd_card_disconnect
Sep 20 22:02:47 kev-laptop kernel: [  717.907097] line6usb: Unknown symbol snd_card_disconnect
Sep 20 22:02:47 kev-laptop kernel: [  717.907230] line6usb: Unknown symbol snd_rawmidi_set_ops
Sep 20 22:02:47 kev-laptop kernel: [  717.907413] line6usb: disagrees about version of symbol snd_card_create
Sep 20 22:02:47 kev-laptop kernel: [  717.907414] line6usb: Unknown symbol snd_card_create
Sep 20 22:02:47 kev-laptop kernel: [  717.907474] line6usb: disagrees about version of symbol snd_pcm_period_elapsed
Sep 20 22:02:47 kev-laptop kernel: [  717.907475] line6usb: Unknown symbol snd_pcm_period_elapsed

Against my will, and to not waste time, I resigned myself to use a Windows machine lying around the office. I installed Audacity and the Windows drivers, then plugged the pod. And voilĂ , I had a portable recording studio.

Again, as we were in a hurry, we didn’t paid close attention to the way Arnaud was speaking in the mic. Thus the quality of the original take was not fantastic. To me it was good enough for the intended purpose.

When I gave the raw recording to Thomas for mixing, he didn’t take long for him to realize how bad we were at recording ! Even without knowing how we proceed to record and what the setup looked like, he pointed out all the stuff we did wrong. I know him for a long time now, but he still amaze me with his technical and practical knowledge about audio stuff. I really want to thanks him for his help on this project !

By the way, if you’re looking to record/mix/master any audio material (from a simple voice-over to a full band), I really recommend you to contact his studio. And tell him you heard of him by reading my blog, he may give you a discount ! ;)

Epilogue

As I concentrated all my efforts towards the creation of the video, I don’t have many details about the application development itself. But coding the android app was, without a doubt, the biggest chunk of work of this project. It involves two of our best Andoid developpers (Jeremy and Paul) and our in-house Photoshop geek for the design. The project was lead by Arnaud.

The whole project was completed in no time and virtually no budget thanks to the dedication and effort of Uperto’s staff. Everybody in Uperto, from management to developpers, was fantastic. It really makes this team unique.

This project was a great oportunity for me to test my video skills. In a sense, it was my first professionnal assignment: I had a limited time, an inflexible deadline and a clear goal. But still, this type of activity falls into my hobby category. I have so much things to learn…

This project is also the first time I edit 1080p footage from my 7D in Kdenlive. This doesn’t mean it’s the first time I shoot with my 7D. In fact I shoot videos in various formats and setup for about a year. But my shooting skills only starts to be acceptable. My other projects involving 7D footages are currently on hold for various reasons (mostly more important stuff to do). That’s why I hadn’t published anything on the web since then. But I expect this situation to change soon ! :D