Lifebox: Oh my, a just released FOSS image gallery almost after my dreams!

I was searching on freshmeat for an free, open source alternative to ShareThis, AddThis and AddToAny that I could run on Universitas’ server (I found it iBegin Share), and stumbled upon Lifebox. What luck!

lifebox-screenshot.jpg

Those of you who know me (might) now that I’ve been obsessing about no web gallery software doing what’s correct and right to do. In the end, I actually found a usable image organizer for my desktop, digiKam, but the web was still without the presence of my images. I’ve got them up using ZenPhoto, but at this time they’re not public.

I’ve actually done a nasty hack in ZenPhoto in order for it to be usable for me. And I started customizing and extending django-photologue to do what I wanted, so that I might have a workable image gallery in a while.

But now I’m kinda bummed out about that, because Lifebox is here, and it is looking more of a fit than anything else I’ve ever seen. Look at this list of demands that it’s author Adam Goldberg designed it to:

  • Full resolution images
  • One photo library: every image on my computer should be available on the internet
  • Reads metadata from Lightroom, Picassa, iPhoto and other applications to allow for photo touch ups while maintaining synchronization between your desktop and photo gallery
  • Ability to rename, reorganize, and modify without structural changes on the website.
  • Image security: some pictures are meant for the public, some for family members, some for friends, and some for just me.
  • No more accounts and logging in. The site should just know who you are.
  • Completely database independent, using a db just for speed. Should something happen to the database, all data can be re-generated from reading exif tags and the existing file structure.
  • Less than 100 milisecond execution times for every page
  • 100% XHTML Valid
  • Viewers should be able to suggest titles, tags, and descriptions for images. It’s too cumbersome for one person to organize a hundred thousand photos.

It’s as if I’d written it myself. Not being a native english writer, I would’ve worded it differently — but I think he’s adressed these requirements:

  • Respect my folders, don’t try to make your own scheme
  • When I save a tag on the web save it in the picture’s IPTC keywords
  • Fast to navigate/use

There is also two more that I’d put up on my own version that Lifebox (AFAIK) doesn’t do:

  • OpenID-login, letting it gradually become part of the distributed social web
  • Allow machine tags, and use it so I can tag «Odin Hørthe Omdal» into a picture, and have that refer to «http://www.velmont.net», and ping the user about it (in this way, my profile can automatically show all pictures that I’m in from around the web, snaxy!)

But I’m eager to try this out. A big thanks to Adam Goldberg and his team! If I encounter any problems, I’ll be sure to blog about them :-)

Mail Merge database + PDF for free in Linux (w/o big overhead)

Update: go directly to solution

I’ve lost many hours of high quality chair sleep over a certain PDF-problem that I’ve been tasked to work on these last months. We’re actually trying to do something extremely easy, this list summarizes it:

  • mail merge a PDF

And that’s about it. Oh, there’s also this tiny would-be-nice requirement; it has to work.

There are proprietary solutions, they are surprisingly extremely expensive. This is something we’d do often so can’t pay us out of it. If something had a one-time cost we could easily do it. But alas.

I got a ready PDF with picture of a boat and some text from our graphics dude, and a big list of names. I was tasked to merge the boat and the list. So armed with my CSV-file and the PDF I started thinking how this could be done…

And there goes months of my life

I tried many things. First using my youth searching the intertubes for clues on how to best proceed. I was bogged down by a number of commercial tools, and the Java library iText. I found FPDF for PHP creation of PDF’s and a whole lot more. No half-easy method of doing this short of writing my own program.

I wasn’t interested in that.

I then tried the new OpenOffice 3.0 and the PDF-plugin. Put the PDF as a background and did mail merge on top of that. No such luck. The new 64bit ubuntu computer with a dogpile of RAM just died.

And so I gave up. I printed 6.000, I then lined up the fields from my CSV and did a mail merge in OpenOffice, so I put the 6.000 printed pages and put them into the printer again. Of course, we now paid for 12.000 pages, and it took a long time.

And there we go again, 30.000 this time

Just when I had finally forgotten the whole thing. … Let’s do it again! Only this time, no cheating.

I found pdftk (why didn’t I last time!?). I think I found a way. So I started making fields on the PDF’s. Then using FDF’s to fill the fields automatically. Formfiller.

So, just it’s just to write a script to make 30.000 PDF-files!

PROBLEM: Each file is easily 2 MB. That’ll be 60.000 MB. No way. It’ll take forever. The printer won’t like it, the computer won’t like it, the network won’t like it. They’ll all hate it.

So, solution; pdftk + background

I had only been reading “relevant” parts of the pdftk manual. I only saw what I wanted to see, and that was not background.

The merging I’ve been looking for was right there. And so the years I spent on this problem were finished! Here’s the procedure:

  1. Use OpenOffice to mail merge all the names just like blank pages.
  2. Export as PDF.
    You’ll get a big, blank document with names on each page.
  3. Open a terminal, and add the boat as a background to your 30.000 page PDF:
    pdftk names.pdf background boat_background.pdf output out.pdf

And there you go. The sweet deal about this, is that the background is only saved once, and referenced on all the other pages. Nice, just like I wanted.

Update: I trimmed this blog post a bit. Also, in the end I wrote a python-program that creates the PDF-to-be-merged with reportlab and does the nice pdftk-trick in the end. It went from being a full-day job to taking about 2 minutes to do a 30.000 page merge.

Quick test of 5 FOSS Linux SIP-softphones inside NAT

I want to call other computers in a open standardsbased way from WITHIN NATed networks and from anywhere. I’m researching this for my employer. It is important for us that our infrastructure is based on open standards, and secondly on free software.

Why this test?

Skype works in Linux, but it’s a very scary program with it’s own proprietary network. We can’t support that. Right now we’re using it however, because it’s reliable and works. I want to switch, but it has been hard. So that is why I’m testing. It must also work on Windows, because here is people in the organization that uses that. (However, since it’s an open standard, they don’t need the same program).

This was going to be one of those really posts were I’m really frustrated that nothing will work. Then yesterday I did more research and tried out other soft-phones than Ekiga.

Test parameters

Setting up my two SIP-accounts was easy in all clients, so not worth mentioning.

  • Calling (I’m using ekiga’s echo test: 500@ekiga.net)
  • Getting a call (520@ekiga.net)
  • General feel/stabillity/etc.

I had pictures of all the programs while I used them, but I’ve lost the pictures, so I just found some random ones on the web

So, here it goes:

Ekiga

Calling

It doesn’t work. Sadly I’ve been using hours and hours on my time on Ekiga. I thought it was the best soft-phone available.

I tried the Ekiga I got in Ubuntu Intrepid 8.10, didn’t work. So I installed the 3.0.1 version. Well, didn’t work.

Ekiga doesn’t work inside NAT, hence useless

Yate client

Calling

Doesn’t work.

I fiddled around a bit with this, found out it was trying to use /dev/dsp (what the fuck!?). I installed yate-alsa. No avail. Didn’t work, it still wanted to use OSS. So I killed PulseAudio, letting yate-gtk2 get /dev/dsp. And…

It worked!

Strangely, it seems to work with ALSA (thus PulseAudio) now. No. I put on some music, doesn’t work:

Unable to open /dev/dsp: Device or resource busy

Getting a call

It doesn’t notify me in any way. No sound, nor no notification, and no popup. Notification + sound would be the best option.

So, it doesn’t really work

But it can receive the call, and everything works (if I know the call is coming and have the client up).

General feel/stabillity

Yate-gtk2 is unusable as long as it can’t use ALSA. Also, it’s blue and ugly. That doesn’t really count high, but if there are options that work as well, it’ll be a downside with yate-gtk2.

However, YATE itself is a SIP-server, so maybe this is something I could put on my server to become part of our phone infrastructure.

Linphone

Calling

I thought it worked. But no. It can do all the hard bits, but actually sending my voice over the wire? No go. Video does not work.

Doesn’t work

General feel/stabillity

Linphone doesn’t have a very nice user interface. It looks OK in the screenshot, but configuration is a nightmare.

Empathy

Calling

It works!

Telepathy rocks! I had to install telepathy-sofiasip extra in order to get SIP, but after that it was super easy.

Video does not work. It shows up, however, if I press «send video» it hangs and drops the call.

Receiving a call

This is a truly sad story. It doesn’t work. Empathy give me a popup and flashes the tray icon when I get a call, but I’m unable to press «accept» because the windows disappears when I look at it. Or when I move my mouse towards it.

So, empathy is still unusable

General feel/stabillity

Stability is truly horrifying bad.

But. This is really the best project, they do everything correct. It is extremely smart to fork off all the networking and sending code to telepathy, so that it can be used by the whole system in a smart way. I love what they’re doing here. And I was amazed at the simplicity of Empathy, and that Telepathy in the bottom did such a great job.

I’ve big hopes for Telepathy, I hope it becomes a truly integrated part of my Ubuntu desktop.

Too bad there are still issues. (It would be nice if Pidgin could use Telepathy and get SIP-support).

QuteCom

(What!? I found my old picture using Google Images, someone else copied it and mirrored it on their site)

Calling

It works!

Video doesn’t work. It can only use h261, and spits out these error messages:

(warn) 10:53:13 [Common] virtual CodecList::VideoCodec PhApiWrapper::getVideoCodecUsed(int): unknown codec=31 H261/90000/1

Strangely, video worked yesterday. I tried removing H261 and using another video codec, but can’t do it yet. Hmm. In the screenshot I’m calling my Norwegian cellphone, it’s working! Yay!

Getting a call

This is how I like it. Ok, it doesn’t use the standard notification system (libnotify), but YES! Sound+notification where I can choose either «answer» or «hangup». Very well done!

This is actually usable.

General feel/stabillity

It uses Qt, but is actually rather nice. Not as nice as a integrated Gnome app would be, but still nice. It also has more features that the others (as far as I’ve seen). It uses libpurple to do everything Pidgin can do, so you can use it for Jabber/XMPP and MSN etc (if you use such unfree networks). That may be a plus for a few, though I prefer Pidgin that looks much better and fits nicely into my desktop.

So the winner is

QuteCom. By far. I will switch to Empathy when that time comes when it’s rocking. However, I guess the Windows-folks can use QuteCom, and also, many of my coworkers who use Linux without being really into it. It looks more like Skype.

If I can set up an XMPP server with LDAP, I can let all of them get XMPP-addresses, that would be hip, because then I could chat with them (I refuse to use MSN) and they could use it to chat inside QuteCom (or better yet Empathy when it’s ready). I’m also thinking about setting up our own SIP-server.

Proxy, our own STUN-server or anything else

I tried finding easy information to help set up a proxy. We’ve got loads of servers that can be used to proxy phone calls to help the NAT-problem, but I couldn’t really find any solutions.

But anyway, now I can start testing SIP inside the organization. Then maybe we can move away from Skype, and move to QuteCom. I look forward to it.

Supporting Pirate Bay, free culture, free software and generally freedom

And how could you not be pro free culture? Free is of course like Norwegain «fri», as in freedom, not «gratis». The people who are opposed it are either:

  • stupid, or
  • ostensibly rich because of the copyright system

By stupid I mean no harm. These people are controlled by their fear and doesn’t trust that we as humans are so interested in culture that we don’t need to pay billionaires our hard earned money to produce it. We’ll get more culture, we’ll get better culture. Luckily, these people are in the minority and they are being converted.

It will not be impossible to make money on culture, it will probably just get fairer and more interesting. It will benefit all of us, but sadly (oh well, luckily!) the big companies will get less to say.

The ongoing trail in Sweden against The Pirate Bay is particulary funny to follow. We really see how incredible stupid the people opposing free culture are. This quote from day 7 is just one of a whole slew of similar quotes and errors:

Gottfrid: But since you had DHT on, you have no possibility to state to the court as to whether The Pirate Bay’s tracker was actually used or not?

Mårtensson: No.

Funny! They don’t know shit. Anything. They’ve got no case. I’m totally astounded that they dare showing up against something they don’t know how works.

And let’s finish of with a beautiful drawing:

The internet is scary, it will kill music and film

And two good coments on digg, first;

I can’t believe that guys has worked in anti-piracy for 15 years, but he can’t take 2 hours to read wikipedia and learn how bittorrent works. It’s ridiculous.

The only thing this trial is going to do is bring to light just how detached from reality these groups are.

And second:

The funniest part about that is that while the IFPI lawyers have tried to portray TPB as a bunch of smarmy malcontents intent on facilitating the theft of billions from legitimate businesses – and being unrepentant about it – they’ve managed to show the defense, the judge, and the rest of the world how truly out of touch and despotic they have become.

Using fonts with InDesign and Wine (or other places you need many fonts)

Norsk Målungdom just got a new beefy computer to make the member paper. Norsk Målungdom (Norwegian Language youth) fight for the Norwegian language, as most people (90%) write Danish-Norwegian and not real Norwegian.

When the computer came I kinda laughed because they wanted to run Windows on it, but Windows can’t use the loads of RAM that they’d bought for it. And Windows isn’t really good at using those 4 cores either. So I suggested Ubuntu Linux 8.10 Intrepid, as I knew InDesign 2.0 (which they are using) would run with a gold standard in Wine.

Non-truetype fonts, type1, oft, pfb et al

However, fonts+wine did not go so well together. Wine only supports ttf-fonts (or at least not Type1 / pfb pfm), so I had to convert them to TrueType (ttf) using FontForge. This has already been done by others.

Windows only supports a fixed set of TTF-font variants

When opening InDesign, some fonts were missing. Like Conga Brava Regular, or ITC Stone Sans Bold. This was of course not tolerable, so my good friend Leif Arne tried to fix it. However, he ran out of time, and so I had to try.

We saw that some of the font-variants came through, italic, regular, light, condensed, bold, black, semibold. But there was never really more than 4 options, or less. So it didn’t look OK. And I came to remember a limit in Windows from the old days; it cannot have more than 4 variants.

So, since the fonts were Type1 in Windows (which Wine doesn’t support), but TrueType in Wine, we met the limit, and the font’s didn’t show up. Luckily, I found a way to work around the problem: giving them new names!

The solution: how to make Wine see all the TrueType fonts

OK. You’ve already converted your Type1 fonts into TrueType in FontForge like this:

  1. Open the font in FontForge
  2. Go to File -> Generate Fonts
  3. Choose TrueType and save, ignore the errors (if they are not fatal)

But now only some fonts show up in your Wine program (like InDesign). So, we have to make a new name for the font versions that don’t show up.

Say you use Stone Serif Regular, Semibold and Semibold Italic. But you only have Bold, Italic, and Black (named completely wrong as well). So, remove the files that don’t show up from your ~/.fonts/ folder (or whereever you keep them).

  1. Open the fonts in FontForge
  2. Go to Element -> Font Info…
  3. Change Fontname, Family Name and Name for Humans to your alternative name

I just added “Od” inside the name. So for Silentium Pro (version RomanI) that would’ve been:

  • SilentiumProOd-RomanI
  • Silentium Pro Od
  • Silentium Pro Od RomanI

That’s all, work away in wine/InDesign!

Of course, I want to get them over to Scribus instead of InDesign, but one step at a time!

I hope that you’ll comment on this entry if you had the same problem and this helped you. I didn’t find any information when I searched for it. This could’ve saved me a full day of frustration. I’m thinking about writing down such errors, so that it may be easier to search for them.

I want to make something for Lumiera workflow

For a long time I’ve been meaning to make a mock-up screencast of the Lumiera (the new non linear video editor for GNU/Linux) workflow. However, I haven’t really tried for real yet – just tought a lot about it.

I’ve edited much of my life, I started when I was still at the first school you go to. I don’t remember age, but somewhere around 7-9 years old. Over the ages I’ve become faster and more steady when it comes to editing movies. I’ve never liked the Cinelerra-method of editing though, with two different “modes”. Edit-mode and Move-mode (or whatever they’re called). I want to have tools mapped onto the keyboard, as that is much more effective in my mind. It is also a hell of a lot easier to learn and understand. Much of Cinelerra’s problem with me (except for the crashy-crashy behaviour) is that it has a strange method of editing.

When Lumiera gets usable, it’ll be mostly used by people who has not used Cinelerra before. That is why I’m rather sceptic to making it behave almost like Cinelerra. I know there are many people who use Cinelerra, but most use Final Cut Pro, Premiere, Avid or Vegas. And I also guess that we’ll see a lot of people who are not pro editors who want to use Lumiera for their projects.

Ok, I’m not so very concerned about these newbies; I want Lumiera to be my work tool, and I thus want it to be as effective as possible. This is how I often edit after using the normal two-screen to get a rough edit

Quick and dirty overview over my video editing workflow

I do trimming, splicing, moving and generally enhancing my edit. All of this is fast and I do it with one hand on the keyboard and one on the mouse:

I press «r» for Roll, press one corner and move it in, — the clip gets shorter, but the movie follows along from the back (so there is no gap). This is my most used tool, it can also be used in reverse, — then it lengthens the clip, showing more of it and pushing the other edits behind it further to the right. This makes the full movie longer.

When all of the clips are in the rhythm (so that it looks smooth and nice) I use the other roll-tool ­«r r» which doesn’t alter the length of the clip, but only what segment of the clip is shown.

I press «s» for Split, splitting the clip in two. This is a move I do remarkably often, and it frustrates me how hard this is in Cinelerra. Lumiera must not be the same. I sometimes split a clip, then i «r r» it (changing the time things is shown), making it jump in time. A jumpcut. It works perfectly for editing video to music, hip-hop-ishly.

Well, that’s why I want to make a video of it

It’s hard to explain it with words, it would be so much easier to show it with a screencast. Now that I’ve publicized my intentions, I guess it will be easier for me to just start doing it, and not wait around anymore.

I want Lumiera to be the best! :D

Cinelerra crash and burn, sadly without sound

I started importing some video from my Nikon D90 the 14th December. I did some filming the day before with my beautiful girlfriend. I was bothering her taking video all the time. And so I wanted to test Cinelerra some more, I actually feel I can make videos in it, my last trial went very well so I was really into it. Now, a whole decade later (4 days) I still haven’t finished it.

This is due to a common fault in Cinelerra known as “crash”. It happens all the time. Often I press play, and the program deadlocks (or something) and I’m not able to gain control over it again. It just continues to move the cursor without updating the video nor doing anything else useful. Really horrible. That is, as far as I know, the reason why the excellent project Lumiera was created. Oh, the video editor will be excellent – but right now it’s only the non-working extremely pre-alpha project that is excellent.

Anyway, I’ve tried on and off with different settings, including the famous “Avoid alsa lockups”. … No, I checked it “Stop playback locks up”. No avail. Still no sound (sometimes) and still crashy buggy existence. I may be able to do a few operations on the video before it crashes yet again, but it’s not really effective working like that.

I so want to be able to work effectively with video on Linux; but it isn’t easy. I intend to try out OpenMovieEditor, as it looks quite capable and good. The developer, Richard Spindler, is very cool at least. I respect him a lot. I tried it once before, I couldn’t really use it. But at that time I also said I couldn’t use Cinelerra, and went quickly back to my Mac and Final Cut Pro. Anyway, it seems OpenMovieEditor has come a long way the last year.

Anyway, I don’t really think OME will do it for me, I’ve heard so little talk about it. I’m open, but I still feel that professional video editing in Linux is a sad story.

Maybe you’ll see my test video some day. It’s not good at all, it’s only testing using a DSLR for more “unplanned family excursions” type videography.

Open source distributed social web, to take over from Facebook etc

I’ve been extremely interested in the distributed social web. I’m not a member of Facebook, and I don’t like their walled garden at all. I want to be able to own my own information and I want to customize and add friends from all over without using proprietary systems.

That’s the reason why I support (and use) identica instead of Twitter. identi.ca is not only a new microblogging site, but it implements the OpenMicroBlogging-standard so that you can add friends and follow them from other microblogging-sites as well. Great! Whilst sites like Twitter and Facebook keep your friends as hostages, making it hard for you to leave for better/cooler/free-er services.

Anyway, I’ve been very interested in an Open Source distributed (well, actually it doesn’t have to be distributed either) app I can install on my web server to host my pictures. It has to support tagging of the pictures and be web 2.0-certified.

Right now these big social networks doesn’t really fit the bill for me. I’ve been looking at noserub, which is a protocol for a distributed social web, plus an example application that aggregates information about your friends. Kinda lean, but it doesn’t host my pictures although it may be the route to make such an application distributed. There is also the diso-project which aims to do something similar, but implementing a set of plugins for WordPress so that it can act as your «page» in the social web. All this is extremely interesting, and Ive found pixelsbi’s web site to be a very good resource.

He’s talking about the distributed social web and OpenID, very worth subscribing to if you are interested in these matters. A few good posts you should read:

He also has a screencast describing what a distributed social network could be, I linked that to readwriteweb that also has some more text around distributed social networking.

So… All of this I already knew (for a day or two). But earlier today, I started to find these open source networks I talked about. I don’t know how distributed they are, but that should be possible being that they are free as in freedom. So right now I’m looking at three social networks (there are many more):

Of those, I think Elgg looks most promising. I want to rip it down, because I’m really only interested in having myself on it. Everyone else can use their own home page as their «profile» or use a bigger site. Maybe I can set up one of these on my server for other people if they seem to be of interest. I’ll look into it.

I hope I’m able to at least pull out the Gallery-component from one of them and make a really good open source flickr-like application. That would be nice.

The only usable photo organizer for Linux is: digiKam

I take a lot of pictures/photos/images (I’m a bit unclear on the difference) and I need to organize them. I’ve tested the programs that looks fit for the purpose, but it’s always clear that digiKam is the only GPL’d program up to the job.

What I need from a photo organizer

  • Blazingly fast (I’ve got 24.000+ photos right now)
  • Easy tagging (digiKam isn’t perfect here)
  • Good search
  • Sensible directory structure that I can control
  • Store meta information inside IPTC and XMP (when I tag something, I don’t want it to be in a stupid database, I want everyone to be able to use it)
  • Fast easy trashing/deleting, I often browse through thousands of pictures and delete ¾ of them. I only linger ½ a second on each photo and hate when the program is too slow to keep up.

Pretty standard features, yes? Well, I found digiKam is the only program to provide this.

Too bad that the Ubuntu version I’m using (in Intrepid Ibex, Ubuntu 8.10) has a few “problems”:

  • Looks ugly (that’s Qt for you – looks tacky and cheap)
  • Pulls in kdelibs, yuck
  • Pulls in Kmail, Dolphin and a load of other crap that I do not want
  • No keyboardshortcut for tagging, so I have to use the mouse for such a basic function

But anyway. digiKam is still the best photo organizer for Linux.

Musings about video, html, tech and linux