Author Topic: Avidemux on Raspberry Pi 4  (Read 2492 times)

Lonerider

  • Newbie
  • *
  • Posts: 3
Avidemux on Raspberry Pi 4
« on: August 20, 2019, 10:13:33 PM »
Hello,
running a Raspberry Pi 4, I would like to use Avidemux on it.
As I did not find a package for Raspbian Buster on the download page, I downloaded the source files for 2.7.4 and tried to compile it myself.
That failed for building the Qt5 part. Does anybody of you have experience with this combination?
Was anybody successful in compiling Avidemux with Raspbian Buster?

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 4093
Re: Avidemux on Raspberry Pi 4
« Reply #1 on: August 21, 2019, 05:23:53 AM »
I downloaded the source files for 2.7.4 and tried to compile it myself.
That failed for building the Qt5 part.

Would you please post the error / compress and attach the resulting /tmp/logbuildQt5?

Lonerider

  • Newbie
  • *
  • Posts: 3
Re: Avidemux on Raspberry Pi 4
« Reply #2 on: August 21, 2019, 08:28:09 PM »
Sure. Here they are.

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 4093
Re: Avidemux on Raspberry Pi 4
« Reply #3 on: August 21, 2019, 09:10:45 PM »
Thank you. It looks like Avidemux uses very old OpenGL functions not supported by OpenGL ES 2.0 in Raspberry Pi.

Lonerider

  • Newbie
  • *
  • Posts: 3
Re: Avidemux on Raspberry Pi 4
« Reply #4 on: August 23, 2019, 09:05:44 AM »
Thanks for this hint. That seems to be a greater problem of Raspbian Buster, which contains the newest libraries, whereas some applications use older ones.
Do you know a way to get older libraries, especially Open GL, running on Raspbian Buster?

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 4093
Re: Avidemux on Raspberry Pi 4
« Reply #5 on: August 23, 2019, 11:11:52 AM »
No, unfortunately not. Regarding the Avidemux side, someone should take this problem field, I don't have resources for that. Patches as always welcome.

ro59

  • Newbie
  • *
  • Posts: 9
Re: Avidemux on Raspberry Pi 4
« Reply #6 on: February 02, 2020, 11:22:10 PM »
Hi, if someone is still interested I've compiled avidemux 2.7.4 on my pi 4 for raspbian and ubuntu 19.10 and seems working fine.
Deb files download at:
https://www.dropbox.com/sh/h51e5yo1eoz4wu5/AAA27WopwD932fQQimaVJ5F5a?dl=0

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 4093
Re: Avidemux on Raspberry Pi 4
« Reply #7 on: February 02, 2020, 11:38:55 PM »
Hi, if someone is still interested I've compiled avidemux 2.7.4 on my pi 4 for raspbian and ubuntu 19.10 and seems working fine.

Does this apply to the git master without any modifications too?

ro59

  • Newbie
  • *
  • Posts: 9
Re: Avidemux on Raspberry Pi 4
« Reply #8 on: February 03, 2020, 10:54:27 AM »
In raspbian, linux kernel 4.19.93-v7l+ and gcc (Raspbian 8.3.0-6+rpi1) 8.3.0, using the qt4 flag everything is ok.
Using Qt5 errors arise compiling avidemux_2.7.4/avidemux/qt4/ADM_userInterfaces/ADM_gui/Q_dummyWidget.cpp from line 12: glMatrixMode(GL_PROJECTION); because the compiler doesn't find definition of this class.
So I added in line 1 of Q_dummyWidget.h
#include "GL/gl.h"
#include "GL/glu.h"
and fixed the problem.

For the ARM64 version many changes in conditional compiling not the code itself.

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 4093
Re: Avidemux on Raspberry Pi 4
« Reply #9 on: February 03, 2020, 10:27:26 PM »
In raspbian, linux kernel 4.19.93-v7l+ and gcc (Raspbian 8.3.0-6+rpi1) 8.3.0, using the qt4 flag everything is ok.

Forcing use of deprecated (and effectively unsupported) qt4 for GUI disables OpenGL (apart from missing out on some maybe useful stuff here and there), so this fits into picture.

Quote
Using Qt5 errors arise compiling avidemux_2.7.4/avidemux/qt4/ADM_userInterfaces/ADM_gui/Q_dummyWidget.cpp from line 12: glMatrixMode(GL_PROJECTION); because the compiler doesn't find definition of this class.
So I added in line 1 of Q_dummyWidget.h
#include "GL/gl.h"
#include "GL/glu.h"
and fixed the problem.

Inclusion of the latter is for sure redundant (Avidemux uses only gluErrorString() in avidemux/qt4/ADM_openGL/src/ADM_openGl.cpp:62), the former is included by QOpenGLWidget via QtGui/qopengl.h, but on non-ES2 platforms only, so this change makes sense for Raspberry Pi, which is GLES2. Does OpenGL in Avidemux (video output and video filters based on OpenGL) work on raspbian then?

Quote
For the ARM64 version many changes in conditional compiling not the code itself.

-v please. Could you eventually submit (or just post here) a patch against the current git (it has been a long time since 2.7.4), please?

ro59

  • Newbie
  • *
  • Posts: 9
Re: Avidemux on Raspberry Pi 4
« Reply #10 on: February 04, 2020, 10:10:26 AM »
activating OpenGl result in a green screen and the message:"Shader was not compiled succesfully" so I think there is something wrong in the library, so I'll try to explore what works and what doesn't in pi's OpenGl.
Xvideo display is the only working and all not OpenGL plugins seems usable.

For the ubuntu version I must reinstall because the sd card broke, then I'll submit the patch

ro59

  • Newbie
  • *
  • Posts: 9
Re: Avidemux on Raspberry Pi 4
« Reply #11 on: February 04, 2020, 11:57:01 PM »
Restored Ubuntu and recompiled avidemux 2.7.4.
OpenGl works.
Attached changes to original files.

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 4093
Re: Avidemux on Raspberry Pi 4
« Reply #12 on: February 05, 2020, 02:22:56 PM »
Assuming that the check for arm64 used in cmake/admDetermineSystem.cmake:75 works, please try whether the following patch fixes the cmake part (I didn't add GL includes). It would be great if you perform your testing not on 2.7.4 but instead on git master.

ro59

  • Newbie
  • *
  • Posts: 9
Re: Avidemux on Raspberry Pi 4
« Reply #13 on: February 05, 2020, 10:24:47 PM »
The check for amd64 works and the patch fixes too.
Installed git master, now I'm going to check....

ro59

  • Newbie
  • *
  • Posts: 9
Re: Avidemux on Raspberry Pi 4
« Reply #14 on: February 06, 2020, 10:29:48 AM »
Avidemux 2.7.5 compiled and working!  :)
note: adm_cpu_arm64 better all in uppercase ADM_CPU_ARM64

Debs may be downloaded at this link:
https://www.dropbox.com/sh/1eurpo4lrphzzf0/AAAVfjDISjTuRLDX-TVBJbgSa?dl=0
« Last Edit: February 06, 2020, 10:47:45 AM by ro59 »