Tuesday, September 7, 2010

How to fix *.OGV file to upload on YouTube (for Ubuntu 10.04 LTS users)

Hi Guys,
Just sharing my experience with *.ogv, while I was trying to upload a video on YouTube.
I was using Ubuntu 10.04 LTS and used gtk-recordMyDesktop to record a screencast and uploaded the video on YouTube, I found that youtube is showing completely gabbled video.

I could not figure out the problem but i simply converted the video to avi and uploaded on youtube, problem solved!!

How to convert to avi?
Basically you have 3 options.

  1. Using mencoder.
  2. Using ffmpeg.
  3. Using DeVeDE.



The only option which worked really nice with me is mencoder (use following command)

mencoder input.ogv -ovc xvid -oac mp3lame -xvidencopts pass=1 -o output.avi

Problem with other 2 options ( i observed)

  1. DeVeDe was converting correctly, but messing up with the length of video.
  2. ffmpeg completely failed to convert (was gabbling the video like Youtube).

To install mencoder use ubuntu software center.

Monday, September 6, 2010

Portable wire-free Wi-Fi Router in India



Tata has launched a new product “TATA Photon Wi-Fi Router”. With this, you can now create a portable hotspot anytime, anywhere. It is a device that enables you to share Wi-Fi with up to 5 users/devices simultaneously to access internet: Imagine the whole family accessing the internet from their respective devices – iPod Touch, WiFi enabled smartphone, laptop – on the go, all using this one portable router!

Introductory price is 4999/-

Device is powered by rechargeable Li-ion Battery.
More Information find here

Monday, July 26, 2010

Chrome Extension to do YQL page scraping. (quickest way to create a YQL mashup)

Hello ,
This weekend I was in Bangalore to attend "Yahoo Hack Day", Where I wrote a hack, which is a Chrome Extension to make your life really easy when you are trying to do some page scraping using YQL. My hack is also the "winning hack".

Name of the extension is ChromYQLip, which you can install from here.

Here is demo video



Yahoo hack days are great event, this time in India total participants were more that 450 and a total of 142 Hacks submitted and 108 hacks presented.

Thanks for reading My blog

Saturday, July 17, 2010

How to use Javascript beautifier with gedit.

Javascript beautifier is an awesome online tool to indent your JavaScript code. I use it very often.
Earlier I  use to paste my code in this online tool to get my JavaScript code indented.
Fortunately there is a way to integrate javascript beautifier with gedit.
Here are steps(I hope u are using latest version Ubuntu Linux, and having python).
Step1:Install gedit plugin "External Tools".
open gedit and go to edit->preferences->plugins(tab)
see if you already have a plugin "External Tools", if not install using this command.
$ sudo apt-get install gedit-plugins

After inslalling enable this plugin from edit->preferences->plugins(tab).
Step2: Install Rhino Shell.
You need Rhino Shell, to execute javascript on commandline.
To check whether you already have "Rhino Shell" or not, type "js" on Command Line.
You can Install "Rhino Shell" by typing this command.
$ sudo apt-get install rhino

Step3: Download einars-js-beautify.
You can download it here http://github.com/einars/js-beautify .
Extract it in some folder. lets say you have extracted it in folder
"/home/markandey/dev/einars-js-beautify/" .

Step4: Configure plugin to use jsbeautify.
Now go to "gedit->tools->manage external tools" and add a new command script, with following description.

Description: Beautify Javascript using einars jsbeautify
Shortcut Key:  
Commands:

#!/usr/bin/env python

import os
import sys
import tempfile

jsbeautify_path = "/home/markandey/dev/einars-js-beautify/"

content = sys.stdin.read()
h, tmpfile = tempfile.mkstemp()
os.close(h)

f = open(tmpfile, "w")
f.write(content)
f.close()

cmd = "js beautify-cl.js -i 4 %s"%(tmpfile)
os.chdir(jsbeautify_path)
content = os.system(cmd)
os.remove(tmpfile)


use these attributes.
Input: Current Selection.
Output: Replace the current selection.
Applicability: All documents.

That's it! you are done!

Thanks for reading my blog.

Sunday, June 13, 2010

HindiTransliteration (c# and JavaScript implementation, works offline)

When I was in college, I wrote a quick and dirty code to transliterate in Hindi (DevNagari Script). Much before Google's Implementation.
{This code was kept on my old desktop PC,I Thought, its a good idea to share with the rest of the world}



Though my implementation is not very robust, but Its very simple and small. It does not require any Internet connection and can work offline.

Note: code was originally written in C#.net and converted to javascript latter.
Here is C#.net Code(solution zipped)

You need to call function
DoTransLitrate(str)
Where str(as input): Phonetically typed (in English) Hindi .
Returns: Hindi in Devnagari script.


Using JavaScript Code
Get the JavaScript File from here include in your html page and call function
DoTransLitrate()
  DEMO