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.

Advertisements
Tagged with: ,

6 Responses

Subscribe to comments with RSS.

  1. Mohan Preet said, on February 12, 2009 at 11:33 pm

    Nice blog bro.. I didn’t know you had one… So how is it going? What’s up

  2. Kath said, on February 16, 2009 at 3:26 am

    Tux4life, thanks so much for this. It’s just what I needed, and I didn’t think there was anything you could do with Mplayer, because the GUI gives you no options. I wish they would put all that info into menus. Cheers, Kath.

  3. […] Change MPlayer Playback Speed […]

  4. ethana2 said, on September 1, 2009 at 3:27 pm

    Does it work for Jaunty or Karmic?

  5. roger said, on August 31, 2011 at 12:03 pm

    now how to set it to start playback from a certain speed on the command line…

  6. Mike said, on November 23, 2012 at 11:18 am

    @roger, I know this is late, but you can start with a custom playback speed using:

    mplayer -speed 1.2 -af scaletempo

    replace ‘1.2’ above with your custom playback speed. Remove ‘-af scaletempo’ if you don’t want pitch preservation. Cheers.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: