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 intrepid main
deb-src 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: ,