Cutting the Chai has moved to a new domain: cuttingthechai.com.
You can get in touch with Soumyadip at www.soumyadip.com.

Thursday, May 08, 2008

Download Files from eSnips - the Easy Way

We all look for music (and other stuff) online, but it often happens that what you are looking for isn't available there. Some of the places where you are most likely to find what you are looking for (beyond the P2P networks) are CoolToad and eSnips. CoolToad (when I last checked) allows registered users to download the stuff, but eSnips has of late kept on changing their code (and the players), making it difficult for users to download from there.

Even my trusted software Orbit didn't work here (it has a nice Grab++ utility), nor did other download managers. The guys at eSnips have seem to have nullified the tricks that I found via a quick Google search. Therefore I resorted to the tried and tested cache trick (as the initiated would already know - this works in many other cases too).

This works since eSnips doesn't do Real Time Streaming (else we would have to use other tricks).

[Update: There's an even easier alternate way to do it. Go to the bottom of this post for details]

Since I recommend and use Firefox, the following instructions are Firefox specific (on Windows XP).

1. Search for the file you want to download on eSnips





2. Delete your browser's cache (press Ctrl+Shft+Del or go to Tools > Options > Advanced > Network > And click on the Clear Now button under the Cache section) - I'll explain the need later



3. Let the file play/load in totality (this involves a bit of waiting)



4. On the browser's address bar type about:cache



5. Under the Disk cache device copy the path of the Cache directory.
It would be something like this: C:\Documents and Settings\USERNAME\Local Settings\Application Data\Mozilla\Firefox\Profiles\6q1bkcu8.default\Cache



6. Paste the copied path on Firefox's address bar



7. Look for the file with the heaviest size (this is the one in most cases and it is why I asked to delete the cache in the first place, to avoid any confusion with a large number of files)



8. Right click on the link corresponding on the file and select Save Link As from the right click contextual menu and save it where you want to.



9. While saving give the file an .mp3 (or whatever is relevant) extension, you can also rename the file and you are done.



I suggest this trick since nothing else seemed to download files from eSnips for me. If you know of easier better tricks please share them in the comments.

Update: I later realised that the Firefox addon DownloadHelper performs the task with lesser sweat.

This post just might be redundant for registered eSnips users. eSnips seems to have added a direct download link to the media files to save users all the effort. A welcome initiative indeed. Time for YouTube to also implement this. But you need to be registered to benefit from that, in case you don't want an eSnips account, this post will still be of some help.

Click here for the complete post...

Monday, February 25, 2008

Blogger Hack: Make Original Images Open in Popup Window

Blogger Logo HugeThis is just an additional little feature that looks and feels a little better than the existing.

All you bloggers on blogspot would have surely noticed that when you upload any image to Blogger, it gives you three size options to display the image in - large, medium and small - and at the same time the original sized image is accessible to users when they click on the image displayed on a post. But then it opens in the same window and thereby navigates your reader away from your blog.

And easy way would be to use the attribute target="_blank" within the anchor tag, so that when clicked the image would open in a new window. But why not add a little frill and make the image open in a popup window.

I'm doing this on this blog, for the want of a better alternative (tried using Lightbox but the results were not satisfactory on slow connections).

Here's how:


This blob of HTML might look a little different if you're using Internet Explorer. But that doesn't make any difference to our process.

All you need to do is insert this bit of script:
target="_blank" onclick="window.open(this.href, 'popupwindow', 'width=420, height=350, resizable=no, scrollbars=yes, menubar=no, toolbar=no, status=no'); return false;"
after the closing double quotes enclosing the url of the original image, but before the > tag. The result will look something like this:


Now let me explain the elements:

the target="_blank" makes the link open in a new window

width=520, height=520 defines the size of the pop-up window. Ideally you should keep this greater (by 10 to 20 pixels) than the original image dimensions so that it displays properly across browsers.

resizable=no, scrollbars=yes, menubar=no, toolbar=no, status=no are optional attributes, you can change their values to yes or no according to your needs and fancies.

For a demo click on the accompanying Blogger logo.

For others who might need yet more cusromisation, you can add the attributes top= and left= to define the position of the pop-up window.

Here's an example:
target="_blank" onclick="window.open(this.href, 'popupwindow', 'width=420, height=350, resizable=no, scrollbars=yes, menubar=no, toolbar=no, status=no, top=20, left=20,'); return false;"
This would make the window open with a displacement of 20 pixels from the top and left of the screen. The numerical value can be changed to suit individual requirements.

Since I'm a novice when it comes to these things and would like more able members of the blogging community to further develop the idea.

Click here for the complete post...

Thursday, August 23, 2007

Drop Down Label Feed for New Blogger

Many readers of this blog might not be interested in all the assorted rubbish that I post here; they might have a liking for only some specific kind of crap. Someone who looks forward to my comics post might not necessarily have a liking for sexy Indian ads (an unlikely likelihood though). Or why should I bother someone with a genuine interest in vintage Indian advertising with some shoddy film reviews. Therefore I decided to include feeds for categories (aka labels, tags) for choosy readers and that too in an easy drop down format.

The PurpleMoggy had quite sometime back put up a post about adding label feeds to your Blogger (then in beta) template. But since, my list of categories is a long one and following that hack will mean eating up a lot of space on the sidebars, I needed the categories feed listing to be sorted in a drop down format. But then things weren't that easy for me, a little googling didn't help much, therefore I set on the difficult terrain on my own (I understand very little of the codes) and came up with what you can see in the Subscribe section on the right panel.

Before I proceed to the hack let me give credit to another place where it is due. The great help Ramani and the first Blogger Beta hack. And do remember to keep a backup of your template, just in case things go wrong. I don't want anyone cursing me.

Log in to your Blogger account -> Go to Layout -> Add a Page Element -> Add the Label element to your blog

Edit HTML -> Click the Expand Widget Templates check box

And look for this code:

<b:widget id='Label1' locked='false' title='Labels' type='Label'>
<b:includable id='main'>
<b:if cond='data:title'>
<h2><data:title/></h2>
</b:if>
<div class='widget-content'>
<ul>
<b:loop values='data:labels' var='label'>
<li>
<b:if cond='data:blog.url == data:label.url'>
<data:label.name/>
<b:else/>
<a expr:href='data:label.url'><data:label.name/></a>
</b:if>
(<data:label.count/>)
</li>
</b:loop>
</ul>

<b:include name='quickedit'/>
</div>
</b:includable>
</b:widget>
In case you have already added a label widget to your template, it will be named
<b:widget id='Label2' locked='false' title='Labels' type='Label'>
and in case you have multiple label widgets (like an additional tag cloud), it'll be this:
<b:widget id='Label3' locked='false' title='Labels' type='Label'>
Not much of a difference, only the numeral in the widget id progresses (as no two widgets can share the same id).

Now replace the section in the code (above) in red, with this:
<br/>

<select onchange='location=this.options[this.selectedIndex].value;' style='width:145px'>
<option>Category feed</option>
<b:loop values='data:labels' var='label'>
<option expr:value='data:post.url + "/feeds/posts/default/-/" + data:label.name'><data:label.name/>
</option>
</b:loop>
</select>
In case, you also want to display the number of posts under each label, replace the portions of code in bold with this instead of the one above:
<br/>

<select onchange='location=this.options[this.selectedIndex].value;' style='width:145px'>
<option>Category feed</option>
<b:loop values='data:labels' var='label'>
<option expr:value='data:post.url + "/feeds/posts/default/-/" + data:label.name'><data:label.name/>
(<data:label.count/>)
</option>
</b:loop>
</select>
You can customise your drop down list by changing the text in
<option>Category feed</option>
with
<option>Your customised text</option>
Even the width of the drop down list can be changed to suit your template. The default in this is
style='width:145px'
You may change the width specifications to say 120px or whatever or even remove this block of code altogether.

After you are done with your customisation bit, get a preview. Just to see if it is displaying right, check the functionality only on the live blog. It wouldn't work in preview given the relative nature of the paths.

You can also rename or unname the widget from the Page Elements page.

Click here for the complete post...

Saturday, July 21, 2007

Watch Movies on Your Mobile

Ever since I got my new mobile phone I found a new way to keep myself entertained on the long journey to and from work - by watching movies. Though the idea of watching a 70mm film with Dolby and the works on a tiny 320x240 pixel screen may not appeal to all, I've found it to be worthwhile pastime.

But the problem was to find the right format to play on the cell. I had downloaded a few clips from the Internet, while a few played fine, the others didn't. Though the manual says that the mobile (LG KG300 Dynamite) supports MP4 and 3GP playback, not all videos in that format are necessarily playable. Higher-end mobiles face fewer of these problems as they support a much wider range.

After some permutations and combinations and thanks to the super software called Super (Simplified Universal Player Encoder & Renderer), I could convert some DVDs which would play on my tiny screen. Though the web is full of 3GP conversion software, nothing worked, while Super did a decent job for free.

Since my needs were limited to my phone model, I didn't try what was best for other phones. Though I played one of the movies on my colleague's Motorockr and it played fine (and now she wants some movies of her choice converted). The only hitch is that the best resolution that Super provides for the combination of codecs which play fine on my mobile is 176x144, therefore the videos pixelate a little while playing on a 320x240 screen, but not to a very noticeable extent (you might overcome that I bit by increasing the video bit rate).

Since the audio is encoded in AMR Narrow-Band the quality is not very high and is mono. But on the positive side, a standard two-and-a-half hour long Hindi movie will fit into 150mb. Though files in RealMedia are known to be even smaller, but pity my phone doesn't support that.

The codec combination that I used to convert my videos on Super (playable on LG KG300 and other phones) was:

Output container: 3gp (Nokia/NEC/Siemens)
Video codec: H.263
Audio codec: AMR Narrow-band

Other details can be found in the screenshot below:



Ideally I would've liked to know of the ideal conversion settings for the MP4 format, but still haven't been able to figure that out. If I do, you'll find that posted here.

If anyone knows of a better software or of a better way if going about doing it, please do let me know.

You might not always have DVDs or VCDs around to convert and feed your mobile phone with. But there are plenty of places online from where you can find good quality videos to download from. One of the sources that I particularly like (for the quality combined with compactness) is Stage6.DivX.com. Though DivX allows downloads from their site, but it is through the DivX player. There's no explicit direct download link.

I hunted around a little and found a shortcut to directly download DivX videos (many others would've also discovered that). Here's a 'How to Download Videos from Divx/Stage6':

1. Go to stage6.divx.com
2. Identify the video that you want to download
3. Right click on the thumbnail and 'Copy Link Location' (on Firefox) or 'Copy Shortcut' (Internet Explorer), alternatively you can left click on the thumbnail and copy the URL from the address bar
4. The URL would be something like: http://stage6.divx.com/The-Last-Stop/video/1361844/My-Favorite-Brunette
5. Copy the numerical id of the video. In our example it is 1361844
5. Insert the id into this URL (replacing the asterisks): http://video.stage6.com/*/*.divx
6. Your final URL now becomes (as per our example): http://video.stage6.com/1361844/1361844.divx
7. To download the file (in DivX format) you can paste the URL into the browser address bar and press enter or let your download manager take care of the downloading.

Occasionally there are errors while downloading multiple files simultaneously from the site, therefore it is preferable to download one at a time. To play the videos you can play it on the DivX player or the very utilitarian VLC media player (which plays multiple formats which most other popular media players don't).

Else, you can convert the downloaded videos on to your preferred format using Super (with many options) or Audio/Video To Exe (very handy and lightweight but minus the customisation options of Super). It is preferable to keep both the free media converters on your PC as often what one cannot do, the other performs seamlessly.

If your movie is split over multiple files, it is preferable that you merge them into a single file before going for the conversion process, so that you enjoy uninterrupted viewing pleasure. 123 Audio Video Merger is a nice and easy freeware utility to care of the video merging process. But it might have some issues while merging multiple vob files.

For the readers of Cutting the Chai, I've put up a mobile compatible version of Akira Kurosawa's masterpiece Rashomon.


You can download the movie for your mobile from the links below:
[01:27:54 3GPP 148 MB 256kbps 8000KHz Mono] [View/Embed/Share]
[01:27:54 3GPP 98.9 MB 156kbps 8000KHz Mono] [View/Embed/Share]


I'll try to upload more movies which are now in the public domain (I like to play it safe) in mobile compatable formats under a newly created category on this blog - Movies for Mobiles.

Click here for the complete post...

Thursday, November 09, 2006

A Little Hack

Many have been cursing Blogger Beta and many more are enjoying the experience. I fall in the latter category. Switching over to Beta had made the blogging experience more worthwhile, thanks to Ramani and his pals, who have consistently come up with improvements for Blogger Beta. I incorporated many to my template, though I did remove a few features on second thoughts.

Last night I was googling for a small hack, to replace the 'Email this post' icon - - with more communicative text. I knew about the hack for Classic Blogger templates, but couldn't find any for the Beta version. So thought of giving it a try myself. I do tweak my template HTML around, but nothing that is worth mentioning. Though this one would seem childish to the coders, I thought of sharing my find with other interested Beta bloggers. Here's the hack (don't know if it qualifies as one).

Changing the Email This Post icon on Blogger Beta

1. Go to 'Layout' on the Dashboard
2. Click on the 'Edit HTML' link
3. Look for this piece of code:

<!-- email post links -->
<b:if cond='data:post.emailPostUrl'>
<span class='item-action'>
<a expr:href='data:post.emailPostUrl' title='Email Post'>
<span class='email-post-icon'>&#160;</span>
</a>


4. Replace the fifth line (in red) with this:

<a expr:href='data:post.emailPostUrl' title='Email Post'>
&#160;Email this post


5. Retain &#160; preceding the inserted text for proper spacing. You can customise the text following that.

Save the template and you are done.

Remember to keep a backup of your older template, just in case things don't work out right.

Click here for the complete post...