Archive

Trip

I’ll write more on the trip later, but my cousin Vikki and I took a half day in Chennai and typed up a play (coup de foudre) for performance at Alliance Francaise on his computer, about a tamil boy (Swami) who goes to France to meet his friend, falls in love with another girl there and tries to improve his French to ask her out. While he’s doing that and following her around, she notices him and learns Tamil to impress him too. Was a funny plot. I’m so proud of Vikki—he managed to arrange an all-female but one cast for himself ;) .

Vikki's thunderbolt play

Roja

Listening to Chinna Chinna Aasai after a long time, and it’s still so beautiful.. esp the place where she sings malligai poovaai...

Woof

What happens when you avoid going to the grocers and pluck from the tree instead ;) (No, I didn’t shave)

Small image of coconut peels

It hurt, but the coconut was the sweetest. Was as if someone had added sugar to it.

On vacation

I’m on vacation starting tomorrow for the rest of this month. I’m heading first to attend Jiby’s wedding in Changanacheri, Kerala. After that I’ll be visiting relatives in Coimbatore, Thanjavur and Chennai before returning home. During this time I’ll have no access to email.

Three nutty people wracked their heads to come up this

It’s because the % operation is implementation defined over negative integers in C. It was originally written by nomis, pippin, and me for a GIMP patch many moons ago, but we decided not to put the patch in. As this code took a while to arrive at, here it is for your pleasure and so that we may never have to rewrite it.

#define REMAINDER(dividend, divisor)
                   (((dividend) < 0) ?
                    (divisor) - 1 - ((-(dividend) - 1) % (divisor)) :
                    (dividend) % (divisor))

Update: The macro assumes a positive divisor. Our divisor was always a constant positive integer literal.

Morten Welinder found an underflow situation in the code above when INT_MIN is used as the dividend, which may fall in yet another undefined part of the C specification. Basically in the sub-expression (-(dividend) - 1), -(dividend) == (dividend) when dividend == INT_MIN. And INT_MIN - 1 will underflow (and wrap-around to INT_MAX in the case of most microprocessors’ two’s complement registers), and this behaviour is not defined in C. Although it’ll work fine on most general purpose CPUs, because this is undocumented, there may be issues if gcc tries to reduce it at -O2 if both dividend and divisor are constants. More correct code with Morten’s patch is:

#define REMAINDER(dividend, divisor)
                   (((dividend) < 0) ?
                    (divisor) - 1 - ((-((dividend) + 1)) % (divisor)) :
                    (dividend) % (divisor))

It won’t overflow over INT_MAX in this case, as dividend is less than 0 when that sub-expression is used. So now, we have 4 authors. ;)

Alan Johnston - the missing Gaza reporter

Reporters go a long way to get you stories of people. They understand situations far more rationally than politicians, and are the first to criticize their evil ways. Good reporters often empathize with the hardships faced by people, and represent them. It is stupidity to put a reporter through the trauma of a kidnap. The BBC has a petition for Alan Johnston’s release on the net that you can sign, which hopefully his kidnappers will see.

Alan Johnston banner

Gum update

Following last week’s post on Gum (free software for DRM-free media distribution to refresh your memory), I have received some suggestions from various people. One of them was to try and build a community around Gum. So I’ve made a project website for Gum (as it is free software) which lists things to do, access to source code, etc. and I’ve setup a mailing list and IRC channel (#gum on irc.freenode.net). Everyone is welcome to participate. :) I’ll upload whatever source code is done till now to the Subversion repository in the morning tomorrow.

In the past week after the post, I did some database development for the backend. I also contacted Magnatune on the phone and and they have kindly agreed to have their whole catalogue available on Gum under CC licenses (it was free, but I had better ask them before using such a large catalogue, no?). It was a very nice gesture from them, and their data is in various tables now, helping with database testing and query optimizations. A rudimentary web interface is also done for audio items which shows metadata (you can find it if you know where to look ;) ). More things are in the works.

I re-request help for Gum. If any software company can sponsor salary, hardware and bandwidth, I can work full-time on this project and perhaps get a full-time co-developer or two. There are many items to do. It will definitely rock to have funding. Nokia, Red Hat, Novell, Sun.. are any of you interested? It can’t hurt much to hire one guy to work on DRM-free media distribution software and your desktop/handheld OS gets a nice GTK+ application. Well everyone does.. that’s the beauty of free software.

Gum - a free software media distribution system

From the start of this year, in my non-work spare time I mostly stayed away from that other project (GIMP) and have been designing and writing a GTK+ application in C for distribution of high definition video, audio and documents over the internet. There is a big opportunity in the media space, and many apps are structured towards commercial content with DRM. We need something in our community backyard, and so Gum is a media distribution system which doesn’t implement DRM and works around the need for piracy. But this is not the only difference.

The following are going to be Gum’s 1.0 features, and I will continue to work on it in my free time (but you can help me speed this up—see further below):

  • Support for playback of high-definition full-length video, audio and documents (similar to Acrobat Reader / Evince).
  • Support for multiple audio-streams for different languages, or things like director’s commentary (video, audio)
  • Support for multiple video angles (video)
  • Support for chapters (video, audiobooks, real books)
  • Support for subtitles (video, audio - lyrics and text, documents - text and annotations)
  • Multi-channel audio and high-definition video (1080p)
  • Full UTF-8 i18n and localized in various languages, with country-specific cultural focus
  • There is no DRM. There will be support for exporting these media into portable files for use in other applications, apart from support for portable devices such as iPod and eBook readers.
  • We will start with existing content from various publishers such as Librivox, Archive.org, Magnatune, PLoS, etc., and will add an upload facility later.
  • P2P system for handling high traffic loads (details further below).
  • Gum is and will remain a free software application licensed under the GNU GPL.
  • Ad-free Creative Commons, public-domain and other freely licensed content.
  • We will have commercial content with advertisements. This will mean convincing publishers such as O’Reilly, Hollywood and Bollywood to publish on Gum. Ads will pay for the plays just like on television, and hopefully viewers won’t have to pay for content. This could kill the need for many forms of digital copying and re-distribution called ‘piracy’, as everyone now has free and convenient on-demand access to content. We have a reasonably nice implementation to combine the use of P2P, advertisements and the ability to export to files.
  • We will also likely have support for purchasing digital content without ads (and without DRM).
  • Banu’s website will contain the web-application, with categorized browsing, metadata, previews, accounts, bookmarks, channel subscriptions, comments, ratings, charts, suggestions, etc.

These are a LOT of items for a single person to do quickly for 3 types of media (video, audio and documents). But everything in the list above is do-able now. There are excellent free software libraries to implement all of the functionality such as libc, GTK+, poppler, GStreamer and libavcodec (ffmpeg), GNet, libxml2, Cairo, Tango icons, etc. and it can all be ported to multiple platforms. I know how to implement all of the GTK+ application and web application (and you have some of the proof below and on Banu’s website). Let’s make Gum the standard free software system for digital media distribution, free of DRM issues and other blues. So what needs to be done? I’m posting an article about it here as I need help and any advice you may want to share. Here is what the program currently looks like. It is a GTK+ app, so it’s themed according to the default theme. It can be themed to look different too.

So far a lot of the main multi-threaded app including UI, updates checking including XML schema changes, and XML HTTP communication between server and client are implemented. It is written in C using GObject and uses GTK+/GIMP’s coding style. The Banu website framework with user accounts management is also ready (the public site is an old branch). Currently I am working on the backend database.

Gum search page
Gum video page
Gum documents page
Gum transfers page
Gum preferences dialog
Gum about dialog
Gum in terminal


Help!
The reason I’m posting this here prematurely is to ask for help.
I want to work full-time on Gum, and if possible, have one or more co-developers to speed up its development. Banu will also require hosting for the web application and content (machines, disk space, bandwidth, we’ll take care of the distribution software).

With bambi eyes, I am looking towards a free software company such as Red Hat / Sun / Novell / Nokia / etc. (any employees want to take this up?), or even any media houses such as Sony, Warner Bros, Paramount/Viacom, or rich individuals who want to bring about DRM-free media to help me by funding salaries and providing hosting, if they think that such an application will be beneficial to the CC / free software community and the general public. I can’t offer a percentage of Banu as collateral for this. The reason is simple. There’s a mission, a plan to do good with Banu and Gum, and at this point I don’t want to be influenced away from it. There’s a solid plan and it just remains to be acheived. If Gum gets funded, and generates commercial revenue eventually, I will thank them appropriately *Grin*. How much money can a company lose by paying a salary to just one or two more developers to do good things? Come on, please try and help!

About me, I have an MS degree in computer science. You can go through my resume too. If you can help me, please contact me. I’m also open to advice and criticism (if you’re reading this blog somewhere, I’m a member of that community and you can tell me).

Why yet another iTunes-like GTK+ app? Or why not extend an existing app?
Sorry if I have offended anyone by this, but although Gum seems similar to apps like Rhythmbox and Banshee, it isn’t. It has to support multiple media types, do P2P (not straightforward because we are going to have ads in here) and has plenty of web-service integration. It’s perhaps possible to start with one of these apps, but it’ll likely be more work than starting from scratch, especially to a developer who doesn’t already understand these projects. So the code was started from scratch.

What P2P system does this use?
The app is being written to use a P2P method similar to Bittorrent to handle media distribution under loads. It isn’t exactly Bittorrent due to implementation differences, but the protocol structure is very similar and it will have that system’s benefits. I am also looking at integrating UDP NAT hole punching with the tracker’s help and STUNT so that connections can happen through firewalls without inconveniencing users with manual configuration.

What media codecs can this system support?
For video/audio, anything GStreamer and libavcodec (ffmpeg) supports, including 1080p H.264, MPEG-2 video, Theora, MP3, 5.1 channel AC3, Ogg Vorbis, AAC, etc. For documents, PDF and DjVu.

How is this different from Democracy Player, Bittorrent, Azureus, iTunes, Joost, Google’s plans, etc.?
Each of these apps has a slightly different feature set, and Gum has its own way of doing things: Gum is specifically for non-streaming pre-download high-quality content, with the ability to view items free of cost with ads. There is no DRM. Gum provides 3 media types (video, audio, documents) and uses P2P.

How can I keep an eye on what’s happening? How can I help?
I’ll post updates on this blog (syndicated wherever you’re reading this). I’ll publish Gum’s source code once the backend and app code have stabilized a bit, and request gnome.org project support at that point (if you know me, ask me for access).

I request you to please tell everyone you know or publish on your blog that I’m requesting help to allow me to work full-time on Gum and pay for/host Banu’s servers, and perhaps bring on one or more co-developers so that this can be sped up.

Cool utilities

  • The next time you find yourself staring at a CD/DVD with a read-error (and your cp on that file terminates half-way), check out dvdisaster. It’s probably a good idea to check it out before you find yourself staring at a CD/DVD with a read-error, but it does a great job even when you haven’t created any error recovery data (the stuff that’s gone is gone, but at least the stuff that’s recoverable is available).
  • nomis wrote a cool utility called woof for that next time when you want to woof a file across the LAN to a co-worker.
  • Revelation is a nice lil’ program to keep track of those passwords which forget you.

Greatest guitar solos

After reading an article on the greatest guitar solos which contains November Rain in the top 10, it becomes necessary to compile your own. Not that November Rain doesn’t have reasonable solos, but there are far better solos in other GN’R songs like Double Talkin’ Jive, Ain’t it fun, Civil War and their covers like Knockin’ on Heaven’s Door and the Godfather theme. November Rain makes the list sound like a marketing list. Here are my favourites in no particular order.. they are from my experience and YMMV. I’ve skipped a lot of good ones among artists like Pink Floyd. *Grin* Hendrix, Page and Satriani make up my list of greatest guitarists.

Top:

  • Ballerina - Steve Vai
  • Black Magic Woman - Santana (Fleetwood Mac cover)
  • Eruption - Eddie Van Halen
  • Black Star - Yngwie Malmsteen
  • Spanish Castle Magic - Spin Doctors (Hendrix cover)
  • Manhattan - Eric Johnson
  • Voodoo Chile - Jimi Hendrix
  • Red House - Jimi Hendrix
  • Cool No. 9 - Joe Satriani
  • Summer Song - Joe Satriani
  • Love Thing - Joe Satriani
  • Tears in the Rain - Joe Satriani
  • Stairway to Heaven - Led Zeppelin
  • Hotel California (electric and acoustic versions) - The Eagles
  • Dengue Woman Blues - Jimmie Vaughan

Mentions of other worthy guitar songs:

  • Black Hole Sun - Soundgarden
  • Plush (acoustic version) - Stone Temple Pilots
  • Sultans of Swing - Dire Straits
  • Why Worry - Dire Straits
  • Mic Check - Rage Against The Machine
  • Sad But True - Metallica
  • Going to California - Led Zeppelin
  • Stormbringer (lots of organ solos) - Deep purple
  • Light My Fire - Doors
  • Ready or Not - Europe
  • What’s the Frequency Kenneth - REM
  • Scar Tissue - Red Hot Chili Peppers

What are your favourite solos?