Skip to main content

Posts

Showing posts from May, 2012

Howto play HD clips in PS3

PS3 cannot play HD clips encoded in the matroska format, popularly known as MKV format . PS3 mostly supports MP4 containers with h.264 video and AAC-LC audio.

The good news is that the MKV is just a container for H.264 HD format video. Therefore, the video need not be re-encoded. It just have to extracted from the MKV container and pasted into the MP4 container. However, MKV files contain uncompressed audio files in the PCM/WAV format. So these audio files have to extracted and converted to the lossy low complexity AAC formats. The LC in AAC-LC stands for low complexity.

It is pretty easy to do. The required steps are same for Linux, Mac or Windows but the softwares used might be different. I would focus on Linux only.

The video repackaging steps are taken from http://askubuntu.com/questions/50433/how-to-convert-mkv-file-into-mp4-file-losslessly. The audio part is mine.

1. Reconnaissance -- Find which channels contain which format.

 mkvmerge --identify video.mkv


File 'video.mkv&#…

Howto mix audio tracks in Audacity

Motivation : To convert uncompressed audio formats with multiple audio formats into mp3 format.

LAME cannot encode WAV and PCM files (uncompressed audio formats) into MP3 which has more than 4 channels. The common error is

Unsupported number of channels: 6

where 6 here is the no. of channels in the audio file.

The only way to get around this is to downmix the audio to Stereo(2 channels) and re-encode using LAME.

Mixing audio is very straightforward with the new Audacity. Make sure that the lame is installed in the system so that the final mix can be encoded into mp3.


1. Open the audio file in Audacity. Notice it has more than 2 channels.





2. You want some tracks on the left channel and some on the right channel. To decide where to put each track is easy. Most probably it is already encoded into the file. Look at the top left corner of each track.





The Mono channel appears in both channels (same sound is sent to both the ears.) Other tracks has Right or Left mentioned.


3. Goto Tracks --…

Run Quake III Arena in fullscreen 64 bit mode with DRI enabled in a Linux OS

Quake III Arena needs minimal OpenGL drivers. The requirements are a little different for each category of video cards. I would review them all.

NVIDIA and ATi

Quake runs stright out of the box with these cards in latest Ubuntu's because the 64-bit drivers are in-built  but there are some hiccups.

1. Quake might open in windowed mode (if the resolution is set to a lower one like 640). To fix that set "Sticky edges" to ON in the DISPLAYS (Type "displays" in the Lens to access it.).

2. Quake might open in a huge window with all letters going out of the screen(if the resolution is set to a higher one like 1280). Exit quake by using the arrow keys. One up key pressed after the Start game is highlighted takes the highlight to Exit(maybe outside the screen). Press enter once. Gives Yes/No menu with No highlighted (may not be visible on screen). Press left arrow key once to highlight Yes (may not be visible on screen) and press enter twice. You would be out of the gam…

innovative way to kill mosquitos

Today I figured out an innovative way to kill mosquitoes sitting on walls and objects without damaging the surfaces. This procedure would also allow to kill the mosquitoes sitting on a curved surface, a very difficult one.

Locate the mosquito.Take empty spray bottle.Fill it with water.Spray the mosquito from a distance so that it cannot sense the proximity of the sprayer.Once it is wet, it cannot fly. Now do whatever you must do with it.

Modify EXIF info or metadata of a picture

SOmetimes the metadata / EXIF information contained in a picture taken from a camera are wrong. It creates problems when pictures from multiple cameras are made into a collage and uploaded into Piacsa. Picasa is unable to correctly sort images according to the time taken if images form of the cameras have shifted times. The following procedure shifts the time on a bunch of image files all begining with DSC.
Note : - Do no do a * in the or loop. It would shift the time on all the images.

TO see the EXIF info

exiv2 image.jpg


File name       : image.JPG
File size       : 3150838 Bytes
MIME type       : image/jpeg
Image size      : 2592 x 1944
Camera make     : SONY
Camera model    : DSC-HX5V
Image timestamp : 2012:04:29 17:11:21
Image number    :
..............

exiv2  -a : edits the date 
ad : performs the action

Now, the real code to shift time.

$ for image in DSC*; do exiv2 -a 15:00:00 ad  ${image}; done

source : http://nytefyre.net/2011/11/editing-image-metadata-with-exiv2/

Add arXiv hyperlink to bibtex in under 1 seconds

Add hyperlinks of arXiv numbers to all the bibtex entries in a bib file in under 1 second. This is accomplished by a script.  The user only needs to have a bibtex file which already has the eprint entry for every bibtex item. The rest would be handled by the script.

This procedure is not necessary for some packages and bst files. it becomes necessary when specialized citation packages, like natbib, are used. Natbib generally do not include the hyperlink to the eprint number and some bst files for natbib like pjgsm.bst would completely ignore the eprint field.

The following script would amend this situation. It basically hard codes the hyperlinked arXiv number  into the journal entry. So hen the bibtex is run the journal entry would include the hyperlinked arXiv number. I wrote this script with bibtex from the NASA ADS server in mind. Bibtex from other sources might need some modification.

Critical comments and suggested improvements are welcome.

NOTE !!! I deliberately deleted 2 cruc…