FOSS Mobile Video Editing for the Nokia N9

I’ve been saving this post for a while until it got accepted and published but the time has come…

VideoEditor, an open source touchscreen video editor app for the Nokia N9/N950, is now available on Ovi Store for the grand price of [currency] 0!

It has been developed in an open way from the beginning and the full source code is available on github. Awesome.

The Story

Towards the end of working on the Harmattan Meego platform (camera and general multimedia middleware) earlier this year, Nokia were very kind to propose developers use their idle hours to take part in an internal app development competition, the results of which are the participants’ responsibility.

The goal of the competition was for us remaining developers to work on something we felt really motivated to do that could be completed in 4-6 weeks.

An idea was put forward to develop an app to apply effects to videos but I felt we needed a solid video editing app for the platform before that would be a realistic or interesting consideration. Also, I thought a polished tool would be more interesting than a face-contorting, moustache-overlaying, sepia-toning toy. Well… or at least should have higher priority. :)

A fellow Collaboran also working on the same Nokia team, Thiago Sousa Santos, and myself chose to develop the video editor that we and others had wanted for the platform all along. Or at least as much as we could in about 4-6 weeks. :)

Both of us were working on the middleware so we were familiar with the excellent underlying software APIs, without which the app would not have been doable in such a short time. Praise be to:

GStreamer Editing Services was the real godsend. It’s the culmination of years of effort by many contributors but primarily Edward Hervey. Nokia wanted to have video editing capability on the platform and funded the development of GES. Indeed there is some trimming support in the media options for individual video clips in the Gallery and Video apps even without this new VideoEditor app.

In short, check out GStreamer and GES. Thanks to Nokia for funding the GES work and proposing the app competition, Collabora for being an awesome company for whom to work, Edward for everything he does for GStreamer, gnonlin, PiTiVi, GES…, Thiago Sousa Santos and everyone else involved helping us to figure out how to write QML apps with some weird C++ interaction and not-directly-supported widget use.

It will have bugs, but we got it working reasonably well. If you spot bugs, please report them and contribute to the project on github. Have fun!


Lenovo T520 and Déjà Dup

Collabora, the wonderful company that they are, have allowed me a laptop upgrade after a couple of years of working there. The Lenovo X200s that served me so well while travelling back and forth between England and Sweden regularly during my early Collabora Multimedia days was starting to show its age with its Intel Core 2 Duo vPro 1.8GHz CPU.

The new laptop is a Lenovo T520, a 15.6” 1080p, quad core Intel Core i7 2.4GHz (turbo up to 3.5GHz) hyperthreaded sandybridge behemoth. It flies. It’s awesome to work on, even moreso as Collabora got an OCZ Vertex 2E SSD for me a while ago (which had to be replaced via OCZ RMA after 3 months… daily backups are a must if you do anything vaguely important).

The T520 model I have comes with both sandybridge integrated graphics and NVIDIA discrete graphics (NVS 4200M). I used the integrated graphics for some time and it works fine in Fedora 16 and anything else thrown at it, with one exception. There’s a known issue in the driver of tearing when playing back videos despite supposedly being always vsynced.

I had always planned to set up the discrete NVIDIA graphics drivers so I could switch in the BIOS (well, EFI, whatever) as I pleased and as needed. I tried and tried and tried to get the drivers working last night but after installing the akmod-nvidia package in Fedora 16, it would no longer boot, even after switching back to integrated graphics in the BIOS. Weird. I failed after attempting to fix the startup error (“[drm:ironlake_update_pch_refclk] *ERROR* enabling SSC on PCH” was not the real error but was the last thing in dmesg - peculiar as modesetting should have been disabled) and couldn’t find any solutions from anyone else so gave up, reinstalled as I need to work on this machine and commenced trying to restore from backups which I had been making nightly with an external drive and Déjà Dup.

Unfortunately, when trying to conduct a full restoration, Déjà Dup fails citing that there is not enough space at the target path. That is complete crap. It could be that there is not enough space on /tmp, but that feels like some kind of poor design if one can back something up on some machine but not restore it.

Maybe using duplicity directly can do better, it has a —tempdir option! Alas, no. It seems to still hit a no space left error. I had to hack duplicity code a little to use the proper tempdir to be able to do a full restoration. It seems the offending portion of the backup was a large VM image that had been stored as diffs and so took up lots of space with the incremental reconstruction.


Nokia N9

Collabora Ltd, my employer for the past few years, was kind enough to give every employee the option of a Nokia N9 as a sort of Christmas bonus.

Two years ago Collabora gifted Nokia N900s to employees and the microphone in mine had just ceased to function so the new N9 was a very welcome replacement.

A number of us at Collabora have been working on MeeGo and Maemo before it though I myself am a relative newcomer having worked on the camera software since February 2011. I’m certainly proud to have worked on the N9 as it is a solid and well-performing phone despite still being a single core ARM Cortex-A8.

The user interface follows an interaction method Nokia have dubbed ‘swipe’. The name tells all - most interaction methods for moving between screens and applications involve swipes from an edge of the screen. It’s very simple and works well to traverse the environment.

There are three screens on a virtual carousel - an application grid common to most mobile phones, an open tasks grid with thumbnail tiles and a feed of updates from various sources (Facebook, Twitter, etc.). You can read more in reviews or have a look at some videos if you wish.

With the N900, honestly I didn’t feel comfortable using it too much as it was quite slow to do lots of things, especially web browsing. Browsing on the N9 is smooth and fast. As such, I now have some mobile internet allowance on a contract so I’m sure I’ll be playing around with connected programs much more on the N9.

One very nice feature on the phone when moving from the N900 was that I could transfer all my contacts and calendar and some other things via bluetooth. It would have been super nice if I could have also transferred photos, music, old conversations and more, but just the simplicity and capability to transfer contacts is awesome.

Scrolling is silky smooth, the camera is fast and high quality for both still images and video, call quality seems pretty good but I haven’t spoken to anyone with a newer phone yet to be able to tell properly, the interface is shiny and simple, the hardware is spot on in terms of size and the screen is beautiful. Battery life is very good, though will obviously diminish more quickly if you’re playing 3D games or so. Integration with web services seems pretty good though I want to see if I can make it automatically upload photos to Google Picasa, Flickr or so. It can act as a wifi hotspot. The maps app is slow to start but locks onto my location quickly and allows one to download maps for offline/minimal mobile bandwidth use which is a huge plus when travelling. There’s even a digital compass built in, though I would be interested to test its accuracy.

The only weakness I see so far is the limited number of interesting apps available. It has Angry Birds, Need for Speed: Shift, Solitaire, sudoku and some other games I haven’t yet tried.

My personal verdict, with the current PR1.1 release of the software is that it is a beautiful, solid and well-connected phone that I will certainly enjoy using and as a consequence will see far more use. Also, if the N900 is anything to go by and if any more updates make it out of the door, the phone will improve further with time. :)


GStreamer - deinterlacing and inverse telecine

Here is a video of me talking about a deinterlacing/inverse telecine experiment I worked on for GStreamer, funded by Collabora Multimedia, at the 2011 GStreamer Conference in Prague. Other videos from the conference are here.


Xorg/Gnome 3 on high DPI screens

After reading around a bit trying to figure out what I should do about high DPI with a new laptop I’ll soon be receiving, it has become clear that resolution independence in Linux/Xorg/Gnome is a very (un)popular topic.

I heard a while ago that Apple had implemented resolution independent display in OS X and probably in iOS too [citation needed] and wondered if such a thing existed in the FOSS world. It seems many have tried and failed.

It boils down to:

  • people expect different behaviours with their screens
  • information reported by hardware is too unreliable to come up with any good solution

The semantics of resolution in the computer world have been twisted away from the real meaning to being more related to what one should associate with physical dimensions - how much one can fit on the screen.

I think the only reason Apple can do it is because, once again, they control/have dominion over the entire chain and can make it happen.

For all the discussion from people who actually know this stuff rather than a guy who just read the articles and felt like posting about it, see here.

Currently, in Fedora 16 with Gnome 3, Xorg hard-codes 96dpi regardless of what your screen/driver report. One can adjust for this, if one wants, by calculating:

<scale factor> = <monitor dpi> / 96.0

And then adjusting the gsetting setting:

gsettings set org.gnome.desktop.interface text-scaling-factor <scale factor>

I did this on my current 1280x800 260mm x 160mm Lenovo X200s screen and text seemed a bit too large for my taste. Clearly I have been indoctrinated by demons. Therefore, I will take people-in-the-know’s advice and ignore DPI but adjust to my taste.

There is still one problem with this unfortunately. I have a 23” 1080p external screen and will soon have a 15.6” 1080p laptop screen. Maybe the difference in DPI will screw me over a bit. I expect so. Oh well.

Also, here’s a Firefox addon - NoSquint - to adjust the default zoom level for all pages.