Feed me, Seymour

whoami

Jonathan Groll lives in Cape Town (South Africa). He’s married to the delectable Shira and has two wonderful kids. He’s known to work as a software developer (and is completely passionate about open source software).

WARNING: This site holds hidden puns and needles!




Add subtitles to a DVD

by Jonathan on December 5th


Many people want to add subtitles to a DVD in their own language, and often DVD disks don’t come with subtitles in a language you want. For instance, if you’re staying in a foreign country and want English subtitles added to your rental movie. Or in my case, the library at the local Alliance Fran├žaise has a lot of interesting movies completely in French, without English subtitles, and my french isn’t yet good enough to fully understand everything that is being said.

What is interesting is that there are sites on the internet that offer downloadable subtitle files for many movies. Simply type the name of your movie, plus the word “subtitle” into google and provided the movie is popular or well known enough you should be able to find a site offering the subtitle file for download. Mostly it seems that these subtitles were extracted from a DVD owned by someone else with the right languages. In other cases, it is purely fans of the movie who loved it so much and wanted to translate the words of the movie into a language that they know so that others can also enjoy the movie. I’m not so sure about the legality of the subtitles obtained in the first case, but certainly an argument may be made that since you own or have legally rented a copy of the movie it does seem to fall within “fair usage” to watch this movie with subtitles in a language you require.

So, you may be lucky. You may find the (fan-written) subtitle file that exactly matched your movie. By this I mean that the person who created your file had exactly the same version of the DVD, so that the lead in at the beginning of the movie is exactly the same length and in this case the subtitles remain perfectly in synch with the video.

However, don’t expect to watch the movie in your living room just yet. Most stand-alone DVD players that I’ve used do not have a facility to specify an external subtitles file, but almost all of the software based players on your computer do have this facility. So provided you got lucky, and got the correct subtitles file that matched your DVD, and are also content to watch movies in front of your computer that will be sufficient and you don’t need to read further.

Mostly though, the subtitles file doesn’t have the right timings for your DVD, or you might really really want to watch it on your TV in the lounge rather than with bowls of popcorn balanced on your lap in front of the computer. The guide that follows is for people who are running Linux, are comfortable with the command line, and who wish to hardcode 1 subtitles into a XVID file for watching on a (living-room) player that can play DIVX movies. If this is not exactly what you want there still may be something for you in this blog post. I’ll outline my six-step method:

  1. Rip (extract) contents of the DVD disk.
  2. Attempt to play DVD file with subtitle files on desktop.
  3. Create a XVID file without subtitles.
  4. Transform the subtitle file so that subtitles are synchronized with the video.
  5. Create a XVID file with subtitles hardcoded in.
  6. Break up this file into smaller segments for players that cannot handle large files.

I myself don’t follow the above recipe every time – depending on the circumstances some of these steps may not be needed. And you may very well want a different outcome – it may be enough for you just to align the subtitles with the video, or you may want more such as recreating a DVD with subtitles. You may even despise XVID files with harcoded subtitles in them!

More...

Tunnel through ISA proxy

Tags tech
by Jonathan on November 3rd

Image of tunnel attributed to Richard Freeman Geeks often need to access their *nix computers from work. Doesn’t everyone want to do that? True geeks control their computers strictly using the command-line, of course, and the tool that is used to control a remote command-line session is ssh.

What one usually does is use a tool like corkscrew to send ssh traffic through an HTTP proxy.

At one place of employment, a known trick of using corkscrew to tunnel out using the work proxy failed, with this message:

Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied. )

I tried all combinations of DOMAIN\USERNAME:PASSWORD in my corkscrew auth file but nothing worked.

If you see this message have no fear! What you need is a utility that can negotiate NTLM authorization with the proxy.

More...

Split and encrypt files for google docs

Tags tech bash
by Jonathan on October 29th

Creative commons image of meat grinder from http://www.flickr.com/photos/amayu/3629064681/Since January 2010, Google docs has allowed you to store any type of file, even arbitrary binary files. However, there are a couple of gotchas: one cannot upload files greater than 1GB in size, and you may want to encrypt your files so that not just anyone can read them (for instance server backup files).

The two bash scripts below provide a solution for the above. I call them the ‘mince’ scripts ‘cos they slice and dice your files and hopefully you’ll get hamburgers back at the end of the day. These scripts depend on you having a fairly new version of bash on your unix-like system, the ‘split’ utility and gnupg (GPG) which is used for the encryption/decryption. If you’re unsure of GPG, a good getting started guide can be found here.

It must be said that google docs is (in my opinion) currently not the best way to store your files in the cloud. In fact, I wrote another blog post describing the “google storage” options in greater depth.

More...

"Google paid storage" and "google storage" are different things (for now)

Tags tech google
by Jonathan on October 15th


So, at a friend’s prompting (and that it struck me as a bargain) I paid $20 over to “Google paid storage” to give me 80GB storage for one year. This may be cheaper than Amazon S3 storage where the cost calculation is more complicated (see below 1) and is significantly cheaper than dropbox which charges $9.99 per month for 50GB. However, if you read further you’ll see that this price is too good to be true.

What I paid for was essentially this, an extension of the normal storage space that Google provides for free for gmail, gdocs, picasa and so forth: “Google offers a way to purchase more storage space when you run out of free storage space in Gmail, Google Docs, Picasa Web Albums, Blogger (for photos), and Google Buzz (for photos).”

So, in my google docs account I can now see that I’ve got 80GB available, but interestingly, if I want to access real “Google Storage” (ie. using an Amazon-S3-like API) it is something else, called Google storage for developers. Unfortunately, Google have named their products in a way that has confused me and is possibly confusing for others with these similar names.

More...

Emacs-like keybindings for the new ABAP frontend editor

Tags tech emacs sap
by Jonathan on August 12th

In the new SAP ABAP editor, it’s sort-of possible to remap the keybindings you use. If you’re a regular Emacs user, you often find yourself pressing the wrong key combination accidentally – for instance C-a to go to the beginning of a line, only to find that the new ABAP editor by default respects the regular windows CUA keybindings – so C-a does a “Select All” as it does in many windows programs.

More...

Kinesis Advantage Ergonomic Keyboard

Tags tech
by Jonathan on June 14th

Never trust your hands to a generic, sticky old Dell keyboard that you just find on your desk at work. In my case, it took about a month of using that keyboard to develop a case of tendinitis. To be fair this is the second time I’d experienced such a problem; the mouse was partially responsible, and Emacs chording was also contributing it’s share.

Since this was the second time I’d experienced pains in my hands from typing I’d already done my research and knew that I’d want to look at buying a “Kinesis”: http://www.kinesis-ergo.com/ keyboard. The problem was primarily that Kinesis make two very different styles of keyboards – the freestyle which is most similar to a conventional keyboard – with a similar layout except that it is split into two independent halves and the more radical Advantage. The Advantage has two recessed key ‘wells’, and radically has thumb keypads forcing you to make use of your more powerful digits. It was this latter feature that made me order the advantage even though this is an expensive keyboard. Personally I’ve never seen any true ergonomic keyboards (other than Microsoft Natural boards and the like) in real life – they just aren’t sold in South Africa and it costs a lot to have them shipped over here. So I asked around on various forums and newsgroups before committing to the capital outlay. One of the things that I’d never considered when making the choice was the type of keyswitches in the keyboard. In the past I owned an IBM buckling spring keyboard, so I do appreciate the feel of a good keyboard, although quite frankly I found the gentle softness and quietness of cheap membrane PC keyboards to be a relief after the IBM! It turns out that the kinds of keyswitch most highly prized on the geekhack forums are the Cherry (Cherry “Brown” is liked the most by some) and Topre switches. So, reason number two to buy a Kinesis Advantage – it has Cherry Browns. If you’re interested in ordering the same from South Africa bear in mind that it’ll cost you about twice the direct exchange rate once you’ve factored in UPS shipping (obligatory) and customs duties. So anyone who lives in Cape Town and wants to try mine out before buying, I fully understand!

More...

Powerball Odds

by Jonathan on February 10th

This week’s powerball currently has a rollover jackpot of 90 million Rands. A highly attractive target. But before going off to “tata your chance”, let’s look at the statistical probability that you’ll win the South African powerball game.

More...

Crapple "release" the iPoo

by Jonathan on February 3rd

CUPOOTINO, California. Steven Jobless, CEO of Crapple Corp, announced his company’s long awaited tablet form-factor machine last Wednesday. Whilst sequestered in the backwoods of Tennessee last year, Mr Jobless spent a lot of time waiting for medical test results and considering the meaning of life. Whereupon he had what he described as a “number 1 experience”. It hit him – the perfect Captive Market. The new product, marketed as the iPoo is of the ideal form factor for use whilst positioned on the lavatory. Unlike the early tablet products produced by their competitors, the iPoo is not a fully fledged compooter, but follows the Jeff Raskin school of thought on what constitutes a suitable “Intuitive Interface” for the average user.

More...

Dynamically hide elements with javascript - SAP CRM 2007

by Jonathan on December 18th

In a recent SAP CRM 2007 implementation, we had the requirement to hide a view (“partial”) in response to a change in a dropdown value.

This is easily done using javascript code on the client side, and what’s more such a solution to the problem is easy to implement and is not really restricted to SAP CRM 2007 or even SAP web development in general.

More...

Using mencoder to fix a broken video file index

Tags tech video
by Jonathan on November 24th

An oldie, but a goodie, and there is always someone out there who doesn’t know about this. Often, one encounters video files that do not have an index or have a broken index- this is almost certainly the case if your media player or PVR refuses to allow you to fast forward within the file. Easily fixed under Linux using the following mencoder incantation:

mencoder -idx input.avi -ovc copy -oac copy -o output.avi

As a bonus, this apparently also repairs broken interleaving.

Some more great mplayer/mencoder hints, including tricks such as appending multiple AVI files are here.

Linode and Panix VPS benchmark comparison

Tags tech
by Jonathan on November 23rd

In May 2009 I moved my VPS (Virtual Private Server) from being hosted by Linode in Dallas to Panix in New York City. Price wise, the offerings are identical, $21 monthly consisted of a Xen virtual server with 360MB of RAM, 16GB storage and 200GB of transfer, plus one additional public IP address. However, not all virtual private servers are created equal, and as I discovered benchmark measurements showed performance differences between the two offerings. Please bear in mind that the benchmark results that follow are not up to a proper standard of testing (the one host was running a 32 bit operating system whilst the other was 64 bit), testing was done in May (things may have changed subsequently), and you may luck out and be assigned to an underutilized host and get better than expected performance. These benchmark tests are just an interesting read, and may not be as conclusive as I would like, but they allowed me to make up my mind to move over to Panix.

More...

The Time Traveler's Wife

Tags life books film
by Jonathan on September 12th

I’ve been quite taken by the Time Traveler’s Wife (The novel by Audrey Niffenegger). Which is why I’m writing this post – the film adaptation of the book has left me with a hollowness inside that the book did not have, even though I so enjoyed the film. So herewith my first blog film review. DISCLAIMER: PLOT AND FILM SPOILERS TO FOLLOW, please do stop reading if you ever intend to read the book or see the film. My recommendation is to read the book first.

More...

Why begone :-(

Tags ruby life
by Jonathan on August 26th

I’ve been quite shocked and saddened by the online disappearance of why the lucky stiff last week. Heck, the blogging engine for this site is written to make use of his micro web framework – camping.

_why wrote (writes!! we await the second coming) some of the more interesting ruby code out there. And he also wasn’t afraid to write things that were quite out there – on the borderland between programming and art. One of his creations was called blimlimb (the code is still around, but I fear some of the blimlimb scripts and repository history is lost). Imagine this, you’re sitting in a peaceful IRC channel and all of a sudden a whole troupe of bot actors appear in channel. They start performing a play for you, complete with actions and appropriate dramatic pauses. And the weird part is that the bot puppetmaster can also add a bit of improvisational scripting to spook those in channel further.

More...

Max DB log is full - SAP NW 2004S TestDrive for Linux

Tags tech sap
by Jonathan on July 17th

A short while back I downloaded and installed the SAP NetWeaver 2004S TestDrive SAP system (running on my Atom! machine at home). This provided me with my own (90-day licensed) basic SAP R/3 system which, according to the documentation, includes both ABAP and Java stacks running on SAP’s own database Max DB.

One of the issues that this system is prone to is that the Max DB log gets full (there is no default log cycling). It is quite a well known issue and is even described on the SAP on Linux: Test Drives – Tips and Tricks FAQ . In my case, I encountered this issue after running an SGEN job to generate all the basis components on the system. I could log into the SAP system, but the GUI froze before anything useful came up. Trying to run stopsap, it hung forever at the checking database step (where it runs R3trans d).

Looking in knldiag, I knew I had a full log problem because of this message:

2009-07-17 10:38:54    21 WNG 20001 KernelDB  99 percent of log area occupied, 126717 pages used
More...

Evaluate python from ruby

by Jonathan on July 1st

The newest version of my IRC bot, irbie is able to evaluate python code in channel and respond with the output.

It does this in only 33 lines of RUBY code.

More...

Targeted AIDS advertising

Tags life death
by Jonathan on June 27th

(Sign seen at the Bellville cemetery) No camping, no cars, no HIV

This is the most directly targeted HIV/AIDS campaign that I have seen thus far, but I’m afraid it may be a little too late.

Seek within long podcasts on your car stereo

Tags tech
by Jonathan on June 27th

Seek and ye shall find…

My car stereo (a JVC that accepts USB thumb drives) is really slow at seeking to a specific position in long audio files [To be fair regarding long seek times, the JVC does seek faster off a CDR disk. However, it’s not much faster and then you’re left with a pile of disks that have been played only once.]. So, if you loose your place in a long podcast (e.g. the kids want to listen to something) you can spend up to 15 minutes holding down the fast forward button just to find your place again. It also jumbles up the play sequence for all the audio files within a folder. Both problems can be easily solved on the computer or when you put the audio files onto the USB drive.

More...

Gitosis on Debian Lenny

Tags tech
by Jonathan on June 4th

No, not halitosis !

There are many wonderful public git repositories out there – like github, of course, and gitorious (pity they didn’t seem to be able to find a sexual pun in that name!). But they don’t offer you a free private repository where you can store the code that you’re not particularly proud of or don’t wish to release into the public domain, etc. However, if you have a public facing internet host, or just about any ssh accessible box you can easily setup gitosis to create a private repository that is world accessible.

More...

Welcome to my new blog

Tags tech life blog
by Jonathan on May 31st

Welcome to my new blog – it’ll have all the sort of interesting ‘tech’ GNU/Linux/OSS/Who-abbreviated-this posts that I’d be most interested in reading about, the odd technical snippet that I’ve found to be indispensable, and maybe an article or two about plants will creep in here as well. I also give you my word that I will try to only post items of quality here. Although as they say a man’s word is never done….

More...