Printing to PDF File in Ubuntu

Posted in Ubuntu HowTo's by tux4life on January 12, 2009

We all know that OpenOffice has a very nice feature to export any document to a PDF file.

But still, I was looking for a solution to print to a PDF file.  Yet again, with google’s help I found out that this functionality is provided by the package cups-pdf.

Follow the steps below to install and configure this package.

Open up a terminal and use the following command to install this package.

sudo apt-get install cups-pdf

Restart the printer service using

sudo /etc/init.d/cups restart

Finally, open up the printer configuration dialog using

System -> Administration -> Printing

Add a new printer by selecting “PDF Printer”, continue by selecting defaults.

Now when printing, you can select the newly created printer to print to a PDF file.

Advertisements
Tagged with: , ,

Change MPlayer Playback Speed

Posted in Ubuntu HowTo's by tux4life on January 7, 2009

Being a university student, I tend to see lots of lecture videos.  Often, these lectures tend to be very tedious and would take for ever to complete.

I was happy to see a feature in Windows Media Player that allowed faster playback without affecting the audio or video quality.  (For once, Microsoft had implemented a feature that actually works and is useful 😉 ) But this made me restart and change to Windows just for the sake of viewing the videos, clearly an annoying thing.

Being a trusty Ubuntu user for more than 4 years, I somehow had a hunch that there would be a solution for this in the Open World.  With some help from Google, I was able to achieve the same with MPlayer.

MPlayer 1.0rc2 that is present in Intrepid Ibex repos allows one to decrease or increase playback speed using the keys “[” and “]” respectively.  (More MPlayer keyboard shortcuts can be found here) When used to increase of decrease the playback speed, audio goes bad as the pitch does not change with respect to playback speed.

This audio problem can be corrected by using the audio filter scaletempoScaletempo filter automatically adjusts the pitch according to the playback speed.  Unfortunately, this filter is not bundled with MPlayer 1.0rc2 but is part of the latest development build which can be installed as follows.

Add the following lines to the /etc/apt/sources.list file (Click Here to visit the webpage for this repo)

deb http://ppa.launchpad.net/rvm/ubuntu intrepid main
deb-src http://ppa.launchpad.net/rvm/ubuntu intrepid main

To install the latest build of MPlayer, open up a terminal and run

sudo apt-get update
sudo apt-get install mplayer

If you already have MPlayer, open up a terminal and run

sudo apt-get update
sudo apt-get upgrade

This should upgrade MPlayer to the latest version and also installs scaletempo audio filter.

To test if scaletempo filter is installed, run the following command in a terminal.

mplayer -af help

This would display the list of audio filters available and scaletempo should be one of them.

To enable this filter while startup, use in a terminal

mplayer -af scaletempo

(You can also update the MPlayer shortcut to include this filter)

Now the keys “[“, “]” should decrease / increase the playback speed and also adjust audio’s pitch automatically.

Tagged with: ,