Posted by abhiitechie on August 30, 2009
Get the ffmpeg package first from the repo by
sudo apt-get install ffmpeg
Then follow the following command lines to get going
3gp to avi : ffmpeg -i source.3gp -f avi -vcodec xvid -acodec mp3 -ar 22050 destination.avi
flv to 3gp : ffmpeg -i source.flv -s 176×144 -vcodec h263 -r 25 -b 200 -ab 64 -acodec mp3 -ac 1 -ar 8000 destination.3gp
flv to mp4 : ffmpeg -i source.flv -vcodec h264 -r 25 -b 200 -ab 128 -acodec mp3 -ac 2 -ar 44100 destination.mp3
avi to mp4 : ffmpeg -i source.avi -f psp -r 29.97 -b 768k -ar 24000 -ab 64k -s 320×240 destination.mp4
mp4 to 3gp : ffmpeg -i source.mp4 -s 176×144 -vcodec h263 -r 25 -b 12200 -ab 12200 -ac 1 -ar 8000 destination.3gp
avi to 3gp : ffmpeg -i source.avi-s qcif -vcodec h263 -acodec mp3 -ac 1 -ar 8000 -r 25 -ab 32 -y destination.3gp
mpg to 3gp : ffmpeg -i source.mpg -s qcif -vcodec h263 -acodec mp3 -ac 1 -ar 8000 -ab 32 -y destination.3gp
Enjoy !
Posted in linux, Personal | Tagged: 3gp, avi, command, convert, ffmpeg, line, linux, mp4, ubuntu, video | 6 Comments »
Posted by abhiitechie on August 16, 2009
Hi people , this post is all about a project which I started roughly a month ago by the name of “QFlicks”. It was named so because the graphics library I chose to use is the popular Ot and the application is a movie collection cataloger which scans the disk for media files and gets film informations (duration, plot, cover ,rating ,poster cover , casts etc) from the popular Amazon’s http://imdb.com or the Internet Movie Database . It also allows the user to filter his possessions based on movie titles,genre,ratings , seen or unseen etc.
The later versions of the software will witness subtitle downloader extention and many more.
Here are the basic features which I plan to inmplement in version 1.0
- Scanning user-chosen directories to find media files (films in a first time)
Status : Done
How : Used a recursive OS walk algorithm to extract movies from all folders , sub-folders , sub-sub folders etc.
- Extracting film titles from file names (tough one if files are not properly named)
Status: Done
How: Using Neural Network algorithms and and basic Regular Expression.
- Create a list of these names in a database get films information (duration, plot, poster cover , rating , casts etc) from imdb
Status : Done
How: Used a library named IMDBPy as imdb.com does not provide and API (Another example of Amazon’s miserness). The database used is MySQL which experienced developers feel is a wrong choice for desktop.
- display films list and information of the selected one
Status: Done
Status: More or less done until someone comes out with bugs
- Filtering based on genre , title ,rating seen or unseen etc.
Status: Not Done
To Do: Learn multiple substring search in SQL ( SQL sucks , I hate it)
Status : The Gui is simple but not clean and hangs as I have not implemented the Multi-threading
To Do : Learn Multi-threading and make the network call fuctions run in separate threads in the background and also need to implement customized Progress Bars for UI
Plugins (towards upper versions):
- subtitle downloader
- playlist manager
- automatic new files inclusion (directory survey)
- music album and video series handling
Tools Used:
- Python as the Programming Language
- Qt as Graphics Library
- QtDesigner for the Gui
- SVN as versioning program
- MySQL as database software
- IMDBPy as the library
- GPLv3 licence
Here is the screen-shot of my Work :
The sourceforge Link for the project is :
Get the source from the Repository :
svn co https://qflicks.svn.sourceforge.net/svnroot/qflicks qflicks
Current OS Support :
Gnu/Linux with Qt >= 4.5 and MySQL >= 5.0
Newbies who don’t know how to use SVN or are facing problems with code can mail me at
mailto: abhii.cse.nitdgp@gmail.com
The project is likely to see its first release on 24th of August 2009
Posted in mysql, Personal | Tagged: abhishek, catalogue, downloader, gupta, internet, link, manager, movie, mysql, nit, pyqt, qflicks, qt, sourceforge, subtitle, svn | 3 Comments »
Posted by abhiitechie on August 9, 2009
I was onto my usual facebook quizzes when my eyes fell on my friend Govind’s status which asked
“Kya Apke Toothpaste me namak hai ??”
This was enough to provoke something like this (see below) with the help of some more contributors namely my friends Alok Sharma and Piu Chatterjee .
Here is the list of the worst television advertisements ever…….
Govind Daga Kya aapke toothpaste mein namak hai!!??
Credits : Govind , Me , Alok and Piu
CopyLeft – All rights unreserved
Credits :
1. Govind Daga (Initiator)
2.Abhishek Gupta
3.Alok Sharma
4.Piu Chatterjee
Posted in Personal | Tagged: ads, advertisment, ever, television, worst | 2 Comments »
Posted by abhiitechie on May 20, 2009
Sun’s India Engineering Center (IEC) occupies most of the Divya Shree Chambers building off Langford Road in Bangalore. I kept on telling everybody that is near M.G Road but in reality it is nothing like that



Lunch (always a major preoccupation with me) is provided at the 5th-floor canteen, which gets very crowded around 12:45,hence sometimes we need to book the conference room to have our lunch . There’s a buffet of both Vegetarian and its non counterpart for a reasonable sum of Rs 35 /- (Very very cheap as per Bangalore standards but just a bit expensive as per Kolkata standards.)


For a change we can order fresh fruits , as I saw for some ladies who prefered them for the dieting routine.

The Sun break rooms have a great selection of teas, including elaichi (cardamom), masala (what Americans call chai spice), and ginger. Plus a selection of other hot drinks – cocoa, instant coffee, and flavored mixes that I haven’t quite understood yet.

There’s a machine dispensing hot water and hot milk to mix these with. There is also brewed coffee, chocolate powder,tomato soup mix and powdered,badam milk and many more .

Now coming to the important part that is WORK . The very first day I got my Badge ready for which there was a photo session sort of arrangement at the ground floor near the data-center . For the first time in my life I felt very important .
For those of you who don’t know what a Badge is , I will like to tell that it is card like thing with my photo and other details and chip and a magnetic strip .It comes to use at the security gates where we need to show it a sensor and only then the door opens .Besides this is used when we need to use a Sun Ray machine ( Runs on Solaris 10 and has a SPARC architecture) , it is inserted into a slot inside the machine.

Its is a really nice environment around to work with caring and loving seniours and and lots of respect for every employee . The working time is flexible ,by flexible I mean there is no fixed working schedule and timing or anything like that . When you are done with your work you can can go home and sleep and if its like you prefer to work nights then you can work in the office during the nights.
So I am kind of enjoying the experience as a Sun Intern and another news I have just heard that Sun IEC Bangalore will be celebrating its 10th birthday by throwing a huge party at a hotel called OTERRA at Electronic city and we are invited . So my next post will be on IEC 10 years of Engineering Excellence.

Posted in Personal, sun | Tagged: ambassador, bangalore, cafeteria, canteen, chambers, divyashree, experiences, IEC, internship, langford, microsystems, ray, road, sparc, sun | 11 Comments »
Posted by abhiitechie on May 19, 2009
Three days of work all gone I wont say waste when I found openVPN already in the /pending directory by someone named Martin but still I learned from my mistakes and gained some experience with this thing and so I have been able to make three submissions in one day to the Source juicer hoping for some success. Still I am in my early days as a software porter for opensolaris and has lot to learn . Keeping my fingers crossed for the submissions to get accepted .
The specs submitted by me are for:
Sribes ( http://scribes.sourceforge.net): Very sleek looking graphical editor for the Gnome desktop of Opensolaris.
Gnome-schedule ( http://gnome-schedule.sourceforge.net ) : Graphical sytem administration tool.
GTK2Edit ( http://sourceforge.net/projects/gtk2edit ): Simple Gnome text editor.
Posted in Opensolaris, sun | Tagged: abhishek, day, gnome-schedule, gtk2edit, gupta, juicer, one, open, openvpn, package, port, scribes, solaris, source, specs, submitted, three | Leave a Comment »
Posted by abhiitechie on May 18, 2009
As it is very difficult for everyone to make the trip to San Francisco to attend JavaOne. That’s why special arrangements has been made to bring JavaOne to the Open Source University Meetup (OSUM) Community. OSUM has scheduled a series of webinars which are previews of hands-on labs that will be conducted at JavaOne.
Check the OSUM events calendar for the complete schedule and RSVP today.
Posted in sun | Tagged: calender, event, javaone, meetup, open, osum, source, university, webinar | Leave a Comment »
Posted by abhiitechie on May 18, 2009
VNC consists of two components. A server, which runs on the computer you want to remotely access, and a viewer, which runs on the computer you are sitting in front of. There are two important features of VNC:
- The server and the viewer may be on different machines and on types of computer. The protocol which connects the server and viewer is simple, open, and platform independent.
- No state is stored at the viewer. Breaking the viewer’s connection to the server and then reconnecting will not result in any loss of data. Because the connection can be remade from somewhere else, you have easy mobility.
So to get started with VNC you need to run a server, and then connect to it with a viewer. First of all, you have to download and install the software on the platforms you want to use.
VNC software requires a TCP/IP connection between the server and the viewer. This is the standard networking protocol on LANs, WANs, broadband and dialup ISP. Each computer has a unique IP address and may also have a name in the DNS. You will need to know the IP address or name of the server when you connect a viewer to it.
The VNC servers also contain a small web server. If you connect to this with a web browser, you can download the Java version of the viewer, and use this to view the server. You can then see your desktop from any Java-capable browser, unless you are using a proxy to connect to the web. The server listens for HTTP connections on port 5800+display number. So to view display 2 on machine ‘snoopy’, you would point your web browser at:
http://snoopy:5802/
The applet will prompt you for your password, and should then display the desktop.
Posted in java, Personal | Tagged: applet, browser, desktop, http, java, linux, network, remote, server, tcp, vnc, windows | 2 Comments »
Posted by abhiitechie on May 18, 2009
He is the man behind all those brilliant screen casts and blog posts and loads of tutorials for both Netbeans and OpenSolaris. Finally he has decided to leave Sun but he will still stick on to Java and work for JavaOne
Here is what he writes in his blog http://blogs.sun.com/roumen/entry/leaving_sun)
“I have decided to quit Sun Microsystems. I spent amazing 5 years at Sun and I am very grateful for all I’ve learned with the company. Working on both NetBeans and OpenSolaris adoption was real fun so I leave with very mixed feelings.
I am going back to Java developer business and will be going to Java One with my new employer, so you will find me in the Java One pavilion area if you want to say hi. I wish my Sun colleagues good luck with their new adventures!
P.S. Thanks for all the beans.“
Wish you all the best Sir . Keep enlightening us with your screencasts.
Posted in sun | Tagged: javaone, leaving, microsystems, roumen, screencasts, strobl, sun, tutorials | Leave a Comment »
Posted by abhiitechie on May 17, 2009
The Getting Started with OpenSOlaris 2008.11 mini-books were recently
released. They are available in English, Brazilian Portuguese, Spanish, Italian, German, Traditional Chinese, Simplified Chinese, Korean and Japanese.
You might notice that there is a difference between the content of these books. They are composed by three different documents, and only the ones in English, Simplified Chinese and Japanese have them all. All other languages have only one document.
The books have a pretty basic approach, so they are aimed at people who doesn’t have much experience with the OS. This makes them perfect to be indicated during basic courses and presentations.
It seems that the 2008.11 version of these mini-books will be available only in the digital format.
Download:
OpenSOlaris 2008.11 mini-book (English)
Posted in sun | Tagged: abhishek, book, Club, download, durgapur, free, gupta, mini, nit, open, open solaris, Opensolaris, solaris, sun | 1 Comment »
Posted by abhiitechie on May 17, 2009
Here are some examples of using regular expressions for input validations in javascript.
var input = “hello222″;
var ok = false;
var dob_regex = /^([0-9]){2}(\/){1}([0-9]){2}(\/)([0-9]){4}$/; // DD/MM/YYYY
var email_regex = /^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/; // email address
var username_regex = /^[\w.-]+$/; // allowed characters: any word . -, ( \w ) represents any word character (letters, digits, and the underscore _ ), equivalent to [a-zA-Z0-9_]
var num_regex = /^\d+$/; // numeric digits only
var search_regex = “/hello/”;
var password_regex = /^[A-Za-z\d]{6,8}$/; // any upper/lowercase characters and digits, between 6 to 8 characters in total
var phone_regex = /^\(\d{3]\) \d{3}-\d{4}$/; // (xxx) xxx-xxxx
var question_regex = /\?$/; // ends with a question mark
1. Check that there are at least 3 numeric characters in input
if ( input.match(/d/g) == null ) {
ok = false;
} else if ( input.match(/d/g).length < 3 ) {
ok = false;
} else {
ok = true;
}
2. Check that the input has a minimum of 8 characters
if ( input.length >= 8 ) {
ok = true;
}
3. Check that the input is in a correct date format (DD/MM/YYYY)
if ( dob_regex.test(input) ) {
ok = true;
}
4. Check that the input is in a correct email format (username@example.com)
if ( email_regex.test(input) ) {
ok = true;
}
5. Check that the input matches the specified username format
if ( username_regex.test(input) ) {
ok = true;
}
6. Check that the input contains only numeric characters
if ( input.match(num_regex) ) {
ok = true;
}
7. Search for a specific word in the input
if ( input.search(search_regex) != -1 ) {
ok = true;
}
8. Check that the input matches the specified password format
if ( input.match(password_regex) ) {
ok = true;
}
9. Check that the input matches the specified phone number format
if ( input.match(phone_regex) ) {
ok = true;
}
10. Check that the input is a question (ends with a question mark)
if ( question_regex.test(input) ) {
ok = true;
}
Posted in Personal, web | Tagged: examples, expression, java, javascript, regular | 7 Comments »