Abhishek Gupta

The Sun won’t set at NIT Durgapur !

Posts Tagged ‘linux’

How To Convert Video File in Linux through command line

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: , , , , , , , , , | 5 Comments »

Viewing your server(Remote Desktop) with browser using VNC Java Applet

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:


The applet will prompt you for your password, and should then display the desktop.

Posted in java, Personal | Tagged: , , , , , , , , , , , | 3 Comments »

4 Days with IPS

Posted by abhiitechie on May 14, 2009

Its been four days for me with IPS and I am proud to say that now I am able to write a post dedicated to the very topic of Image Packaging System and porting packages to OpenSolaris . Engineers from the Solaris team have  been working to create IPS packages for OpenSolaris for most of the existing popular open source softwares which are still not existing as binaries to be directly installed to OpenSolaris and needs to be build from source and along with which lies the tedious task of resolving dependencies which some times becomes almost killing and dis-heartening.

Generating IPS package is similar to RPMs which is popular in GNU/Linux and it also uses a file called a Spec file . So IPS specs are similar to RPM specs with some minor differences.

Need for a Spec file:        

 Typical OSS package builds the code using ./configure ; make ;  make install .  Writing a pkginfo file with package metainfo, like name, version,description etc.  Writing a prototype file with list of files and attributes and not to forget the dependency file. All these requires lots of typing and is error prone to . Because of the tediousness people tend to avoid packaging binary tarballs and even  worse build from source.

So we follow the new approach of buillding and packaging in the same step using Spec files . A typical spec file consists of a simple text metainfo mixed with some perl syntax variables and small shell sripts.Metainfo may consist of name, version, description, etc. of the software .It also applies the code changes called patches to the original source while building. Build instructions are tiny shell scriptlets . Package contents are also specified called globs.

Whats inside a spec file ?

  •  Source code availability (URL)
  •  Local code changes (unified or context diffs)
  •  Build instructions
  •  Lists of files to package up (globs)                
  • Package scripts 
  • Metainfo
  • Build-time and package dependencies
  • Changelog          

What we can do as developers ?


● Write a spec file for your favourite app

● Build existing spec files
● Report bugs
● Update packages to the latest version availableBuild the code any way you want
> typical OSS package: ./configure; make;
make install
• Write a pkginfo file:
> package metainfo, like name, version,
• Write a prototype file:
> list of files and attributes
• Write a dependency file
  •  Write a spec file for our favourite app
  •  Build existing spec files
  •  Report bugs
  •  Update packages to the latest version available


More information in the following URLs


Posted in sun | Tagged: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a Comment »

Download YouTube or Similar using Copy Paste

Posted by abhiitechie on April 27, 2009


We watch videos on YouTube, Google videos, and all those FLV powered video sharing portals. We all want to download it and save it for our later pleasure. Ofcourse, lots of desktop applications and command line utilities are available. But if we are on Linux we can have youtube videos with simple copy paste.

The video that you are currently viewing is on /tmp/Flashfoo (the foo can be any random string. After the video is completely buffered, we just have to copy the file to our local disk for persistent storage. That is it.

We can watch as many you want and copy them too. Each of the Flash* files have a unique random character string.

Posted in Personal, Uncategorized | Tagged: , , , , , , , , | 1 Comment »

Resetting password in MySQL when showing Permission denied

Posted by abhiitechie on April 27, 2009

ERROR 1044 (42000): Access denied for user ”@’localhost’ to database ‘TEST’

Stop the mysqld daemon process by 
$killall mysqld

Start the mysqld daemon process with the 
$mysqld –skip-grant-tables option.

Start the mysql client with the        
$mysql -u root option.

Execute the 
mysql>UPDATE mysql.user SET Password=PASSWORD(‘password’) WHERE   User=’root’;  
(say user can be abhishek and password can be abhishek)

Execute the command              


After this start the MySQL client by $ mysql -u root -p 
Enter the newly set password and get down to the business.

Posted in mysql | Tagged: , , , , , , , , , , | Leave a Comment »

The Sun won’t set at NIT Durgapur … I promise !

Posted by abhiitechie on April 25, 2009

As we all might have heard, Oracle has entered into an agreement to acquire Sun. While it is natural to have questions following an announcement of this magnitude, its also important to acknowledge that this is an
industry transforming event. The following excerpt from the Oracle Press Release helps to highlight this point.

“This is a fantastic day for Sun’s customers, developers, partners and employees across the globe, joining forces with the global leader in enterprise software to drive innovation and value across every aspect of
the technology marketplace,” said Jonathan Schwartz, Sun’s CEO, “From the Java platform touching nearly every business system on earth, powering billions of consumers on mobile handsets and consumer electronics, to the convergence of storage, networking and computing driven by the Solaris operating system and Sun’s SPARC and x64 systems.”

Coming back to the question of what will be the future of MySQL under Oracle. I think that as long as there is a demand for a product and such a vibrant community of users and developers behind it the product will never die.

Since it is all business as usual, we should not create a huge fuss about Oracle acquiring Sun and the future of Sun Campus Ambassadorship and the Sun Academic Initiative (SAI). I think we all should focus on our respective efforts to evangelize Free Softwares and continue conducting Talks , Workshops and related Technical sessions and continue building the Talk culture in our college which has just started some times back. We should try building the best open source community in NIT Durgapur with our Sun Club and the GNU/Linux Users’ Group.

Posted in Uncategorized | Tagged: , , , , , , , , , , , , , , , , , | 6 Comments »