bmerry / rbtempo

Rhythmbox plugin to adjust playback speed
GNU General Public License v3.0
17 stars 3 forks source link

Does this still work? #5

Closed josephwb closed 1 year ago

josephwb commented 1 year ago

I am using Rhythmbox 3.4.4 on Ubuntu 22.04. I installed the plugin and activated it via preferences, but when I play anything I do not see a slider in the tool bar.

bmerry commented 1 year ago

I haven't tried using it for a long time. I'm running Ubuntu 22.04 this weekend, so I'll take a look this weekend.

bmerry commented 1 year ago

It still seems to be working for me. If you run rhythmbox from the command line it might print out some error message that will help you debug it.

josephwb commented 1 year ago

Hrm. Thanks for checking. I do get errors, but nothing seemingly relevant:

(rhythmbox:233548): Gtk-WARNING **: 07:08:11.912: actionhelper: action app.play-repeat can't be activated due to parameter type mismatch (parameter type b, target type NULL)

(rhythmbox:233548): Gtk-WARNING **: 07:08:11.912: actionhelper: action app.play-shuffle can't be activated due to parameter type mismatch (parameter type b, target type NULL)

Do you mind posting an image of what it is supposed to look like?

bmerry commented 1 year ago

That's what it looks like for me. Since I've upgraded my system from older Ubuntu versions it might look different in a fresh install.

Screenshot

josephwb commented 1 year ago

I was just about to say "thanks but I give up", because my rhythmbox looks completely different from yours. However, I looked into what all was installed on a fresh install. By default the additional package rhythmbox-plugin-alternative-toolbar is also installed, which was apparently breaking your plugin. So maybe add sudo apt-get remove rhythmbox-plugin-alternative-toolbar on the installation instructions?

However, while I now have the slider, and it indeed slides, it does not change the tempo at all. Is there any dependencies I might be missing?

BTW, thanks for the help. I realize that this is quite an old repo, and did not really expect any replies :)

bmerry commented 1 year ago

BTW, thanks for the help. I realize that this is quite an old repo, and did not really expect any replies :)

Yeah, I don't really remember anything about how it works. I know it relies on GStreamer, so maybe one of the libgstreamer-plugins-* packages is needed. Rhythmbox has a -d option (and -D for more restricted debugging) which might help highlight errors.

What happens if the alternative toolbar plugin is just disabled in the GUI, rather than uninstalled?

josephwb commented 1 year ago

Hrm I did not see how to disable the toolbar. I will try that out. Failing that, I was just gonna inspect the python code since it is very short.

I was thinking I might be missing some python packages. I assume that this is not dependent on python2?

josephwb commented 1 year ago

Okay disabling the alternative toolbar did not fix anything.

bmerry commented 1 year ago

Okay disabling the alternative toolbar did not fix anything.

Did the slider at least appear? That'll tell me what instructions to put in regarding the alternative toolbar plugin. Since it sounds like that toolbar completely rearranges the GUI I'm not too surprised if it breaks other plugins that manipulate the GUI.

bmerry commented 1 year ago

I assume that this is not dependent on python2?

I don't think so. The tempo changing seems to be working for me.

josephwb commented 1 year ago

Yes, the slider appears and looks functional (i.e., numbers change, and it can reset).

josephwb commented 1 year ago

Maybe it is my version of Gtk?

$ python rbtempo.py
/home/josephwb/.local/share/rhythmbox/plugins/rbtempo/rbtempo.py:17: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '4.0') before import to ensure that the right version gets loaded.
  from gi.repository import GObject, GLib, Gio, Gtk, RB, Peas, Gst
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/gi/importer.py", line 142, in load_module
    introspection_module = get_introspection_module(namespace)
  File "/usr/lib/python3/dist-packages/gi/module.py", line 257, in get_introspection_module
    module = IntrospectionModule(namespace, version)
  File "/usr/lib/python3/dist-packages/gi/module.py", line 109, in __init__
    repository.require(namespace, version)
gi.RepositoryError: Requiring namespace 'Gtk' version '3.0', but '4.0' is already loaded

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/josephwb/.local/share/rhythmbox/plugins/rbtempo/rbtempo.py", line 17, in <module>
    from gi.repository import GObject, GLib, Gio, Gtk, RB, Peas, Gst
  File "/usr/lib/python3/dist-packages/gi/importer.py", line 144, in load_module
    raise ImportError(e)
ImportError: Requiring namespace 'Gtk' version '3.0', but '4.0' is already loaded
bmerry commented 1 year ago

Maybe it is my version of Gtk?

I would guess not: I would imagine Rhythmbox would ensure the correct version of Gtk is loaded before loading plugins. If that was the problem I wouldn't expect the slider to appear at all.

josephwb commented 1 year ago

Closer to an answer now. When I run it from the commandline and try to change the tempo I get the following error:

Traceback (most recent call last):
  File "/home/josephwb/.local/share/rhythmbox/plugins/rbtempo/rbtempo.py", line 47, in tempo_changed
    self.add_filter()
  File "/home/josephwb/.local/share/rhythmbox/plugins/rbtempo/rbtempo.py", line 97, in add_filter
    self.get_player().add_filter(self.pitch_element)
TypeError: Argument 1 does not allow None as a value
bmerry commented 1 year ago

It looks like Gstreamer failed to create the pitch control element. I'm not sure why that would be - possibly some gstreamer plugin is missing.

bmerry commented 1 year ago

It looks like the pitch element is part of one of the "bad" plugins. So check that you have gstreamer1.0-plugins-bad installed.

josephwb commented 1 year ago

I knew it must have been a missing dependency! Working now. Thanks for the help!