Linux video editing and YouTube annotations

Posted by Esteban Manchado Wed, 23 Jul 2008 08:45:00 GMT

In my recent trip to Copenhagen, I recorded a small video of the subway (it’s really cool, because it’s completely automatic, it doesn’t have drivers or anything). I wanted to edit the video to remove people that were reflected on the window, so I wondered if I could do that on Linux. I imagined it wouldn’t be trivial, but it was more frustrating than I thought. Maybe I’m too old for this.

The first thing I tried was looking in APT’s cache for “video editing”. The most promising was kino. I had tried that some time ago a couple of times, and I never made it to work, but I figured I would try again. Unfortunately, same result: I just can’t figure out how to import my videos. Maybe I’m just hitting the wrong button or whatever, but it’s really frustrating.

Second thing was having a look in the internet. I found the (dead and being rewritten?) Cinelerra, as always, and I didn’t feel like installing the old one from source, only to lose my time and not get it to work, so I just ignored it. Maybe they had it in debian-multimedia and wouldn’t have been a tough install after all. Anyway.

Next thing, I found some program called openmovieeditor. This one apparently worked, but I couldn’t figure out how to crop the image (or almost any other thing for that matter).

Next, some neat program written in Python, called pitivi. When I tried to run it though, it just said Error: Icon 'misc' not present in theme on the console and died. I later figured out that I had to install gnome-icon-theme for it to work (yeah, Debian maintainer’s fault). It’s funny, because on the webpage it says that it has some “advanced view” that you can access via the “View” menu… but I couldn’t find it. My menu only had one entry: “Fullscreen”. Great.

Oh, wait, there’s a gimp-gap. I could just import my animation in Gimp, crop the frames, and convert again to video. Easier said than done. I needed some programs that I didn’t have, and I wasn’t sure if they were so easy/quick/clean to install (sure, I could have exported to GIF animation and probably convert to video, I just didn’t want to lose so much color quality in the GIF step). Forget for now. At least I had the images, so if I could just turn them into a movie…

So, I started wondering if, given that I had decided to just crop, and especially now that I had a lot of images that were the frames, maybe I could just use some command line tool or something. So I found this tiny little program, images2mpg. Long story short, after installing some dependencies from source (that gave compilation errors, but luckily I could compile only the binaries I really needed) that program was completely retarded and didn’t even do what I wanted (it wanted at least one second between images, but I didn’t want a slideshow, just a normal movie from the frames). It looks some simple and it’s so buggy. Gah.

So I started wondering if I could just crop with mplayer... Hmmm… after a couple of problems (like documented switches that were not there and other crap), I ended up with this command line:


mencoder -vf crop=320:200:0:40 MVI_2160.AVI \
         -ovc lavc -nosound -o metro-crop.avi

That was reasonably quick and easy but it was so frustrating after all that lost time.

In any case, I ended up with the video I wanted, so I went to YouTube to upload it. When uploading, I realised that there was some option I had never seen: annotations.

YouTube annotations are really cool. They are like the notes on Flickr, but on a video :-D Actually I kind of wanted to make a note like that on this video, to show the automatic doors on the Metro station, so I was really happy to see that I could actually do it. And the interface is really easy to use and very clear. I really like it! You can see the result here:

EDIT: WTF? The annotations don’t appear on the embedded videos? You’ll have to go to the video page to see them, then…

Work-related news

Posted by Esteban Manchado Tue, 22 Jul 2008 20:22:00 GMT

Some time ago, Opera announced the Opera Web Standards Curriculum project. It’s a very interesting collection of articles that can be used as “curriculum” to learn about web development. It gets extra geeks points for using a Creative Commons license for the articles themselves. Even the W3C mentioned it :-) I just found some time to have a look at it, that’s why I’m posting now :-)

The other news is that finally the Opera QA blog is online, and has the first non-hello-world-article (written by yours truly), “Continuous Integration: Team Testing”. I’m very excited about this, because it’s the first time I’ll participate directly in a company blog, and because the IT world needs more (and better) QA, so hopefully we’ll be able to spread the word and make the world a better place :-D

Frustrated by Python module management 6

Posted by Esteban Manchado Tue, 24 Jun 2008 19:28:00 GMT

I don’t really do any Python development myself, but at work I do support some automated testing infrastructure (in this particular case, I’m talking about a CruiseControl.rb installation), and some of the projects that use that infrastructure use Python. The setup is so that the tests are actually executed in the CC.rb server, so I have to have Python installed there, and it has to have some basic dependencies to be able to run the tests.

A couple of times something strange happened: suddenly, those tests would start failing with no apparent reason, and looking at the logs, it looked like some dependencies were not installed (error messages such as ImportError: No module named sqlalchemy). Of course that didn’t make any sense, because SQLAlchemy is needed for the tests and they were working like a charm for weeks. I was totally and completely confused by the error message, and I tried to install SQLAlchemy again. That solved the problem, luckily, so I decided to forget about it because it wasn’t my thing anyway.

But the problems appeared again. And again. And I got another error message that was really confusing, because it looked like Python was using some old version of some module (a version that wasn’t there anymore, because the code had been updated from SVN). So I just got tired of not knowing what was going on, and decided to investigate enough to find out the root of the problem. And I found something surprising.

What I found is that the famous python setup.py develop (that everyone told me to use) actually adds the “current directory” to the list of paths where Python searches for modules, so you can develop your module and use it from anywhere. I had heard some comment on that, but I didn’t quite get what it meant, and I don’t think the person that said it realised either.

The fun thing with setup.py develop is that when you have several branches of the same project in the same machine, and you use that to make the modules available… well, I guess that knowing which versions of which modules Python will use becomes an interesting question to say the least. I’m not saying that the way it works is necessarily wrong, but I do think it is dangerous, and people shouldn’t think of it as the “normal” way of developing modules in Python. It should be used with care.

After having realised that and thought about it a bit, I still don’t understand why those modules simply “dissappeared”, but it seems that there was some corruption of /usr/lib/python2.5/site-packages/easy_install.pth or similar (that file seems to be modified when you install packages with easy_install, and it had references to the directories I ran setup.py develop from, so that’s my main suspect for now). At least I know now that I could backup a working easy_install.pth file, and restore when we have problems again, but I’m far from happy with that “solution” ;-)

Also, I’m wondering what the hell should I do in the future to prevent more problems, because using setup.py develop sounds like a terrible idea to me. I tried to set PYTHONPATH instead, but apparently I failed. Any suggestions?

EDIT: I’m finally using PYTHONPATH. I have no idea what I tried last time, but using it was easy, quick and clean. I still have no idea why the hell Python sometimes forgets where some modules are, though.

CHDK - Canon Hacker's Development Kit

Posted by Esteban Manchado Sun, 15 Jun 2008 18:15:00 GMT

Some days ago, Arve posted a very interesting link in Twitter: Turn Your Point-and-Shoot into a Super-Camera. It was about something called CHDK (Canon Hacker’s Development Kit), which is a non-official firmware enhancement for many Canon cameras.

It sounds pretty scary, but actually it’s really safe and easy to use: you just copy some files into your memory card, and ask the camera to upgrade the firmware via some menu option. The awesome part is that it only “upgrades” a copy in memory, so if you simply turn off the camera, the next time everything is back to normal. Of course there are options to load it on startup if you’re happy with it.

The goodies: saving in RAW format, some new menu options, more information on the OSD, configurable OSD, BASIC scripting, and even games (Sokoban and Reversi). One of the features that caught my attention in the article was a special mode for motion detection, that apparently works well for making pictures of lightning strikes. And it’s actually a user-written script, how awesome is that?

I haven’t played that much with it yet, but I have tried and it works as advertised (YMMV). I can’t wait to use it more, and maybe even try some silly BASIC program.

Thanks a lot Arve! ;-)

Retarded keyboard

Posted by Esteban Manchado Wed, 11 Jun 2008 18:08:00 GMT

So, today I was working normally, and suddenly I mispress something… and I can’t switch to other desktops anymore.

First thing I think: maybe some KDE global shortcut manager or whatever went nuts, and redefined my “Switch to Desktop” keys. So I go and check the preferences, and I find that everything is alright.

So I try to redefine the shortcuts again, and I notice that according to KDE, F1 produces XF86Launch0, and the rest of my F-keys just don’t do anything. I panic, think for a moment about changing the shortcuts to Ctrl-1, Ctrl-2, etc., discard the idea because sooner or later I’ll need the F-keys anyway… and decide to reboot. But still I can’t use my F-keys.

Totally desperate, I ask on IRC and someone says “F Lock”. And I go “WTF is that?” but look at my keyboard, and see some key that is indeed labelled “F Lock”. I press it and everything goes back to normal.

Then, the person goes on to explain that Microsoft has very retarded keyboards (in particular, I was using a Microsoft Natural Keyboard) that “feature” a key called “F Lock”, that redefines the “F keys” (F1, F2, ...) to be some “useful” idiotic retarded shortcuts for Office applications or who knows what. I was also told that apparently some of those keyboards, when they boot, they are by default in “retarded mode” (mine seemed to somehow remember the setting in my last reboot, because it has never done that).

I just had to blog about this. Amazing.

Microsoft Office formats

Posted by Esteban Manchado Thu, 22 May 2008 19:51:00 GMT

I read that Office 2007 won’t support ISO’s OOXML. There are two things I find funny in there:

  1. After pushing for making OOXML a “standard format” (as in ISO), Microsoft is not implementing the standard spec after all (and won’t until some future version).
  2. Microsoft is going to support ODF (competing, open format).

Of course, they want people to use a non-standard OOXML (the one currently in Office 2007 apparently), so they aren’t really in a hurry to support ISO’s OOXML, and their ODF support will probably not be perfect, so they’re just doing the usual stuff, trying to get people to use some format that they are in a better position to support. Oh well.

I don't "git" it 3

Posted by Esteban Manchado Tue, 13 May 2008 17:03:00 GMT

I admit I don’t get it. Tons of people are using Git these days, and most of them seem incredibly happy with it. I don’t really have any relevant experience with it (just used a couple of days), but I didn’t like it that much. Feels weird, clunky and complicated (especially, the interface is horrid, but then I’m used to Darcs so I’m biased/spoilt there).

Yeah, yeah. So everyone says that Git’s power lies in the concepts it’s built on, and that they’re different from other VCS, and you have to learn all that to really “get” Git. But at the same time they admit the documentation sucks and doesn’t really help you understand it. So, to be enlightened you have to play a lot with it then. I just don’t feel like it. I’m just afraid that all that power… well, I just won’t give a shit about it, to put it bluntly. Having a quick look at the net, the arguments supporting Git seem to sound really obscure or not that life saving to me.

And yes, I realise that sounds like the Blub Paradox in Beating the averages, but I just can’t see how a revision control system can be so wonderful and make a difference for small and medium projects. I have no doubt Git does make a difference every single day for the Linux kernel, but when most (non free software) projects work “not that bad” even with a centralised VCS like Subversion, is there really any important feature that Git can add vs. any other distributed system (I’m thinking mostly Mercurial here)? Isn’t the interface going to have a much bigger impact in everyday work (and everyone seem to agree that Git’s still sucks)?

Personally, I’m looking forward to certain talk about Git, to see if it will make me see the light ;-)

Free Software rocks

Posted by Esteban Manchado Mon, 12 May 2008 21:18:00 GMT

I just read in Aaron Seigo’s blog a very nice message from a user that proves that free software is making a difference in many areas, even in some that we don’t usually think about. Some quote:

I cant tell you how much I appreciate the work you all have done. Its a work of art. If I could thank each and every one of you I would.

You have given her the world to learn and explore.

So if you get frustrated or tired in your work for Open Source/Free Software, just remember that somewhere in Missouri there is a 14 year-old girl named Hope, an A-student who runs on the track team, who is now your biggest fan and one of the newest users of Linux/Ubuntu.

Although I haven’t really participated in KDE or Ubuntu (not directly anyway), I too feel proud of what we, as a community, have created. Also, like that person, I feel very thankful for everything I have learned and got from the free software community.

Cheers guys, you all rock!

I'm blogging from my brand new OLPC!!!111oneeleven

Posted by Esteban Manchado Wed, 07 May 2008 18:04:00 GMT

I just got my OLPC. It’s sweet (and green!). I’ll take pictures and post them later…

w00t!

EDIT: And now I have Opera!

Adventures in the Internet 2

Posted by Esteban Manchado Thu, 03 Apr 2008 18:14:00 GMT

It’s kind of funny. I created a twitter account many months ago. I never really used it, because I guess I didn’t see the point or something. During all that time, several people started “following” me (in twitter jargon), even if I had no content at all, nor plans to add any.

Just today and yesterday, three people added me, so I got kind of curious, and decided to login and have a look. I made a comment just today, about me finding it funny that so many people started “following” me, and someone replied. So I started “following” other people, and reading, and I have made a couple of more comments since. I’m not really sure I’m going to use it everyday, but now I have installed a really handy Opera widget for twitter, so this might be “the start of a beautiful friendship”.

Alas, not just twitter, but I also started using eBay (and, to a certain extent, PayPal) this week. Why? Because I have been trying to find one of the greatest PlayStation 2 games ever made, Ico. It’s quite hard to get in a shop nowadays, even second hand, because it’s an old game that wasn’t very successful when it was released. Now it’s a kind of cult game that you’re better off finding in eBay or similar, hence my sudden interest in using eBay:

Note that most of that is actually while being played, not videos. It looks like a film because it doesn’t have a HUD.

I have to say that the eBay experience was satisfactory: it was really easy to find what I wanted, it was easy to bid (special mention to the automatic bidding system, which I didn’t know, that renders the old bid monkeys kind of obsolete), and I won the item, yay! For the maximum money I wanted to pay, but still. I did have a couple of really weird problems with PayPal when paying for it, but it finally worked.

Another thing that just happened to me today is that I realised (stupid me) that Skandiabanken works like a charm in Opera. It was my fault for being so nazi with the cookies.

Finally, although not a website, I’m really amazed by the new Opera Mini 4.1 beta. These guys have managed to make a really awesome browser that works in any crappy mobile phone (and that means working around stupid limitations and bugs of tons of different models). Kudos to them!

Older posts: 1 2