5

I'm trying to find out whether the default video player in Ubuntu 16.04 (Totem) can increase or decrease playback speed. Most of what I found on the web were old threads from 2009-2011.

There are some totem plugins on the Gnome website but none of them mention playback speed. I know VLC has this feature but it's been a bit slow and clunky on Ubuntu so I'd rather stick to the default player.

3 Answers 3

8

You can speed up or slow down videos in the Totem Video Player using a utility button at the bottom of the player.

enter image description here
Totem video player in Ubuntu 18.04

3
  • It's a good answer btw.
    – karel
    Nov 23, 2018 at 5:19
  • The options aren't very useful, though. There should be a much wider range or a slider from (say) 0.1 to 10.0.
    – AlainD
    Nov 26, 2019 at 10:27
  • This answer is still valid in Ubuntu 21.04. The icon on the button looks different, though.
    – Flimm
    Jul 24, 2021 at 12:00
3

There is nothing that can slow down or fasten up the videos in totem but you can use VLC's native slower/faster functionality even while working in other applications.

To do so:

  1. open VLC -> tools -> preferences -> hotkeys
  2. select "Global" where it shows "Any field"
  3. set the fasten key-combination
  4. set the slow-down key-combination
  5. set the pause/play key-combination
  6. click save
  7. restart VLC

enter image description here

and its done , namaste

2

You can click [ and ] to control speed.

Build from source

first clone repo.

git clone https://gitlab.gnome.org/GNOME/totem.git

git checkout your totem version.

git tag  // see all version tags 

git checkout tags/{version}

vi src/plugins/variable-rate/totem-variable-rate-plugin.c 

#define NUM_RATES 6  // i use only 6 types of speed. [0.75 to 3.0]  

static struct {
float rate;
const char *label;
const char *id;
} rates[NUM_RATES] = {
    { 0.75,  NC_("playback rate", "× 0.75"),  "0_75" },
    { 1.0,  NC_("playback rate", "Normal"), "normal" },
    { 1.5,  NC_("playback rate", "× 1.5"),  "1_5" },
    { 2.0,  NC_("playback rate", "× 2.0"), "2_0" },
    { 2.5,  NC_("playback rate", "× 2.5"), "2_5" },
    { 3.0,  NC_("playback rate", "× 3.0"), "3_0" }
};

Write the speed you want.

Here my top speed is 3x. Totem only supports below or equal 2x speed. So I need to change one more place.

vi src/backend/bacon-video-widget.c
Function name - bacon_video_widget_set_rate()
  
if (new_rate < 0.5)
  return retval;
if (new_rate > 3) // <--- here you have to change.
  return retval;

Now build and install your system.

vi build.sh

create file bash.sh and save build script.

#!/bin/bash

builddir="build"
[ -d $builddir ] && sudo rm -rf $builddir
sudo meson setup $builddir
sudo ninja -C $builddir
sudo ninja -C $builddir install
sudo rm -rf $builddir

run script

bash build.sh

Screenshot

Image

1
  • package: sudo apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev devlibpeas-1.0-0 libpeas-dev libclutter-gst-3.0-dev libgrilo-0.3-dev libgnome-desktop-3-dev
    – Tamil
    Nov 13, 2022 at 12:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .