My pretty face [ László Monda's Blog ]
Exploring the cyberspace, one quadrant at a time!
 
Main Page | Blog | Projects

Archive for February, 2006

Ultimate Commander: Listing Configuration Implemented

Tuesday, February 28th, 2006

It's been a while since I've blogged about UC. That was because I had to do some major refactorizations which I couldn't foresee, but I feel very satisfied with the end result even if the development progress is slower than I planned.

Let's see some big picture things of the current state of UC:

laci@whisper:~/projects/uc$ wc *.cs
  137   439  4011 AttributeIcons.cs
  450  1276 10411 File.cs
   51    98   973 Frame.cs
   26    45   467 GladeContainer.cs
   19    41   464 GladeWidget.cs
   88   169  1770 MainWindow.cs
  338   753  8033 Panel.cs
   94   189  2266 PanelColumn.cs
  237   578  7873 PanelColumnInfo.cs
   30    84   732 PanelConfigurator.cs
   77   179  1424 PanelFrame.cs
  247   523  6734 PanelListingConfigurator.cs
   36    63   615 PanelSortingConfigurator.cs
  121   248  2251 Slot.cs
   29    58   629 UltimateCommander.cs
   38    73   635 View.cs
 2018  4816 49288 total

Here's how the class hierarchy looks like:

+-+ Object
  |
  +-+ AttributeIcons
  |
  +-+ File
  |
  +-+ MainWindow
  |
  +-+ PanelColumnInfo
  |
  +-+ Gtk.HBox
  | |
  | +-+ GladeWidget
  | |
  | +-+ GladeContainer
  | |
  | +-+ Slot
  | |
  | +-+ View
  |   |
  |   +-+ Panel
  |   |
  |   +-+ PanelConfigurator
  |     |
  |     +-+ PanelListingConfigurator
  |     |
  |     +-+ PanelSortingConfigurator
  |
  +-+ Gtk.NoteBook
  | |
  | +-+ Frame
  |   |
  |   +-+ PanelFrame
  |
  +-+ Gtk.TreeViewColumn
    |
    +-+ PanelColumn

Wait, here comes the best part: Ladies and Gentlemen, the first screencast of the Ultimate Commander! Click on the image to watch it.

Image

As a side note, UC starts up considerably faster, but capturing takes up much CPU time.

South Park Makes Me Roll on the Floor

Sunday, February 26th, 2006

Many times I found South Park's kind of humor overly primitive and far fetched. Not this time! I've just found a real gem, episode titled "Proper Condom Use". It's full of grotesque humor of a special kind. A must see.

Jaw-dropping Xgl demo

Saturday, February 25th, 2006

If you want your jaw to be dropped by the features of Xgl, you gotta watch this demo.

File Tagging in Nautilus

Wednesday, February 22nd, 2006

Nautilus seems to soon have a nice file tagging interface. I'd haven't even thought of this kind of interface, but I'm really impressed by it. It's an awesome design in overall, even if it provides limited possibilities semantically.

The Power of Alternative Channels of Information

Wednesday, February 22nd, 2006

It's fascinating how differently audio and video feels compared to plain text. It's another spectrum of information. Tonality, movement and gestures code a tremendous amount meaning which I really like to percieve.

I'm saying all this because it seems that podcasts, screencasts and videos are getting more and more popular as broadband is getting more widespread day by day.

OSNews has a recent podcast with the theme: "Are We Happier When We're Fighting?". It's about flamewars. I like the closing though: what could be accomplished if we could work together instead of wasting our energy on arguing. Personally I've argued a lot over the typical controversial geek topics in the past. If I see such a thread emerging nowadays, I immediately ignore it and I try to focus to things that I can actually make difference on instead of burning my energy pointlessly.

Channel 9 also seems to be a great resource of videos, podcasts, screencasts and photos related to Microsoft and the people working there. Despite I don't sympathize with the company, I do believe many of these people has a lot to offer and some of them are genuine talents.

I've just seen the interview with Jenny Lam on Channel 9. She's an artistic type designing the UI of Vista. This interview makes me thing about design. Really like it.

GNOME News

Sunday, February 19th, 2006

Wanna know what you can expect in the next GNOME? Then you gotta check out the article: "A Look at GNOME 2.14".

The february issue of GNOME Journal is also out.

Crazy Multi-Input Touch Screen Blows My Mind!

Sunday, February 19th, 2006

Crazy Multi-Input Touch Screen – sounds crazy? You gotta see this thing in action. It'll make you feel you're actually in the 21st century. Click on the image!

Image

I'm absolutely impressed with this uniquely innovative way of interaction. I need to have such a thing at home right now.

MonoDoc Is So Damn Buggy!

Tuesday, February 14th, 2006

MonoDoc is one of the most buggiest pieces of software I've ever used. In the past few days, it wasn't very hard to find some bugs.

Free Desktop (R)evolution

Wednesday, February 8th, 2006

I'm extremely impressed by the (r)evolution of the Free Desktop. The most fundamental and innovative change in this area is the release of Xgl. Given such a powerful rendering subsystem, our desktop can really catch up with Vista and Tiger.

On the desktop environment front, GNOME and KDE have both showed their virtues.

It was odd to me seeing such radical shots of GNOME, but given this post, one can clearly understand Novell's marketing reasons not to instantly reveal every piece of information. I have a feeling about GNOME that it really wants to be helpful and clear to the user in a moderate manner while being quite decent looking.

Speaking of the new KDE look, I have mixed feelings. Some elements of it are excellent from a visual and from a usability standpoint also. The new Control Center is just awesome. On the other hand, some other aspects of it seem like a massive amount of chrome with no sense of usability like this stylish dialog, funky file manager window, obnoxious menu and ugly taskbar. However these examples may be due to the used theme and if everything will look like this start menu, or panel setup dialog, then I must congratulate the KDE developers because it'll be a pleasure using KDE.

Thumbnailing Movies in the Right Way

Friday, February 3rd, 2006

About Thumbnailing in General

Thumbnailing is a very nice feature, although I think it's not essentially usable in case of most formats. Speaking of audio files, it's clearly impossible, of course and textual files generally don't differ that much that one could efficiently differentiate them based on their thumbnails. Image files however, have an obvious relevance here and it's pretty straightforward to thumbnail all of them. The last type, which really hits home for me are movies.

Why Movie Thumbnails Suck?

Movies are special kinds of animals in the context of thumbnailing, because picking up a random image out of a movie stream generally results in an irrelevant image. We cannot really associate a randomly selected image with the movie in our mind, because statistically it's a kind of image that loosely relates to the content of the actual movie. Imagine what it's like to see an ocean with a boat, an average american house, a city from 10 000 feet, or a cast list as a thumbnail? Could you tell me which movie it's taken from? I can hardly think so.

Unfortunately every desktops that exist today operate by this policy. Windows XP captures the first frame of every movie file as its thumbnail. Nautilus essentially does the same, but it captures an image that is at the 1/3th of the movie, which is a smarter policy I guess considering that most movies start with black screen.

Best Case Scenario

So what would be the best scenario for thumbnailing movie files? The whole point of movie thumbnails is that the user can associate the thumbnail with the movie it belongs to, so the user must be provided with an interface which makes him able to associate a thumbnail that is actually relevant to him. I see two possibilities for achiving this goal:

  1. Implement a mini movie player that provides a way to capture a frame into a thumbnail. Unfortunately GStreamer isn't wrapped in Mono yet, so I cannot implement this solution in UC.
  2. Randomly capture more images of the movie so that the user can choose of them the one which he likes the best. If he doesn't like either of them, he can recapture the same number of images any time. This solution has the undisputable advantage that it can be easily implemented as a command line application as you'll see below. I also think it's a more convenient approach.

Thumbnailing in GNOME

Several months ago using Nautilus I was impressed by its movie thumbnailing feature considering how well it handled different movie formats. Later when I played with gconf-editor, I could easily understand the thumbnailing infrastructure of GNOME. Under the /desktop/gnome/thumbnailers gconf key, one can find all the thumbnailing applications GNOME applications fork to get the related thumbnail file of the associated MIME type.

The New Way of Movie Thumbnailing

I noticed that every MIME movie file is referenced to gnome-video-thumbnailer on my system which is symlinked to totem-video-thumbnailer. In the next moment I was fetching the source of Totem. Totem can be compiled with two backends: GStreamer and xine, but for some wicked reasons, only xine worked well for me. As soon as I saw how well it worked I started to implement the above "Best Case Scenario #2" features. So here's what I've done a la ChangeLog:

  • Separate the necessary files that are required to build totem-video-thumbnailer with the xine backend and put them in one flat directory.
  • Replace configure with Makefile.
  • Fix bug in bacon-video-widget-xine.c to require glib 2.10.0 instead of glib 2.8.10 for calling g_async_queue_sort().
  • Gracefully rename totem-video-thumbnailer to depot-video-thumbnailer.
  • Remove gstreamer hacks from depot-video-thumbnailer.c since they're not used with xine.
  • Use bilinear filtering instead of nearest neighbor sampling for resizing movie frames and images for better quality.
  • Implement randomized mass image capturing and modify the CLI accordingly.

I've just committed this babe to the UC CVS. You can find it in the depot-video-thumbnailer directory. If you wanna try it, install the xine-dev and totem (and probably other) packages on your Debian distribution or look for similarly-named packages on other distributions. After that use make and it should compile.

It's pretty easy to use it actually:

lee@whisper:~/projects/uc/depot-video-thumbnailer$ ./depot-video-thumbnailer
Usage: ./depot-video-thumbnailer [-s <size>] <number-of-thumbnails>
       <input> <output-prefix> [xine backend options]

Let's give it a try on one of my favorite movies, The Rock:

$ ./depot-video-thumbnailer -s 384x348 4 the-rock-cd2.avi rock
Capturing image 1 of 4 as rock1.png...
Capturing image 2 of 4 as rock2.png...
Capturing image 3 of 4 as rock3.png...
Capturing image 4 of 4 as rock4.png...

Wanna see how the thumbnails look like?

Image

Image

Image

Image

They seem pretty neat. Which one would you choose?

As a last note, maybe you should use depot-video-thumbnailer instead of totem-video-thumbnailer, because it uses bilinear filtering so your thumbnails won't look that messy.