Wednesday, December 21, 2011

How to combine or join a video and an audio file on Linux?

The following command will join the audioFile(audio) and videoFIle(video) into outFile.mp4:

mencoder  -ovc copy -oac copy -audiofile audioFile.mp3 videoFile.avi -o outFile.mp4

Monday, December 12, 2011

Installing printer on Ubuntu in Soc NUS: The postscript error!

Hi,

Last few days I was trying to make a Lexmark duplex printer work on my Ubuntu system. I followed the standard steps of installing printers in SoC/NUS
  • Go to Systems->Administration->Printing 
  • Click on the Add and select Network Printer
  • From the dropdown menu, select "Windows Printer via SAMBA"
  • Lets assume we want to add printer psa518-dx printer. Also, I am staff, so I will use nusstf,  and nts09, students should use nusstu and nts27 instead:

    • add the SMB printer name as "nusstf/nts09/psa518-dx"
    • Click on "Set Authentication details now" and enter username (mukesh, no domain required) and password (..., it appeared like that for me :-))
  • Click forward and choose appropriate driver. In my case it was Lexmark
  • Click forward and again select specific driver e.g. T642 and click forward
  • Enter any printer description such as Lexmark, laserjet, PSA518 etc. and click "Apply".
  • Print the test page and click OK.
If you are lucky, this will work and you would have printed test page properly. However, in most of the cases you get an error something like this:
Postscript error: %%[ Error: configurationerror; Offending Command: setpagedevice]%%

This is because you still need to configure the printer for various details. To do that, go to the printing, right click on the installed printer, and select properties:
  • Select printer Options. In that, select Page Size-A4; Media source-Default; Double sided printing-Long edge(standard); Resolution-600
  • Select Job Options. In that, click on the "+" symbol below "Pages per slide" and select  "Two-Sided (long-edge), leave others as they are.
  • Save the settings and print the test page again!
Bingo!!! you can print now :-)


Thursday, November 17, 2011

How to Disable lo-jack/ joy stick/ track stick/ pointing device on Windows 7 Dell Latitude

The dell latitude laptop comes with in built joy stick to control the pointer which is placed right in the middle of the keyboard. While it allows to manipulate the pointer without getting away from the keyboard, not everyone is used to this facility. And whenever you hit the button by mistake, the cursor moves to some random place, making it very difficult to type. I was too annoyed by random cursor movements.

The solution to the problem is following:

  1. Go to dell drivers and downloads page (http://support.dell.com/support/downloads/index.aspx).
  2. Select "Choose by Service Tag" and enter your laptop service tag or select the model of your laptop for driver download.
  3. Select your operating system.
  4. From "Category", select "Mouse and Keyboard" option.
  5. Download "Multi-Touch Touchpad" driver (Multi-Touch Touchpad- the link may change over time, but you should be able to find same driver at other place) and install it on your computer.
  6. On restart, you will see "Dell Touchpad" icon in your task bar (right bottom part of your laptop).
  7. Double click on icon, select point stick from top, and OFF it by clicking on "o".
Enjoy!
-Mukesh

Wednesday, October 19, 2011

Video stabilization on Ubuntu Linux!

Video taken by handheld cameras is generally shaky. To some extent, this video can be deshaked by video stabilization. There are many commercial software available for video stabilization. Fortunately, Ubuntu Linux comes with an application called "transcode" that can be used to stabilize videos. If this application is not installed, you can run the following command to install this:

  sudo apt-get install transcode


Video stabilization is two step process. The first step analyzes the whole video clip to extract camera motion information, and the second stabilizes the video according to the detected camera motion (stored ar *.trf in the same folder after first step).


  • For the first step, you have to go to you the directory where you have stored your videos and execute the following command:     
          transcode -J stabilize -i yourvideo.MP4 

when you execute this command, you will probably get the following error "transcode [filter_stabilize.so] warning: unsupported Codec: 2 (11| 0| 9)" (unless this bug is already fixed in your version of transcode). Some websites suggested including mplayer in command "transcode -J stabilize --mplayer_probe -i yourvideo.MP4", but it doesn't seem to work.  

A working solution to this problem is found at [1] as following:
    • Visit the vid.stab download page and download the latest plug in binary. Currently called "Version 0.75, binary files (linux 32bit i586), works with 1.1.X". This is a packed .tgz file that contains the plug in (filter_stabilize.so andfilter_transform.so).
    • Unpack the plug in: you can double click the .tgz file, double click the stabilize folder,  then drag the two .so files to the Desktop.
    • Open a terminal and move filter_stabilize.so and filter_transform.so from the desktop into /usr/lib/transcode/ overwriting the files with the same names. Type something like: sudo mv /home/YOURUSER/Desktop/filter_* /usr/lib/transcode/ (where YOURUSER is your Linux user name).
    • Execute the command again:
                 transcode -J stabilize -i yourvideo.MP4 
  • For the second step, execute the following command:
      transcode -J transform -i yourvideo.MP4 -y xvid -o yourstabilizedmovie.avi

The resulting deshaked video is stored in the same directory as yourstabilizedmovie.avi.

Enjoy!!!
 

References

Thursday, May 19, 2011

Editing different video format files with the windows movie maker

The main problem in editing files with windows movie maker is that it supports only limited number of formats. On the other side, we have VLC player, and open source software that supports almost all formats.

In this article we provided step by step guide to first use the X format video files into .mpg file which are seamlessly supported by windows movie maker.

  1. Open VLC player
  2. Click Media=>convert/save
  3. Add the video file you want to edit
  4. Click on convert/save
  5. Provide the path of the output file. Use .mpg as extension
  6. In the settings box, click on the "Create new profile" (Rightmost of the three buttons)
  7. Select MPEG-TS encapsulation
  8. Click on video codec and select MPEG-1
  9. Click on Audio Codec and select MP3
  10. Give appropriate name to the profile and save
  11. Use this profile to convert the files now
Cheers!!!!