I'm having trouble loading any video file in Gem using [pix_movie] or [pix_film].
I'm an absolute beginner regarding Gem and inexperienced in Pure Data, so I'm probably making some simple mistake. Regardless, I cannot seem to find the solution myself or on the web. (If I get it here, I'm going to post it in the pdpatchrepo forum[1], so that it can be picked up by search engines in the future.)
When I create a [pix_movie] or [pix_film] object, I get the message:
[pix_movie]: no movie decoding backends found!
Subsequently, when I try to open a video file with an [open( message, this fails with:
[pix_movie]: unable to open file: ../data/alea.mpg
I have tried with the bundled example videos (alea.mpg, homer.avi, anim-1.mov) and a few others. I'm encountering this exact same error on two very different platforms, so I'm pretty sure it's my mistake and not a bug: In one case on a Raspberry Pi 3 B running DietPi as an operating system, Pd 0.47.1 and Gem 0.93.3 installed as a Raspbian package. In the other case on my laptop running Arch Linux, with Pd 0.49.0 installed from the Arch repos and Gem 0.87 installed via deken.
Apart from loading videos, Gem appears to be working fine in both installations.
Carlos
[1] https://forum.pdpatchrepo.info/topic/11899/pix_movie-no-movie-decoding-backe...
On 2/10/19 8:50 PM, Carlos Franke wrote:
I have tried with the bundled example videos (alea.mpg, homer.avi, anim-1.mov) and a few others. I'm encountering this exact same error on two very different platforms, so I'm pretty sure it's my mistake and not a bug: In one case on a Raspberry Pi 3 B running DietPi as an operating system, Pd 0.47.1 and Gem 0.93.3 installed as a Raspbian package.
i don't know DietPi, but could it be that it doesn't install *Recommended* packages by default?
you should install all the gem-plugin-* packages you find necessary to work. here's a list of packges that should be available for gem_0.93.3-10:
for your convenience, the plugins that deal with movie decoding are marked with an asterisk [*].
In the other case on my laptop running Arch Linux, with Pd 0.49.0 installed from the Arch repos and Gem 0.87 installed via deken.
Gem-0.87 was released in 2002, and did not have any "movie decoding backends" at all. also, i don't see it as available via deken.
anyhow, i don't think there is merit in making Gem available via deken on Linux platforms at all. deken is not meant for this kind of packages (that have zillions of dependencies). install Gem via your system's package manager. if there is no package for your specific distribution, nudge someone into it. or get involved. or use a Debian derived distro.
gfmdsa rIOhannes
IOhannes, thank you! So it was two completely different causes, even though resulting in the same error message.
On the Raspberry Pi, I was indeed merely missing the gem-plugin-* packages. It's working there now.
About the Laptop:
Gem-0.87 was released in 2002, and did not have any "movie decoding backends" at all. also, i don't see it as available via deken.
I only got the version number from the README, deken itself shows it as "Gem-v0.0.extended".
anyhow, i don't think there is merit in making Gem available via deken on Linux platforms at all. deken is not meant for this kind of packages (that have zillions of dependencies). install Gem via your system's package manager. if there is no package for your specific distribution, nudge someone into it. or get involved. or use a Debian derived distro.
Ok, I hear you and will not try deken for Gem again. I'm going to see if I can package Gem for Arch.
Carlos
Hi Carlos,
Am Montag, den 11. Februar 2019 um 22:06:14 Uhr (+0100) schrieb Carlos Franke:
Ok, I hear you and will not try deken for Gem again. I'm going to see if I can package Gem for Arch.
That would be cool! I just gave it a shot: In order to get current Gem to configure on a current Arch system, I had to downgrade automake to 1.15 (arch is on 1.16). Then it compiled fine here, but it might be necessary to add some dependencies for external libs.
Here is the output of the ./configure:
used optional libraries:
font-rendering : FTGL default font :
image-support use ImageMagick : yes (MagickCore7) use QuickTime : yes use ImageIO : use TIFF : yes use JPEG : yes moviefile-support use PLUGINS : no (using backend) use mpeg : no use mpeg-3 : no use QuickTime : yes use AVFoundation : use aviplay : no use gmerlin : no capture-support use PLUGINS : no (using backend) use v4l : yes (libv4l) use v4l2 : yes (libv4l) use ieee1394 : yes (libdc1394) use DV : yes use Unicap : yes use Video-for-WinDOS : no use QuickTime : yes use AVFoundation :
Concerning moviefile support it looks pretty bad (no mpeg, mpeg-3, aviplay and gmerlin). But before digging deeper into it, it might be wise to find out, how far it can even get on linux. I also don't know what PLUGINS means in this context and whether it is bad that Gem doesn't seem to use it.
Maybe IOhannes can comment on this.
-- Orm
On 12.02.19 09:12, Orm Finnendahl wrote:
That would be cool! I just gave it a shot: In order to get current Gem
what is "current" Gem? if you do any work, you should base it *at least* on Gem-0.94~pre1, or better on Gem-0.94.
don't spend time on Gem-0.93.3
to configure on a current Arch system, I had to downgrade automake to 1.15 (arch is on 1.16).
my (Debian based) development system uses automake-1.16.1. make sure to use a recent Gem.
Then it compiled fine here, but it might be necessary to add some dependencies for external libs.
Here is the output of the ./configure:
used optional libraries:
font-rendering : FTGL default font :
image-support use ImageMagick : yes (MagickCore7) use QuickTime : yes use ImageIO :
ah, well. you probably *are* already using Gem from git. good.
but that re-opens the question, why you needed to downgrade automake.
[...]
Concerning moviefile support it looks pretty bad (no mpeg, mpeg-3, aviplay and gmerlin).
skip, mpeg and mpeg-3; afaict they are pretty dead upstream (and the Gem plugins haven't been updated in ages; and i don't really plan to). you might also want to skip aviplay. it hasn't seen much testing in recent times either.
you should make sure that gmerlin is working though. it replaces practically the rest.
But before digging deeper into it, it might be wise to find out, how far it can even get on linux. I also don't know what PLUGINS means in this context and whether it is bad that Gem doesn't seem to use it.
that seems to be only a glitch in the configure printout. i recently removed all support for non-backend based image/movie/video/model acquisition. compiling should still give you all the plugins.
ghsd IOhannes
Hi IOhannes,
Am Dienstag, den 12. Februar 2019 um 09:56:54 Uhr (+0100) schrieb IOhannes m zmoelnig:
what is "current" Gem?
https://github.com/umlaeute/Gem
config.log says:
It was created by Gem configure 0.94~pre2, which was generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure
you should make sure that gmerlin is working though. it replaces practically the rest.
Thanks for the hint! I got gmerlin installed, but that was a little involved as although there is a package gmerlin in AUR it doesn't contain the gmerlin_avdecoders which seem to be a/the central part needed for Gem.
With the gmerlin svn checkout from sourceforge gavl and gmerlin_avdecoders compile and Gem recognizes it in its ./configure step, but compiling Gem fails at the GMERLIN related step (see output below).
Any ideas, what could be the reason for this?
Yours, Orm
Making all in filmGMERLIN
make[2]: Verzeichnis „/home/orm/work/install/Gem/plugins/filmGMERLIN“ wird betreten
/bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../src -I../../src/Gem -I../../src -DPD -I/usr/include/pd -DPD -fPIC -g -O2 -freg-struct-return -O3 -falign-loops -falign-functions -falign-jumps -funroll-loops -ffast-math -mmmx -MT gem_filmGMERLIN_la-filmGMERLIN.lo -MD -MP -MF .deps/gem_filmGMERLIN_la-filmGMERLIN.Tpo -c -o gem_filmGMERLIN_la-filmGMERLIN.lo test -f 'filmGMERLIN.cpp' || echo './'
filmGMERLIN.cpp
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../../src -I../../src/Gem -I../../src -DPD -I/usr/include/pd -DPD -fPIC -g -O2 -freg-struct-return -O3 -falign-loops -falign-functions -falign-jumps -funroll-loops -ffast-math -mmmx -MT gem_filmGMERLIN_la-filmGMERLIN.lo -MD -MP -MF .deps/gem_filmGMERLIN_la-filmGMERLIN.Tpo -c filmGMERLIN.cpp -fPIC -DPIC -o .libs/gem_filmGMERLIN_la-filmGMERLIN.o
filmGMERLIN.cpp: In Elementfunktion »virtual bool gem::plugins::filmGMERLIN::open(const string&, const gem::Properties&)«:
filmGMERLIN.cpp:190:6: Fehler: »bgav_is_redirector« wurde in diesem Gültigkeitsbereich nicht definiert
if(bgav_is_redirector(m_file)) {
^~~~~~~~~~~~~~~~~~
filmGMERLIN.cpp:190:6: Anmerkung: empfohlene Alternative: »class_addcreator«
if(bgav_is_redirector(m_file)) {
^~~~~~~~~~~~~~~~~~
class_addcreator
filmGMERLIN.cpp:192:18: Fehler: »bgav_redirector_get_num_urls« wurde in diesem Gültigkeitsbereich nicht definiert
int num_urls=bgav_redirector_get_num_urls(m_file);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
filmGMERLIN.cpp:192:18: Anmerkung: empfohlene Alternative: »bgav_redirectors_dump«
int num_urls=bgav_redirector_get_num_urls(m_file);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
bgav_redirectors_dump
filmGMERLIN.cpp:196:15: Fehler: »bgav_redirector_get_name« wurde in diesem Gültigkeitsbereich nicht definiert
bgav_redirector_get_name(m_file, i), bgav_redirector_get_url(m_file, i));
^~~~~~~~~~~~~~~~~~~~~~~~
filmGMERLIN.cpp:196:15: Anmerkung: empfohlene Alternative: »bgav_redirectors_dump«
bgav_redirector_get_name(m_file, i), bgav_redirector_get_url(m_file, i));
^~~~~~~~~~~~~~~~~~~~~~~~
bgav_redirectors_dump
filmGMERLIN.cpp:196:52: Fehler: »bgav_redirector_get_url« wurde in diesem Gültigkeitsbereich nicht definiert
bgav_redirector_get_name(m_file, i), bgav_redirector_get_url(m_file, i));
^~~~~~~~~~~~~~~~~~~~~~~
filmGMERLIN.cpp:196:52: Anmerkung: empfohlene Alternative: »bgav_redirectors_dump«
bgav_redirector_get_name(m_file, i), bgav_redirector_get_url(m_file, i));
^~~~~~~~~~~~~~~~~~~~~~~
bgav_redirectors_dump
filmGMERLIN.cpp:199:23: Fehler: »bgav_redirector_get_url« wurde in diesem Gültigkeitsbereich nicht definiert
filename=(char*)bgav_redirector_get_url(m_file, i);
^~~~~~~~~~~~~~~~~~~~~~~
filmGMERLIN.cpp:199:23: Anmerkung: empfohlene Alternative: »bgav_redirectors_dump«
filename=(char*)bgav_redirector_get_url(m_file, i);
^~~~~~~~~~~~~~~~~~~~~~~
bgav_redirectors_dump
make[2]: *** [Makefile:693: gem_filmGMERLIN_la-filmGMERLIN.lo] Fehler 1
On 12.02.19 19:47, Orm Finnendahl wrote:
you should make sure that gmerlin is working though. it replaces practically the rest.
Thanks for the hint! I got gmerlin installed, but that was a little involved as although there is a package gmerlin in AUR it doesn't contain the gmerlin_avdecoders which seem to be a/the central part needed for Gem.
indeed. i have to admit that i mostly use gmerlin and gmerlin_avdecoders synonymously (the latter being such a long word).
With the gmerlin svn checkout from sourceforge gavl and gmerlin_avdecoders compile and Gem recognizes it in its ./configure step, but compiling Gem fails at the GMERLIN related step (see output below).
Any ideas, what could be the reason for this?
the reason is pretty simple: gmerlin_avdecoders has had a release a couple of years ago. Gem is compatible with this release. gmerlin's upstream keeps hacking a bit on their libraries, but last time i've asked they had no intentions to do a proper release. unfortunately, in the meantime they have broken the API.
this basically means: Gem cannot be compiled against gmerlin_avdecoder from the gmerlin SVN repository.
you should use the last gmerlin_avdecoders release.
this - of course - comes with another problem, because germlin_avdecoders internally uses ffmpeg, which has also broken API since the release of gmerlin (ffmpeg breaking API is the main reason, why Gem doesn't have a native ffmpeg backend), but ffmpeg did a number of releases since then. so you cannot compile the last release of gmerlin_avdecoders with the last release of ffmpeg.
the reason it works for me is, that Debian patches gmerlin_avdecoders to support recent ffmpeg versions (Debian/buster ships ffmpeg-4.1).
i don't know about the arch ecosystem, but if you can apply patches during build, then see [1] for inspiration.
fgamsdr IOhannes
[1] https://salsa.debian.org/multimedia-team/gmerlin-avdecoder/tree/master/debia...
I'm going to see if I can package Gem for Arch.
That would be cool! I just gave it a shot:
Me too. I was able to compile Gem 0.94_pre1 without much hassle (./autogen; configure; make), even already wrote a preliminary PKGBUILD (attached). Alas, something is apparently wrong with the build: When I start Pd with Gem (pd -path /usr/lib/pd/Extra/ -lib Gem), I get the error message:
/usr/lib/pd/extra/Gem/Gem.pd_linux: /usr/lib/pd/extra/Gem/Gem.pd_linux: undefined symbol: _Z25dispatchGemWindowMessagesR10WindowInfo
... and cannot create any Gem objects.
There are two old gem PKGBUILDS archived from AUR3. I'm not sure how useful they are: https://github.com/aur-archive/pd-gem/blob/master/PKGBUILD https://github.com/aur-archive/pd-gem-git/blob/master/PKGBUILD
c
On 12.02.19 19:34, Carlos Franke wrote:
I'm going to see if I can package Gem for Arch.
That would be cool! I just gave it a shot:
Me too. I was able to compile Gem 0.94_pre1 without much hassle (./autogen; configure; make), even already wrote a preliminary PKGBUILD (attached). Alas, something is apparently wrong with the build: When I start Pd with Gem (pd -path /usr/lib/pd/Extra/ -lib Gem), I get the error message:
/usr/lib/pd/extra/Gem/Gem.pd_linux: /usr/lib/pd/extra/Gem/Gem.pd_linux: undefined symbol: _Z25dispatchGemWindowMessagesR10WindowInfo
that looks like a Gem that was partially compiled without multicontext support. (?)
gmasdr IOhannes
I had partial success on a different route: re-packaging the Debian Gem binaries for Arch. Not so much with compilation.
One preliminary remark, because I totally forgot about it before: I'm not exactly using Arch Linux, but Manjaro, which is based on Arch. Technically Manjaro uses its own package repositories, and even though they are for the most part based on Arch's, there is always the possibility that something that works on my Manjaro system will not work on a pure Arch install, or the other way around.
========
Compilation:
/usr/lib/pd/extra/Gem/Gem.pd_linux: /usr/lib/pd/extra/Gem/Gem.pd_linux: undefined symbol: _Z25dispatchGemWindowMessagesR10WindowInfo
that looks like a Gem that was partially compiled without multicontext support. (?)
Blindly going from this tip, I tried compiling Gem with the configure option "--disable-multicontext", but now I'm getting a compile error (copied below).
I realised that building Gem on Arch/Manjaro is probably beyond my present skills, and I probably won't have enough time to jump in and learn as I go (also judging from the Gmerlin compilation issues discussed in the other sidethread). If somebody wants to give me directions on what to try, though, I'm happy to test things.
gemkeyboard.cpp: In Konstruktor »gemkeyboard::gemkeyboard()«: gemkeyboard.cpp:36:23: Fehler: ungültige Umwandlung von »void (*)(char*, int, int, void*)« in »KEYBOARD_CB« {aka »void (*)(const char*, int, int, void*)«} [-fpermissive] setKeyboardCallback(&gemkeyboard::keyboardCallback, this); ^~~~~~~~~~~~ In file included from gemkeyboard.cpp:19: ../../src/Gem/Event.h:77:56: Anmerkung: Argument 1 von »void setKeyboardCallback(KEYBOARD_CB, void*)« wird initialisiert GEM_EXTERN extern void setKeyboardCallback(KEYBOARD_CB callback, ~~~~~~~~~~~~^~~~~~~~ gemkeyboard.cpp: In Destruktor »virtual gemkeyboard::~gemkeyboard()«: gemkeyboard.cpp:46:26: Fehler: ungültige Umwandlung von »void (*)(char*, int, int, void*)« in »KEYBOARD_CB« {aka »void (*)(const char*, int, int, void*)«} [-fpermissive] removeKeyboardCallback(&gemkeyboard::keyboardCallback, this); ^~~~~~~~~~~~ In file included from gemkeyboard.cpp:19: ../../src/Gem/Event.h:82:59: Anmerkung: Argument 1 von »void removeKeyboardCallback(KEYBOARD_CB, void*)« wird initialisiert GEM_EXTERN extern void removeKeyboardCallback(KEYBOARD_CB callback, ~~~~~~~~~~~~^~~~~~~~ make[3]: *** [Makefile:726: libControls_la-gemkeyboard.lo] Fehler 1
========
Using Debian binaries for Arch:
I tried my luck with the "debtap" tool[1], which is meant to help generating Arch packages from .deb files, or even automate this to a degree.
With some adjustments (mostly renaming dependencies), I managed to install Gem 0.94, 0.94_pre1 and 0.93.3 from Debian packages on my system this way. However, with 0.94 and 0.94_pre1, when I create a [gemwin], I get runtime errors about "gemdefaultwindow.pd" and "gemdefaultwindow.pat" not being found. (gemwin.pd is found and the [gemwin] objected appears as if created correctly in the graphical interface.)
Indeed "gemdefaultwindow.pd" is not packaged with Gem 0.94(_pre1), instead there is "gemdefaultwindow-glx.pd"[2], but Pd/Gem still seems to search for it. Any ideas why?
The Gem 0.93.3 package, however, does have gemdefaultwindow.pd, which led me to try that version. The only problem I ran into was that libGLEW.so.2.0 was not found, because the version of glew on my system is more recent (2.1.0). Tentatively, I symlinked
ln -s libGLEW.so.2.1 libGLEW.so.2.0 in /usr/lib
… and success! At least the few example sketches I tested work fine now with Gem 0.93.3.
Obviously this is not a long-term solution (as far as piggybacking on Debian packages for Arch can be a long-term solution at all…). I would prefer to resolve the above error with version 0.94.
[1] https://github.com/helixarch/debtap [2] https://packages.debian.org/sid/amd64/gem/filelist
On 2/16/19 9:52 PM, Carlos Franke wrote:
With some adjustments (mostly renaming dependencies), I managed to install Gem 0.94, 0.94_pre1 and 0.93.3 from Debian packages on my system this way. However, with 0.94 and 0.94_pre1, when I create a [gemwin], I get runtime errors about "gemdefaultwindow.pd" and "gemdefaultwindow.pat" not being found. (gemwin.pd is found and the [gemwin] objected appears as if created correctly in the graphical interface.)
Indeed "gemdefaultwindow.pd" is not packaged with Gem 0.94(_pre1> instead there is "gemdefaultwindow-glx.pd"[2], but Pd/Gem still seems to search for it. Any ideas why?
it is packaged fine, but not as a file but as a symlink that is created at installation time, or whenver the admin chooses to enable a different default window using the "update-alternatives" mechanism. so on most Debian machines, you will have a "gemdefault.pd" symlink that points to "gemdefaultwindow-glx.pd"
i am not surprised, that a simple repackaging tool does not catch this.
The Gem 0.93.3 package, however, does have gemdefaultwindow.pd, which
do not fuddle wit 0.93.3; even less so with binaries from this release! (seriously)
fgmdsar IOhannes
Indeed "gemdefaultwindow.pd" is not packaged with Gem 0.94(_pre1> instead there is "gemdefaultwindow-glx.pd"[2], but Pd/Gem still seems to search for it. Any ideas why?
it is packaged fine, but not as a file but as a symlink that is created at installation time, or whenver the admin chooses to enable a different default window using the "update-alternatives" mechanism.
I see, that makes sense. Thank you for explaining.
Indeed after I made the symlink, Gem (0.94) mostly works. Alas, now I'm getting errors again when I try to load videos with [pix_movie]… I did make the effort to try and convert all necessary plugin and library packages from Debian with the help of debtap, but evidently I have made a mistake somewhere.
I am giving up on this for now. I'm developing for Raspberry Pi at the moment, so having Gem also on the Laptop would merely be a convenience for me. Given how involved that turned out to be, I better focus my energy elsewhere.
As a tip for anyone else running into this: There are Arch binary packages for Purr Data (continuation of pd-l2ork with javascript GUI, as I understand it) available in this repo:
https://bitbucket.org/l2orkaur/l2orkaur.bitbucket.org
Gem is included (0.93 again, though) and video playback works. The repo is not mine and I don't know the maintainer, so please judge for yourself if you want to trust these binaries or not.
do not fuddle wit 0.93.3; even less so with binaries from this release! (seriously)
Okay, stopping now.
c