Avidemux Forum

Avidemux => MacOSX => Topic started by: Grim Reaper on January 11, 2022, 09:15:22 PM

Title: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: Grim Reaper on January 11, 2022, 09:15:22 PM

Hi,

I need assistance to get a batch conversion script running. I have no Python programming knowledge.

I got a batch processing python script from a 2021 Avidemux Forum post (posted over 120 days ago) and modified it slightly to batch convert the audio in some video files from MKV to AAC(lav). Apparently, the script ran fine for the person who got assistance writing the script.

I am using AVIDEMUX 2.7.7 on a MacMini running Mojave (I will not update to a newer MacOS version because I need to run 32 bit apps)

The script runs and enables selection of the input file type and the input and output folders, loads the first video in and changes the default audio from copy to AAC(lav) but the script run dies with the following error:

TinyPy:Exception

Exception: (_tp_dict_get) KeyError: splitext
BackTrack:
File: py2bc.py, line 53
File: /Users/admin1/Documents/AVIDEMUX Batch File Conversion Script 2.py, line 56
File: /Users/admin1/Documents/AVIDEMUX Batch File Conversion Script 2.py, line 22
File: py2bc.py, line 53
File: /Users/admin1/Documents/Batch File Processing Script 1b.py, line 78
File: /Users/admin1/Documents/Batch File Processing Script 1b.py, line 23

The script is:

#PY  <- Needed to identify #
#
ui = Gui()
adm = Avidemux()
ext = "mkv"
sep = "/"
#
# Function to convert an individual video
#
def convert(filein,out):
    if not adm.loadVideo(filein):
        ui.displayError("oops","cannot load "+filein)
        return 0

    adm.videoCodec("Copy")
    if adm.audioTracksCount() > 0:
        adm.audioClearTracks()
        adm.audioAddTrack(0)
        adm.audioCodec(0, "LavAC3")
    adm.setContainer("MKV", "forceAspectRatio=False", "displayWidth=1280", "displayAspectRatio=2", "addColourInfo=False", "colMatrixCoeff=2", "colRange=0", "colTransfer=2", "colPrimaries=2")

    filename = (splitext(filein))[0]
    filename += ".mkv"
    filename = basename(filename)
    return adm.save(out + sep + filename)
#
# Main
#
# -------- select extension --------
extensions = ["avi","m2ts","mkv","mov","mp4","mpg","ts","vob","webm","wmv"]
mx = len(extensions)

menuExt = DFMenu("Select extension:")
for entry in range(0, mx):
    menuExt.addItem(extensions[entry])
dia = DialogFactory("Filter directory content")
dia.addControl(menuExt)
if not dia.show():
    return

idx = menuExt.index

if idx < 0 or idx >= mx:
    ui.displayError("Oops", "Internal error: invalid menu index")
    return

ext = extensions[idx]

# -------- select input directory --------
inputFolder = ui.dirSelect("Select source folder")
if inputFolder is None:
    ui.displayError("Oops", "No source folder selected")
    return

# -------- read content --------
list = get_folder_content(inputFolder, ext)
if list is None:
    ui.displayError("Oops", "No " + ext + " files found in \"" + inputFolder + "\"")
    return

# -------- select output directory --------
outputFolder = ui.dirSelect("Select output folder")
if outputFolder is None:
    ui.displayError("Oops", "No output folder selected")
    return

if(inputFolder == outputFolder):
    ui.displayError("Error","Output folder cannot be the same as the input one")
    return

# -------- process --------
total = 0
counter = 0

for i in list:
    total += 1
    counter += convert(i, outputFolder)

if not counter:
    ui.displayInfo("Warning", "No files converted")
    return

if counter == 1:
    ui.displayInfo("Finished", "One file out of " + str(total) + " converted")
    return

ui.displayInfo("Finished", str(counter) + " files out of " + str(total) + " converted")



Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: eumagga0x2a on January 12, 2022, 12:00:37 AM
Quote from: Grim Reaper on January 11, 2022, 09:15:22 PMI am using AVIDEMUX 2.7.7 on a MacMini running Mojave

If this is a nightly from here (https://avidemux.org/nightly/osx_mojave/), it is too old to have the splitext method which was added to Avidemux on Feb. 7 2021. You might try whether it works with the line containing

filename = (splitext(filein))[0]
deleted (you will get a double file extension then).

In general, only the latest release i.e. 2.8.0 is supported. It might be possible to build it from source on Mojave, but I have no means to verify. In case of problems, you would be entirely on your own.
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: Grim Reaper on January 12, 2022, 01:50:48 AM
The person who posted the original python script that was modified to work successfully used it on a Mac running Mojave and AVIDEMUX 2.7.7. I don't know why splitext isn't compatible if it ran ok for him.

I took out the line containing splitext, the following error resulted:

TinyPy:Exception

Exception: (tp_add) TypeError: ?
BackTrack:
File: py2bc.py, line 53
File: /Users/admin1/Documents/AVIDEMUX - Batch Conversion of Audio Only - 1-1c .py, line 78
File: /Users/admin1/Documents/AVIDEMUX - Batch Conversion of Audio Only - 1-1c .py, line 24
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: eumagga0x2a on January 12, 2022, 09:00:22 AM
Oops, I'm sorry, filename needs to be set, so please replace

    filename = (splitext(filein))[0]
    filename += ".mkv"
    filename = basename(filename)
    return adm.save(out + sep + filename)

with

    filename = basename(filein)
    filename += ".mkv"
    return adm.save(out + sep + filename)

Quote from: Grim Reaper on January 12, 2022, 01:50:48 AMThe person who posted the original python script that was modified to work successfully used it on a Mac running Mojave and AVIDEMUX 2.7.7

"2.7.7" means a build created after the release of 2.7.6 and including the release of 2.7.7 instantly superseded by 2.7.8, so unless the "About" dialog says "Release" and doesn't contain a git commit hash, it is a nightly from that broad time range. If the obsolete build you use has been compiled from source after February 7 2021, it has support for splitext method. Else it hasn't.
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: Grim Reaper on January 12, 2022, 05:35:53 PM
Thanks for your assistance.

The script now works, mostly.

1) It doesn't ignore files that do not have the selected file extension, it puts up error warnings, one was for a text file it tried to process in the selected directory , which prevents the script from continuing until the error warnings are eliminated then the batch processing continues on to the next file in the directory. Is there a way to prevent that?

2) Because the original file name isn't parsed by splitext, the script appends ".mkv" to the full filename including the extension of the original file. Is there a way to delete the original file extension from the processed file name?

3) I would like to compile the most recent version of Avidemux to run on Mojave. I have Brew and Xcode installed on my MacMini running Mojave. Where is the most recent Avidemux code source and what is the method for compiling it?
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: eumagga0x2a on January 12, 2022, 07:21:27 PM
Quote from: Grim Reaper on January 12, 2022, 05:35:53 PM1) It doesn't ignore files that do not have the selected file extension

I cannot reproduce this issue with current Avidemux (e.g. files with names ending in .txt as well as files completely without an extension get correctly ignored), so this might be a bug fixed along the way. I guess we should not waste time on catering to limitations of obsolete versions, there are dozens of other substantial bugs fixed in the meantime.

Quote from: Grim Reaper on January 12, 2022, 05:35:53 PM3) I would like to compile the most recent version of Avidemux to run on Mojave. I have Brew and Xcode installed on my MacMini running Mojave. Where is the most recent Avidemux code source and what is the method for compiling it?

If you can get Qt (preferably Qt6) installed in Homebrew

brew install qt
then we should be fine. Build with Qt5 (qt@5 in Homebrew) was broken last time I checked ~ a month ago.

brew install cmake nasm yasm xvid x264 x265 libvpx aom opus fdk-aac lame libass mp4v2 a52dec
would install remaining build dependencies (strictly speaking, build deps are cmake, nasm, yasm and qt, but the remaining packages are desirable for a fully-featured application). If Xcode command-line tools (which include the actual compiler) are not yet installed, brew should prompt for their installation.

git clone https://github.com/mean00/avidemux2.git && cd avidemux2 && git submodule update --init --recursive
clones the Avidemux source and the translations to subdirectory avidemux2 of the current directory.

export MACOSX_DEPLOYMENT_TARGET=10.14
bash bootStrapOsx_Catalina.bash --enable-qt6

in avidemux2 directory would try to build Avidemux, packaged as a disk image, for Mojave.
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: Grim Reaper on January 12, 2022, 08:00:22 PM
QT@6 is not supported by Mojave, Qt@5 is.

This doesn't work:

Admins-Mac-mini:~ admin1$ export MACOSX_DEPLOYMENT_TARGET=10.14
Admins-Mac-mini:~ admin1$ bash bootStrapOsx_Catalina.bash --enable-qt6
bash: bootStrapOsx_Catalina.bash: No such file or directory
Admins-Mac-mini:~ admin1$

Looks Like QT6 Installed:

/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/

#include <QtCore/qglobal.h>

#ifndef QOPERATINGSYSTEMVERSION_H
#define QOPERATINGSYSTEMVERSION_H

QT_BEGIN_NAMESPACE

class QString;
class QVersionNumber;

class Q_CORE_EXPORT QOperatingSystemVersion
{
public:
    enum OSType {
        Unknown = 0,
        Windows,
        MacOS,
        IOS,
        TvOS,
        WatchOS,
        Android
    };

    static const QOperatingSystemVersion Windows7;
    static const QOperatingSystemVersion Windows8;
    static const QOperatingSystemVersion Windows8_1;
    static const QOperatingSystemVersion Windows10;

    static const QOperatingSystemVersion OSXMavericks;
    static const QOperatingSystemVersion OSXYosemite;
    static const QOperatingSystemVersion OSXElCapitan;
    static const QOperatingSystemVersion MacOSSierra;
    static const QOperatingSystemVersion MacOSHighSierra;
    static const QOperatingSystemVersion MacOSMojave;
    static const QOperatingSystemVersion MacOSCatalina;
    static const QOperatingSystemVersion MacOSBigSur;

    static const QOperatingSystemVersion AndroidJellyBean;
    static const QOperatingSystemVersion AndroidJellyBean_MR1;
    static const QOperatingSystemVersion AndroidJellyBean_MR2;
    static const QOperatingSystemVersion AndroidKitKat;
    static const QOperatingSystemVersion AndroidLollipop;
    static const QOperatingSystemVersion AndroidLollipop_MR1;
    static const QOperatingSystemVersion AndroidMarshmallow;
    static const QOperatingSystemVersion AndroidNougat;
    static const QOperatingSystemVersion AndroidNougat_MR1;
    static const QOperatingSystemVersion AndroidOreo;

    Q_DECL_CONSTEXPR QOperatingSystemVersion(OSType osType,
                                             int vmajor, int vminor = -1, int vmicro = -1)
        : m_os(osType),
          m_major(qMax(-1, vmajor)),
          m_minor(vmajor < 0 ? -1 : qMax(-1, vminor)),
          m_micro(vmajor < 0 || vminor < 0 ? -1 : qMax(-1, vmicro))
    { }

    static QOperatingSystemVersion current();

    static Q_DECL_CONSTEXPR OSType currentType()
    {
#if defined(Q_OS_WIN)
        return Windows;
#elif defined(Q_OS_MACOS)
        return MacOS;
#elif defined(Q_OS_IOS)
        return IOS;
#elif defined(Q_OS_TVOS)
        return TvOS;
#elif defined(Q_OS_WATCHOS)
        return WatchOS;
#elif defined(Q_OS_ANDROID)
        return Android;
#else
        return Unknown;
#endif
    }

    Q_DECL_CONSTEXPR int majorVersion() const { return m_major; }
    Q_DECL_CONSTEXPR int minorVersion() const { return m_minor; }
    Q_DECL_CONSTEXPR int microVersion() const { return m_micro; }

    Q_DECL_CONSTEXPR int segmentCount() const
    { return m_micro >= 0 ? 3 : m_minor >= 0 ? 2 : m_major >= 0 ? 1 : 0; }

    bool isAnyOfType(std::initializer_list<OSType> types) const;
    Q_DECL_CONSTEXPR OSType type() const { return m_os; }
    QString name() const;

    friend bool operator>(const QOperatingSystemVersion &lhs, const QOperatingSystemVersion &rhs)
    { return lhs.type() == rhs.type() && QOperatingSystemVersion::compare(lhs, rhs) > 0; }

    friend bool operator>=(const QOperatingSystemVersion &lhs, const QOperatingSystemVersion &rhs)
    { return lhs.type() == rhs.type() && QOperatingSystemVersion::compare(lhs, rhs) >= 0; }

    friend bool operator<(const QOperatingSystemVersion &lhs, const QOperatingSystemVersion &rhs)
    { return lhs.type() == rhs.type() && QOperatingSystemVersion::compare(lhs, rhs) < 0; }

    friend bool operator<=(const QOperatingSystemVersion &lhs, const QOperatingSystemVersion &rhs)
    { return lhs.type() == rhs.type() && QOperatingSystemVersion::compare(lhs, rhs) <= 0; }

private:
    QOperatingSystemVersion() = default;
    OSType m_os;
    int m_major;
    int m_minor;
    int m_micro;

    static int compare(const QOperatingSystemVersion &v1, const QOperatingSystemVersion &v2);
};
Q_DECLARE_TYPEINFO(QOperatingSystemVersion, QT_VERSION < QT_VERSION_CHECK(6, 0, 0) ? Q_RELOCATABLE_TYPE : Q_PRIMITIVE_TYPE);

#ifndef QT_NO_DEBUG_STREAM
class QDebug;
Q_CORE_EXPORT QDebug operator<<(QDebug debug, const QOperatingSystemVersion &ov);
#endif

QT_END_NAMESPACE

#endif // QOPERATINGSYSTEMVERSION_H
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: eumagga0x2a on January 12, 2022, 08:05:22 PM
Then leave --enable-qt6 out and keep fingers crossed that the bug presumably Homebrew is responsible for has been fixed.
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: eumagga0x2a on January 12, 2022, 08:07:36 PM
The build might still fail in the Qt-related part as I didn't care of Qt5 since it got broken a few months ago. I'll try to find a way to get it build then. It might take time though.
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: Grim Reaper on January 13, 2022, 01:09:49 AM
I downloaded the code files again and tried to build it, it didn't appear to complete the build, here's the output:

Admins-Mac-mini:~ admin1$ export MACOSX_DEPLOYMENT_TARGET=10.14
Admins-Mac-mini:~ admin1$ bash bootStrapOsx_Catalina.bash
bash: bootStrapOsx_Catalina.bash: No such file or directory
Admins-Mac-mini:~ admin1$
Admins-Mac-mini:~ admin1$ git clone https://github.com/mean00/avidemux2.git && cd avidemux2 && git submodule update --init --recursive
Cloning into 'avidemux2'...
remote: Enumerating objects: 91201, done.
remote: Counting objects: 100% (5773/5773), done.
remote: Compressing objects: 100% (1751/1751), done.
remote: Total 91201 (delta 4132), reused 5512 (delta 4004), pack-reused 85428
Receiving objects: 100% (91201/91201), 488.04 MiB | 26.35 MiB/s, done.
Resolving deltas: 100% (70115/70115), done.
Checking out files: 100% (4302/4302), done.
Submodule 'i18n' (https://github.com/mean00/avidemux2_i18n.git) registered for path 'avidemux/qt4/i18n'
Cloning into '/Users/admin1/avidemux2/avidemux/qt4/i18n'...
Submodule path 'avidemux/qt4/i18n': checked out 'c954cad3b84fcfefb92c517e9c7942c7a14fe4dd'
Admins-Mac-mini:avidemux2 admin1$ export MACOSX_DEPLOYMENT_TARGET=10.14
Admins-Mac-mini:avidemux2 admin1$ bash bootStrapOsx_Catalina.bash --enable-qt6
++ cat cmake/avidemuxVersion.cmake
++ grep 'VERSION_MAJOR '
++ sed 's/..$//g'
++ sed 's/^.*"//g'
+ export MAJOR=2
+ MAJOR=2
++ cat cmake/avidemuxVersion.cmake
++ grep 'VERSION_MINOR '
++ sed 's/..$//g'
++ sed 's/^.*"//g'
+ export MINOR=8
+ MINOR=8
++ cat cmake/avidemuxVersion.cmake
++ grep 'VERSION_P '
++ sed 's/..$//g'
++ sed 's/^.*"//g'
+ export PATCH=1
+ PATCH=1
+ export API_VERSION=2.8
+ API_VERSION=2.8
++ date +%y%m%d-%Hh%Mm
+ DAT=220112-19h37m
++ git log --format=oneline -1
++ head -c 11
+ gt=92b9d49b765
+ REV=220112-19h37m_92b9d49b765
+ FLAVOR=-DENABLE_QT5=True
+ qt_ext=Qt5
+ packages_ext=
+ do_core=1
+ do_cli=1
+ do_gtk=0
+ do_qt4=1
+ do_plugins=1
+ do_rebuild=0
+ debug=0
+ create_app_bundle=1
+ create_dmg=1
+ external_libass=1
+ external_liba52=1
+ external_libmad=0
+ external_libmp4v2=1
++ xcrun --sdk macosx --show-sdk-path
+ export SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
+ SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
+ '[' x10.14 = x ']'
+ test -f /Users/admin1/myCC
+ '[' 1 '!=' 0 ']'
+ config_option=--enable-qt6
+ case "$config_option" in
+ FLAVOR=-DENABLE_QT6=True
+ qt_ext=Qt6
+ shift
+ '[' 0 '!=' 0 ']'
+ validate adm_version ''
+ opt=adm_version
+ str=
+ '[' adm_version = adm_version ']'
+ reg='[^a-zA-Z0-9_.-]'
+ msg='Only alphanumeric characters, hyphen, underscore and period are allowed for Avidemux version, aborting.'
+ [[ '' =~ [^a-zA-Z0-9_.-] ]]
+ validate output ''
+ opt=output
+ str=
+ '[' output = adm_version ']'
+ '[' output = output ']'
+ reg='[^a-zA-Z0-9\ _.-]'
+ msg='Only alphanumeric characters, space, hyphen, underscore and period are allowed for .dmg basename, aborting.'
+ [[ '' =~ [^a-zA-Z0-9\ _.-] ]]
+ config
+ setupPaths
+ '[' x1 = x1 ']'
+ export BASE_INSTALL_DIR=/
+ BASE_INSTALL_DIR=/
+ export BASE_APP=/Users/admin1/avidemux2/Avidemux2.8.app
+ BASE_APP=/Users/admin1/avidemux2/Avidemux2.8.app
+ export PREFIX=/Users/admin1/avidemux2/Avidemux2.8.app/Contents/Resources
+ PREFIX=/Users/admin1/avidemux2/Avidemux2.8.app/Contents/Resources
+ '[' '!' -e /Users/admin1/avidemux2/Avidemux2.8.app/Contents/Resources ']'
+ mkdir -p /Users/admin1/avidemux2/Avidemux2.8.app/Contents/Resources
+ echo 'Build configuration :'
Build configuration :
+ echo '******************* :'
******************* :
+ echo -n 'Build type : '
Build type : + '[' x0 = x1 ']'
+ echo 'Release build'
Release build
+ '[' x = x ']'
+ export ADM_VERSION=2.8.1
+ ADM_VERSION=2.8.1
+ echo 'Avidemux version : 2.8.1'
Avidemux version : 2.8.1
+ '[' x1 '!=' x1 ']'
+ '[' x0 '!=' x1 -a x/Users/admin1/avidemux2/Avidemux2.8.app '!=' x ']'
+ rm -Rf /Users/admin1/avidemux2/Avidemux2.8.app/Contents
+ printModule 1 Core
+ value=1
+ name=Core
+ '[' x1 = x1 ']'
+ echo -e '\tCore will be built'
   Core will be built
+ printModule 0 Gtk
+ value=0
+ name=Gtk
+ '[' x0 = x1 ']'
+ echo -e '\tGtk will be skipped'
   Gtk will be skipped
+ printModule 1 Qt
+ value=1
+ name=Qt
+ '[' x1 = x1 ']'
+ echo -e '\tQt will be built'
   Qt will be built
+ printModule 1 Cli
+ value=1
+ name=Cli
+ '[' x1 = x1 ']'
+ echo -e '\tCli will be built'
   Cli will be built
+ printModule 1 Plugins
+ value=1
+ name=Plugins
+ '[' x1 = x1 ']'
+ echo -e '\tPlugins will be built'
   Plugins will be built
+ '[' x '!=' x ']'
++ which qmake
+ qmake_location=
+ '[' '' = /usr/local/bin/qmake ']'
+ '[' x '!=' x ']'
+ '[' Qt6 = Qt6 ']'
+ '[' '' '!=' /usr/local/bin/qmake ']'
+ echo -e '\n****************************************************************'

****************************************************************
+ echo -e 'When using Qt6 from Homebrew, please make sure it is linked into'
When using Qt6 from Homebrew, please make sure it is linked into
+ echo -e '/usr/local by executing\n'
/usr/local by executing

+ echo -e '\tbrew link qt6\n'
   brew link qt6

+ echo -e 'as qmake at least in Qt 6.2.0 reports a wrong path to plugins.'
as qmake at least in Qt 6.2.0 reports a wrong path to plugins.
+ echo -e '****************************************************************\n'
****************************************************************

+ exit 1


Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: eumagga0x2a on January 13, 2022, 01:48:56 AM
Quote from: Grim Reaper on January 13, 2022, 01:09:49 AMAdmins-Mac-mini:avidemux2 admin1$ bash bootStrapOsx_Catalina.bash --enable-qt6

You tried to build for Qt6, please build without --enable-qt6 option.
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: Grim Reaper on January 13, 2022, 04:37:29 AM
I tried both ways, without QT6 it ended with the following:

CMake Error at /usr/local/Cellar/cmake/3.22.1/share/cmake/Modules/FindPkgConfig.cmake:603 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.22.1/share/cmake/Modules/FindPkgConfig.cmake:825 (_pkg_check_modules_internal)
  CMakeLists.txt:81 (PKG_CHECK_MODULES)


-- Configuring incomplete, errors occurred!
See also "/Users/admin1/avidemux2/buildPluginsCommon/CMakeFiles/CMakeOutput.log".
+ fail cmakeZ
+ echo '** Failed at cmakeZ**'
** Failed at cmakeZ**
+ exit 1
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: eumagga0x2a on January 13, 2022, 09:49:56 AM
Quote from: Grim Reaper on January 13, 2022, 04:37:29 AMCMake Error at /usr/local/Cellar/cmake/3.22.1/share/cmake/Modules/FindPkgConfig.cmake:603 (message):
  A required package was not found

I assumed that pkg-config will be pulled in automatically, but this seems to be wrong. Please install pkg-config manually

brew install pkg-config
and Avidemux should build fine with Qt5. I've just did it successfully on Monterey, albeit with Qt6 uninstalled, but coexistence of Qt6 and Qt5 is luckily not an issue on Mojave.
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: Grim Reaper on January 13, 2022, 10:22:21 PM
I reinstalled Homebrew, etc. then tried to build the .dmg but it failed with the following (I think it can't find qmake):

++ which -s qmake
+ echo 'Error: No matching qmake executable found, aborting.'
Error: No matching qmake executable found, aborting.
+ exit 1


I will reinstall with this: brew reinstall cmake
then try again.



Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: eumagga0x2a on January 13, 2022, 11:26:53 PM
Quote from: Grim Reaper on January 13, 2022, 10:22:21 PMI reinstalled Homebrew

Why, just why? The only apparently missing thing was pkg-config.

Quote from: Grim Reaper on January 13, 2022, 10:22:21 PM++ which -s qmake
+ echo 'Error: No matching qmake executable found, aborting.'
Error: No matching qmake executable found, aborting.
+ exit 1

qt (qt@5) not installed.

Quote from: Grim Reaper on January 13, 2022, 10:22:21 PMI will reinstall with this: brew reinstall cmake

??? Again, why?
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: Grim Reaper on January 14, 2022, 12:47:16 AM
It won't make the MacOS .dmg install package. It can't find qmake or an executable file that uses it to do that. Is there a way to link to it so it will be found?

I have standalone Cmake.app installed, can the .dmg install package be made with that?
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: eumagga0x2a on January 14, 2022, 01:30:50 AM
Quote from: Grim Reaper on January 14, 2022, 12:47:16 AMIt won't make the MacOS .dmg install package. It can't find qmake or an executable file that uses it to do that. Is there a way to link to it so it will be found?

The bootstrap script aborts early because qmake from Qt is not in $PATH. This has nothing to do with linking. Have you installed qt@5 in Homebrew?

Quote from: Grim Reaper on January 14, 2022, 12:47:16 AMI have standalone Cmake.app installed, can the .dmg install package be made with that?

Never tried. Please use the one supplied by Homebrew.
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: Grim Reaper on January 14, 2022, 05:31:04 PM
Yes, QT@5 is installed.

I tried to build the installer again, it failed with this:

-- Checking for module 'libass'
--   No package 'libass' found
CMake Error at /usr/local/Cellar/cmake/3.22.1/share/cmake/Modules/FindPkgConfig.cmake:603 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.22.1/share/cmake/Modules/FindPkgConfig.cmake:825 (_pkg_check_modules_internal)
  CMakeLists.txt:81 (PKG_CHECK_MODULES)

-- Configuring incomplete, errors occurred!
See also "/Users/admin1/avidemux2/buildPluginsCommon/CMakeFiles/CMakeOutput.log".
+ fail cmakeZ
+ echo '** Failed at cmakeZ**'
** Failed at cmakeZ**
+ exit 1
Admins-Mac-mini:avidemux2 admin1$



I ran this:

pkg-config --exists --print-errors libass

This is the result:

Admins-Mac-mini:avidemux2 admin1$ pkg-config --exists --print-errors libass
Package libass was not found in the pkg-config search path.
Perhaps you should add the directory containing `libass.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libass' found
Admins-Mac-mini:avidemux2 admin1$

How do I "add the directory containing `libass.pc'
to the PKG_CONFIG_PATH environment variable"?


Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: eumagga0x2a on January 14, 2022, 08:00:43 PM
You misread the error. The build fails because cmake (again) doesn't find pkg-config. What does

which pkg-config
report? Maybe you have another pkg-config executable somewhere higher in the $PATG which eclipses the one from Homebrew?
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: eumagga0x2a on January 14, 2022, 08:07:43 PM
I should have mentioned that the fact that cmake was searching for libass means that the Avidemux Qt GUI executable and libs had been built successfully.
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: Grim Reaper on January 14, 2022, 08:33:22 PM
This is the output of 'which pkg-config':

Admins-Mac-mini:~ admin1$ which pkg-config
/usr/local/bin/pkg-config
Admins-Mac-mini:~ admin1$
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: eumagga0x2a on January 14, 2022, 08:34:06 PM
What does

ls -l /usr/local/bin/pkg-config
report?
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: eumagga0x2a on January 14, 2022, 08:39:10 PM
I think I was wrong, my apologies. On macOS, when building Avidemux with external libass,libass is indeed marked as required package. Thus it may be really libass which pkg-config fails to find which in turn triggers build failure in common plugins.
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: eumagga0x2a on January 14, 2022, 08:48:30 PM
Additionally to the question about the target of pkg-config symlink in /usr/local/bin, please post the output of

brew ls -v libass
brew ls -v pkg-config
pkg-config --libs libass
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: Grim Reaper on January 14, 2022, 08:54:13 PM
This is the output:


Admins-Mac-mini:~ admin1$ ls -l /usr/local/bin/pkg-config
lrwxr-xr-x  1 admin1  admin  44 14 Jan 12:53 /usr/local/bin/pkg-config -> ../Cellar/pkg-config/0.29.2_3/bin/pkg-config
Admins-Mac-mini:~ admin1$

I ran the Avidemux2.8.app from the Avidemux2 folder and the GUI opens and a file can be selected from 'Open' but nothing else works. I suppose that's because the files such as the modules, etc., aren't installed. I also saw that saving a project and selecting a project are not available in the 'File' list.

Attached is a pdf of the Avidemux2 folder contents.You cannot see attachments on this board.
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: eumagga0x2a on January 14, 2022, 09:01:40 PM
Quote from: Grim Reaper on January 14, 2022, 08:54:13 PMls -l /usr/local/bin/pkg-config
lrwxr-xr-x  1 admin1  admin  44 14 Jan 12:53 /usr/local/bin/pkg-config -> ../Cellar/pkg-config/0.29.2_3/bin/pkg-config

So far so good, please post the output of the other commands.

.pc files in Homebrew are by default symlinked into /usr/local/lib/pkgconfig where pkg-config expects them.

Quote from: Grim Reaper on January 14, 2022, 08:54:13 PMI ran the Avidemux2.8.app from the Avidemux2 folder and the GUI opens and a file can be selected from 'Open' but nothing else works. I suppose that's because the files such as the modules, etc., aren't installed. I also saw that saving a project and selecting a project are not available in the 'Open' list.

Yes, this is the reason as script engines (actually just tinyPy) and all demuxers are plugins.
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: eumagga0x2a on January 14, 2022, 09:19:20 PM
Quote from: Grim Reaper on January 14, 2022, 08:54:13 PMAttached is a pdf of the Avidemux2 folder contents

This is irrelevant at the current point, please provide the requested info.
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: Grim Reaper on January 14, 2022, 09:22:21 PM
Here is the output:

Admins-Mac-mini:~ admin1$ ls -l /usr/local/bin/pkg-config
lrwxr-xr-x  1 admin1  admin  44 14 Jan 12:53 /usr/local/bin/pkg-config -> ../Cellar/pkg-config/0.29.2_3/bin/pkg-config
Admins-Mac-mini:~ admin1$ lrwxr-xr-x  1 admin1  admin  44 14 Jan 12:53 /usr/local/bin/pkg-config -> ../Cellar/pkg-config/0.29.2_3/bin/pkg-config
-bash: ../Cellar/pkg-config/0.29.2_3/bin/pkg-config: No such file or directory
Admins-Mac-mini:~ admin1$

Attached is a pdf of the contents of the Avidemux2 folder You cannot see attachments on this board.
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: eumagga0x2a on January 14, 2022, 09:44:52 PM
Please re-read https://avidemux.org/smif/index.php/topic,19757.msg93161.html#msg93161 (https://avidemux.org/smif/index.php/topic,19757.msg93161.html#msg93161) regarding requested info, but juding from your replies, I guess it doesn't make sense to continue this topic, at least tonight.
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: Grim Reaper on January 14, 2022, 10:06:36 PM
Attached is a pdf file containing the results of the 4 file queries you asked for. I couldn't post them normally because the text content is considered to be spam. You cannot see attachments on this board.
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: eumagga0x2a on January 14, 2022, 10:48:04 PM
Quote from: Grim Reaper on January 14, 2022, 10:06:36 PMI couldn't post them normally because the text content is considered to be spam.

Probably because you include the dollar sign. Anyway,

Quote from: Grim Reaper on January 14, 2022, 10:06:36 PMbrew ls -v libass
Error: No such keg: /usr/local/Cellar/libass

libass is not installed, so no wonder pkg-config doesn't find it.

brew install libass
should fix it.
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: Grim Reaper on January 15, 2022, 04:03:15 PM
I reinstalled libass, which did install, then I ran the Avidemux OSX installer build script and it failed as it did previously during 'Plugins Configuration Started' because it couldn't find libass. Attached is the 'Plugins Configuration Started' portion of the installer script run that failed.

You cannot see attachments on this board.

I ran 'brew formulae' which lists libass as one of the packages included.

I ran 'brew search --desc libass'which returned:

Admins-Mac-mini:avidemux2 admin1$ brew search --desc libass
==> Formulae

==> Casks
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: eumagga0x2a on January 15, 2022, 10:39:02 PM
Quote from: Grim Reaper on January 15, 2022, 04:03:15 PMI ran 'brew formulae' which lists libass as one of the packages included.

This command lists available formulas (formulae) no matter installed or not.

Quote from: Grim Reaper on January 15, 2022, 04:03:15 PMI ran 'brew search --desc libass'

...which was equally pointless.

Please post the output of command

date +%m%d%H && brew ls -v libass
with prompt stripped (no hostname, no username, no dollar sign, just the command and the output).
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: Grim Reaper on January 15, 2022, 11:43:32 PM
date +%m%d%H && brew ls -v libass
011518
Error: No such keg: /usr/local/Cellar/libass
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: eumagga0x2a on January 16, 2022, 01:06:26 AM
Quote from: Grim Reaper on January 15, 2022, 11:43:32 PMdate +%m%d%H && brew ls -v libass
011518
Error: No such keg: /usr/local/Cellar/libass

= libass is NOT installed. Please post the output of

brew install libass && brew ls -v libass
with prompt stripped.
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: Grim Reaper on January 16, 2022, 02:37:24 AM
Sorry, I couldn't post the output of 'brew install libass && brew ls -v libass'into a reply, attached as a pdf:
You cannot see attachments on this board.
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: eumagga0x2a on January 16, 2022, 02:49:54 PM
Thanks, this explains the misery. The package gobject-introspection, needed by libass, fails to build thus making libass installation fail. The necessary upstream patch has not been backported onto gobject-introspection branch used by Homebrew. If you can do without a working filter to hardcode subtitles into video, pass --with-internal-libass option to bootStrapOsx_Catalina.bash to avoid libass dependency.
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: eumagga0x2a on January 16, 2022, 03:12:48 PM
Quote from: Grim Reaper on January 16, 2022, 02:37:24 AMI couldn't post the output of 'brew install libass && brew ls -v libass'into a reply

If you tried to post exactly the same content as you printed to PDF, you didn't strip the prompt so that its dollar sign may have triggered a false positive:

Quote from: eumagga0x2a on January 16, 2022, 01:06:26 AMPlease post [...]

with prompt stripped.
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: Grim Reaper on January 16, 2022, 04:34:12 PM
I stripped out what you requested but it wouldn't post. I reduced the content down and it still wouldn't post. After stripping out more and more content and a number of repost attempts I wasn't allowed to post because I had made too many post attempts. Even after waiting a while I couldn't post. I had to logout and login to be able to post again.

I don't know why, after many, many, reinstallations of 'libass' which were supposedly successful it doesn't appear to be installed. Maybe it isn't installed in the correct place or the link/pointer/path to its location is incorrect. Is it possible to make the installer without 'libass' by eliminating it from the installer build script then manually add it in later?

Maybe someone else who is using Mojave and has the required installer build environment can try to build an installer for the most recent Avidemux version. If they have the same problem(s) then there is something wrong that isn't particular to my Avidemux installer build environment.
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: eumagga0x2a on January 16, 2022, 06:14:45 PM
Quote from: Grim Reaper on January 16, 2022, 04:34:12 PMI stripped out what you requested but it wouldn't post.

This is possible, unfortunately. CleanTalk, the external spam protection service, is a black box out of my control. If this forum accepts .zip as attachment, it would have been a better option compared to PDF to save the output as .txt and then zip it, however. Anyway, this is just a sideshow as the reason for problems has been identified now.

Quote from: Grim Reaper on January 16, 2022, 04:34:12 PMI don't know why, after many, many, reinstallations of 'libass' which were supposedly successful it doesn't appear to be installed.

Do you actually read what a write you? ???

Quote from: eumagga0x2a on January 16, 2022, 02:49:54 PMThe package gobject-introspection, needed by libass, fails to build thus making libass installation fail. The necessary upstream patch has not been backported onto gobject-introspection branch used by Homebrew.

Quote from: Grim Reaper on January 16, 2022, 04:34:12 PMIs it possible to make the installer without 'libass' by eliminating it from the installer build script then manually add it in later?

If someone backports the upstream gobject-introspection patch, then it will be possible to build libass in Homebrew on Mojave and the build Avidemux with a working subtitle hardcoding filter. For now, you can only

Quote from: eumagga0x2a on January 16, 2022, 02:49:54 PMpass --with-internal-libass option to bootStrapOsx_Catalina.bash to avoid libass dependency

Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: Grim Reaper on January 17, 2022, 02:57:33 AM
How do I do this? 'pass --with-internal-libass option to bootStrapOsx_Catalina.bash to avoid libass dependency'

Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: eumagga0x2a on January 17, 2022, 04:21:13 AM
This is done by running the command

export MACOSX_DEPLOYMENT_TARGET=10.14
cd ~/avidemux2 && bash bootStrapOsx_Catalina.bash --with-internal-libass
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: Grim Reaper on January 17, 2022, 05:23:22 AM
I ran the Avidemux2.8 build script using '--with-internal-libass' which did get past the missing 'libass' problem, but it failed to complete the build. I have attached an edited text file of the error output.

Liba52 is definitely available, ADM_liba52 Get Info:
‎⁨Macintosh HD⁩ ▸ ⁨Users⁩ ▸ ⁨admin1⁩ ▸ ⁨avidemux2⁩ ▸ ⁨avidemux_plugins⁩ ▸ ⁨ADM_audioDecoders⁩ ▸ ⁨ADM_ad_ac3⁩

What is the difference between internal and external? Why is one used in preference to the other?



You cannot see attachments on this board.



CMake Error: The following variables are used in this project, but they are set to NOTFOUND.\
Please set them or make sure they are set and tested correctly in the CMake files:\
LIBA52_INCLUDE_DIR\
   used as include directory in directory /Users/admin1/avidemux2/avidemux_plugins\
   
ADM_audioDecoders\
   used as include directory in directory /Users/admin1/avidemux2/avidemux_plugins/

ADM_audioDecoders/ADM_ad_mad/ADM_libMad\
   used as include directory in directory /Users/admin1/avidemux2/avidemux_plugins/


Continues for all the plugins...

 
MP4V2_LIBRARIES\
    linked by target "ADM_mx_mp4v2" in directory /Users/admin1/avidemux2/avidemux_plugins/ADM_muxers/muxerMp4v2\
\
\cf3 CMake Error in ADM_audioDecoders/ADM_ad_ac3/CMakeLists.txt:\cf2 \
\cf3   Found relative path while evaluating include directories of "ADM_ad_a52":\cf2 \
\
\cf3     "LIBA52_INCLUDE_DIR-NOTFOUND"\cf2 \


Continues for all LIBA52



-- Generating done\
\cf4 CMake Warning:\cf2 \
\cf4   Manually-specified variables were not used by the project:\cf2 \
\
\cf4     CMAKE_EDIT_COMMAND\cf2 \
\cf4     ENABLE_QT5\cf2 \
\
\
CMake Generate step failed.  Build files cannot be regenerated correctly.\
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: eumagga0x2a on January 17, 2022, 04:20:37 PM
It looks like neither a52dec nor mp4v2 are installed in Homebrew (or rather their installation failed and you continued regardless).

mp4v2 is not really needed (and it is deprecated in Avidemux), so you could just delete all lines of avidemux_plugins/ADM_muxers/CMakeLists.txt below line 9 without losing much.

Regarding a52dec, please post the output of

brew install a52dec && brew ls -v a52dec
If the installation of a52dec fails, you could try to pass the additional option --with-internal-liba52 to bootStrapOsx_Catalina.bash.
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: Grim Reaper on January 17, 2022, 05:26:34 PM
After 'Liba52' supposedly successfully installed, it can't be found:

pkg-config --exists --print-errors liba52
Package liba52 was not found in the pkg-config search path.

I installed libmp4v2 and ran the installer build script again and this is the output:


+ make package
Run CPack packaging tool...
CPack: Create package using DragNDrop
CPack: Install projects
CPack: - Run preinstall target for: AvidemuxBundle
CPack: - Install project: AvidemuxBundle []
CPack: Create package
CPack: - package: /Users/admin1/avidemux2/installer/Avidemux 2.8.1 Qt5 220117-13h24m_50b041949cc.dmg generated.
+ echo '** ALL DONE **'
** ALL DONE **
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: eumagga0x2a on January 17, 2022, 05:38:04 PM
Quote from: Grim Reaper on January 17, 2022, 05:26:34 PMAfter 'Liba52' supposedly successfully installed

Proof, please:

brew install a52dec && brew ls -v a52dec
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: Grim Reaper on January 17, 2022, 07:14:36 PM
brew install a52dec && brew ls -v a52dec
Running `brew update --preinstall`...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
Updated 5 formulae.

Warning: a52dec 0.7.4 is already installed and up-to-date.
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: eumagga0x2a on January 17, 2022, 07:53:52 PM
Quote from: Grim Reaper on January 17, 2022, 05:26:34 PMI installed libmp4v2 and ran the installer build script again and this is the output:

+ make package
Run CPack packaging tool...
CPack: Create package using DragNDrop
CPack: Install projects
CPack: - Run preinstall target for: AvidemuxBundle
CPack: - Install project: AvidemuxBundle []
CPack: Create package
CPack: - package: /Users/admin1/avidemux2/installer/Avidemux 2.8.1 Qt5 220117-13h24m_50b041949cc.dmg generated.
+ echo '** ALL DONE **'
** ALL DONE **

This means you have successfully compiled Avidemux 2.8.1 on Mojave. You should move the file "Avidemux 2.8.1 Qt5 220117-13h24m_50b041949cc.dmg" away from the "installer" subdirectory of "avidemux2", else it will be deleted next time you run the bootstrap script.
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: eumagga0x2a on January 17, 2022, 07:58:41 PM
Quote from: Grim Reaper on January 17, 2022, 05:26:34 PMAfter 'Liba52' supposedly successfully installed, it can't be found:

pkg-config --exists --print-errors liba52
Package liba52 was not found in the pkg-config search path.

I've checked now, and this is nothing to be concerned about. a52dec doesn't integrate with pkg-config, and Avidemux doesn't use pkg-config to find this library.
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: Grim Reaper on January 17, 2022, 10:37:41 PM
I ran the Avidemux2.8.1 dmg installer app the installer script built. The Avidemux2.8.1 app icon has a circle with a line through it.  I installed the Avidemux2.8.1 the installer script built, when I ran it this was the result:

You can't use this version of the application "Avidemux_2.8.1.app" with this version of macOS.
You have macOS 10.14.6. The application requires macOS 10.15 or later.

It must be checking for MacOS 10.15 or newer to run. Is there somewhere in the installer build script's files and/or the Avidemux2.8.1 app's files where that check can be edited/commented out?
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: eumagga0x2a on January 17, 2022, 10:44:51 PM
Quote from: Grim Reaper on January 17, 2022, 10:37:41 PMYou have macOS 10.14.6. The application requires macOS 10.15 or later.

Have you forgotten to export MACOSX_DEPLOYMENT_TARGET=10.14 in the Terminal tab where you ran the bootstrap script to produce the disk image? The default target is 10.15.
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: Grim Reaper on January 17, 2022, 10:50:52 PM
Thanks, you are correct, I will redo.
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: Grim Reaper on January 18, 2022, 01:22:09 AM
Thanks for the immense amount of assistance you've provided to me.

Avidemux2.8.1 successfully ran under Mojave and processed a file using 'splitext' in the .py script. Now there won't be a double file extension after file processing.

I compared Avidemux2.8.1 to Avidemux2.7.7 and found that audio output formats AAC (Faac), AC3 (Aften), Vorbus available in 2.7.7 aren't available in 2.8.1. Is that intentional?

Is the subtitle function available in the Avidmux2.8.1 that was created?

Is it possible to make the Avidemux2.8.1 for Mojave that I now have available to others through the Avidemux forum or elsewhere?

Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: eumagga0x2a on January 18, 2022, 07:27:44 AM
Quote from: Grim Reaper on January 18, 2022, 01:22:09 AMI compared Avidemux2.8.1 to Avidemux2.7.7 and found that audio output formats AAC (Faac), AC3 (Aften), Vorbus available in 2.7.7 aren't available in 2.8.1. Is that intentional?

Vorbis encoder missing was an unintentional omission. To make it available, please

brew install libvorbis
and, if this succeeds, rebuild Avidemux.

FAAC and Aften are somewhat inferior in quality to already available alternatives, so that they can be seen as redundant and IMHO safely skipped. If you want them nevertheless, install them in Homebrew too before rebuilding Avidemux.

Quote from: Grim Reaper on January 18, 2022, 01:22:09 AMIs the subtitle function available in the Avidmux2.8.1 that was created?

It should be available, but half-broken (font selection broken due to the internal libass being a very old version).

Quote from: Grim Reaper on January 18, 2022, 01:22:09 AMIs it possible to make the Avidemux2.8.1 for Mojave that I now have available to others through the Avidemux forum or elsewhere?

While GPL explicitly allows redistribution as long as the source (i.e. also all your modifications to the source) is made available, providing binaries of encoders and even decoders for some codecs like HEVC may pose a problem in some countries due to software patents.
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: Grim Reaper on January 18, 2022, 06:38:22 PM
I installed libvorbis, aften.
I tried installing libass again. The libass install was supposedly successful.

I ran the MacOS installer build script without directing it to use internal libass.

The installer build found external libass:

-- Checking libass external lib ...
-- Checking for module 'libass'
--   Found libass, version 0.15.2
--    found, lib is -L/usr/local/Cellar/libass/0.15.2/lib;-lass

The avidemux2.8.1 MacOS installer build script successfully completed. I suppose this means that this avidemux2.8.1 build includes the full-featured external libass.
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: eumagga0x2a on January 18, 2022, 07:17:52 PM
I don't believe in miracles but like them nevertheless :-)
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: Grim Reaper on January 18, 2022, 07:46:56 PM
I, too, don't believe in miracles. Is there a way to determine if a miracle occurred with external libass?
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: eumagga0x2a on January 18, 2022, 08:00:16 PM
This is the patch, pushed a few hours ago to the Homebrew repository, which was responsible for the miracle:

gobject-introspection: fix doctemplates error (https://github.com/Homebrew/homebrew-core/commit/3e50746ab6135c2b802d378a5164e18667700e42#diff-1a1e293ac5c7c093e3d24295f6dd8ae6e5996ed9e2c42ee6e47845af148d5d0b)
Title: Re: Script Error: Exception: (_tp_dict_get) KeyError: splitext
Post by: Grim Reaper on January 18, 2022, 08:41:15 PM
If that had occurred before we embarked upon the journey of building the MacOS avidemux2.8.1 installer for Mojave it would have made the task a lot less frustrating and time/life wasting, at least it is done now. I am thankful for that 'miracle' even though I don't believe in miracles.