How to change jump time in totem media player? It's by default 60 sec jump forward and 15 sec jump back.
3 Answers
- shift, Right Arrow: forward 15 seconds
- shift, left arrow: back for 5 seconds
-
3
-
3
-
-
2This issue is still present years later. Having different times for going back and forward is very inconvenient when looking for something; I wish I could set them both to 5 seconds.. May 18, 2020 at 19:37
You can still download the source code and modify a couple lines.
This is rather easy.
Ensure your configuration allows you to download source code directly from
apt
(open "Software and Updates", check the "Source code" box, if unchecked, close and click "Reload")cd
somewhere where you can get the source code and work on it
Some commands
apt source totem # get the source code
sudo build-dep totem # get the necessary dependencies to build totem
cd totem-x.y.z # where x.y.z is the version you just downloaded
dpkg-buildpackage -rfakeroot -uc -b # builds the package (.deb)
The program totem
itself should be there to be executed (from where you are)
obj-x86_64-linux-gnu/src/totem # (on a 64 bits system)
Once you get here, it's easy to modify the forward / backward times, then repeat the build procedure (dpkg-buildpackage)
Open the C source code from your favorite editor (vi, emacs, ed...)
vi src/totem-object.c
You should see near line 70 (your version might differ)
#define SEEK_FORWARD_SHORT_OFFSET 15
#define SEEK_BACKWARD_SHORT_OFFSET -5
#define SEEK_FORWARD_LONG_OFFSET 10*60
#define SEEK_BACKWARD_LONG_OFFSET -3*60
adjust the numbers (seconds) to what you want then repeat the build procedure.
You can execute this version you just compiled (as shown above), or uninstall totem (apt remove totem
) and then install the new .deb
.
Credit: got help from this great post https://askubuntu.com/a/28373/6619
Based on e2-e4's Solution, here is a way how you
can also add the modified player to the menu entry
and set it as your default media player:
ctrl+alt+t
Step 1) Get source code:
~$ sudo mkdir -p /usr/local/bin/totem
~$ cd /usr/local/bin/totem
…/$ sudo apt source totem # get source code
…/$ sudo apt build-dep totem # get dependencies
…/$ cd totem-XYZ # where XYZ is the downloaded version
…/totem-XYZ$ xdg-open src/totem-object.c # modify seek offsets in source file
Step 2) Modify jump time seconds:
#define SEEK_FORWARD_SHORT_OFFSET 5 // [shift]+[right]
#define SEEK_BACKWARD_SHORT_OFFSET -5 // [shift]+[left]
#define SEEK_FORWARD_LONG_OFFSET 10 // [ctrl]+[right]
#define SEEK_BACKWARD_LONG_OFFSET -10 // [ctrl]+[left]
Step 3) Build debian package:
…/totem-XYZ$ sudo dpkg-buildpackage -rfakeroot -uc -b
Step 4) Run custom totem video player:
…/totem-XYZ$ ./obj-x86_64-linux-gnu/src/totem
Step 5) Set modified totem media player as default (Reference):
…/totem-XYZ$ cd ~/
~$ wget -c https://upload.wikimedia.org/wikipedia/commons/c/c3/GNOME_Video_icon_2019.svg?download -O totem-logo.svg # get icon
~$ sudo mv totem-logo.svg /usr/share/pixmaps/ # move icon
~$ cat << EOT >> totem_media_player.desktop
[Desktop Entry]
Type=Application
Name=Modified Totem Player
Comment=A free media player for the GNOME desktop environment.
Icon=/usr/share/pixmaps/totem-logo.svg
Exec="/usr/local/bin/totem/totem-3.34.1/obj-x86_64-linux-gnu/src/totem" %f
Terminal=false
Categories=AudioVideo
EOT
~$ desktop-file-validate totem_media_player.desktop # validate file
~$ mv totem_media_player.desktop ~/.local/share/applications # move file
~$ update-desktop-database ~/.local/share/applications # update menu entries
Step 6) Right click on a .mp4
video file and change default application:
Step 7) Done.