No sound in the speakers with avidemux_2.8.1_legacy.appImage

Started by grandtoubab, September 24, 2022, 06:42:31 PM

Previous topic - Next topic

grandtoubab

Hello
avidemux_2.8.1_legacy.appImage running on Debian 12 Bookworm aka testing

I cant hear the sound in the speakers with Avidemux
I see the audio vumeters moving in Avidemux

It seems related to pulseaudio plugin:

[ADM_ad_loadPlugins] 18:29:21-656  Scanning done, found 10 audio decoders
 [ADM_av_loadPlugins] 18:29:21-656  [ADM_av_plugin] Scanning directory /home/guy/Avidemux/usr/lib/ADM_plugins6/audioDevices
Unable to load [/home/guy/Avidemux/usr/lib/ADM_plugins6/audioDevices/libADM_av_pulseAudio.so]: /lib/x86_64-linux-gnu/libsndfile.so.1: undefined symbol: lame_encode_buffer_interleaved_int
 [ADM_AudioDevices] 18:29:21-663  Symbol loading failed for /home/guy/Avidemux/usr/lib/ADM_plugins6/audioDevices/libADM_av_pulseAudio.so
 [tryLoadingFilterPlugin] 18:29:21-663  /home/guy/Avidemux/usr/lib/ADM_plugins6/audioDevices/libADM_av_pulseAudio.so:CannotLoad

eumagga0x2a

It looks like libsndfile1 needs libmp3lame0 which is missing. Looks like a dependency problem in the distribution.

By the way, the legacy AppImage is meant to be used on really old distributions like Debian Stretch or such. Please use the normal one with anything from Buster on.

grandtoubab

Hello
I give a try to compil avidemux on my installation, adapting the how-to because the name of some packages

sudo apt-get install gcc g++ make cmake pkg-config  fakeroot yasm libsqlite3-dev  build-essential libpng-dev

sudo apt-get install  libmp3lame-dev libx264-dev  libfaad-dev libfaac-dev

And then to compil I have to change TMPDIR becuse my installation is done with tmp in tmpfs in memory.

guy@debian:~/Avidemux/avidemux_2.8.1$ TMPDIR=/var/tmp
guy@debian:~/Avidemux/avidemux_2.8.1$ bash bootStrap.bash --deb –with-qt

It was ok and I install all the deb packages
guy@debian:~/Avidemux/avidemux_2.8.1/debs$ ls
avidemux3-cli-2.8.1-220925-dev.deb              avidemux3-plugins-COMMON-2.8.1-220925-plugins.deb
avidemux3-cli-2.8.1-220925-runtime.deb          avidemux3-plugins-qt5-2.8.1-220925-plugins.deb
avidemux3-core-2.8.1-220925-dev.deb             avidemux3-qt5-2.8.1-220925-dev.deb
avidemux3-core-2.8.1-220925-runtime.deb         avidemux3-qt5-2.8.1-220925-runtime.deb
avidemux3-plugins-CLI-2.8.1-220925-plugins.deb  avidemux3-settings-2.8.1-220925-settings.deb
guy@debian:~/Avidemux/avidemux_2.8.1/debs$


Launching /usr/bin/avidemux3_qt5 is ok but still no sound with the "dummy' audio devices

In Debian it exist a package to wrap sound to pulseaudio from application using oss

 sudo apt  install osspd

I change the audio preferences to oss and it is working I have sound in the speakers and the audio cursor in avidemus is now blue and usable when it was grayed before
Here are the messages
[ADM_av_loadPlugins] 09:25:34-357  [ADM_av_plugin] Scanning directory /usr/lib/ADM_plugins6/audioDevices
 [ADM_AudioDevices] 09:25:34-358  Name :Oss ApiVersion :2
 [tryLoadingFilterPlugin] 09:25:34-358  [Filters] Registered filter /usr/lib/ADM_plugins6/audioDevices/libADM_av_oss.so as  Oss audio device (c) mean
 [ADM_av_loadPlugins] 09:25:34-358  [ADM_av_plugin] Scanning done


I admit it is kind of mess but it works


eumagga0x2a

Quote from: grandtoubab on September 25, 2022, 09:27:06 AMsudo apt-get install gcc g++ make cmake pkg-config  fakeroot yasm libsqlite3-dev  build-essential libpng-dev

AFAIK, Debian has moved to using the apt command as interactive frontend for package management instead of apt-get quite a long time ago.

gcc and gcc++ are dependencies of build-essential, no need to install them explicitly.

Is fakeroot needed for packaging as debs? It is not needed for a normal build.

Quote from: grandtoubab on September 25, 2022, 09:27:06 AMAnd then to compil I have to change TMPDIR becuse my installation is done with tmp in tmpfs in memory.

This might be necessary only if you have less than 4 GiB available for tmpfs. I build Avidemux with /tmp on a tmpfs limited to 4 GiB without issues.

Quote from: grandtoubab on September 25, 2022, 09:27:06 AMguy@debian:~/Avidemux/avidemux_2.8.1$ bash bootStrap.bash --deb –with-qt

For sure not verbatim ("–" is invalid for an option) and in intention redundant as "--with-qt" is default. While packaging as debs should work, the only purpose is to facilitate uninstall if Avidemux needs to be installed system-wide, the packages themselves do not include any dependency info.

I recommend running Avidemux via the supplied wrapper script template from the build directory without installation.

Quote from: grandtoubab on September 25, 2022, 09:27:06 AMLaunching /usr/bin/avidemux3_qt5 is ok but still no sound with the "dummy' audio devices

The dummy audio device doesn't output anything by definition. Does loading of libADM_av_pulseAudio.so still fail so that you cannot choose it from the list of audio devices?


grandtoubab

I have no sound problem on my installation and pulseaudio is working well.

I try a new compilation, here is the avidemux problem
- Checking for OSS
-- ****************
-- Found sys/soundcard.h
-- Found OSS
-- Compiler Flags: /usr/include/x86_64-linux-gnu
-- Linker Flags  :

-- Checking for PulseAudio
-- Checking for module 'libpulse'
--   No package 'libpulse' found
-- Could not find PulseAudio


libpulse exists on my installation

 apt list --installed | grep libpulse

libpulse-mainloop-glib0/testing,unstable,now 16.1+dfsg1-2 amd64  [installé]
libpulse0/testing,unstable,now 16.1+dfsg1-2 amd64  [installé, automatique]
libpulse0/testing,unstable,now 16.1+dfsg1-2 i386  [installé, automatique]
libpulsedsp/testing,unstable,now 16.1+dfsg1-2 amd64  [installé]


so what?

eumagga0x2a

#6
libpulse-dev is probably missing.

You will need to rebuild Avidemux to pick up PulseAudio.

The Debian bug report states that manual reinstall of Lame libs fixed PulseAudio (and you just did the same). This doesn't mean that dependency problem in Debian itself was fixed.

grandtoubab

Exactly and it brings a lot of others

Start-Date: 2022-09-25  14:28:30
Commandline: apt install libpulse-dev
Requested-By: guy (1001)
Install: libblkid-dev:amd64 (2.38.1-1, automatic), libselinux1-dev:amd64 (3.4-1+b2, automatic), libmount-dev:amd64 (2.38.1-1, automatic), libglib2.0-dev:amd64 (2.74.0-1, automatic), libpcre2-posix3:amd64 (10.40-1, automatic), libffi-dev:amd64 (3.4.2-4, automatic), libsepol-dev:amd64 (3.4-2, automatic), uuid-dev:amd64 (2.38.1-1, automatic), libpulse-dev:amd64 (16.1+dfsg1-2), libpcre2-32-0:amd64 (10.40-1, automatic), libpcre2-dev:amd64 (10.40-1, automatic)
End-Date: 2022-09-25  14:29:00


And now it finds all audio devices

guy@debian:~/Avidemux$ ./avidemux_2.8.1.appImage

[ADM_ad_loadPlugins] 12:50:54-935  Scanning done, found 10 audio decoders
 [ADM_av_loadPlugins] 12:50:54-935  [ADM_av_plugin] Scanning directory /tmp/user/1001/.mount_avidemYKZbIe/usr/lib/ADM_plugins6/audioDevices
 [ADM_AudioDevices] 12:50:54-942  Name :AlsaDmix ApiVersion :2
 [tryLoadingFilterPlugin] 12:50:54-954  [Filters] Registered filter /tmp/user/1001/.mount_avidemYKZbIe/usr/lib/ADM_plugins6/audioDevices/libADM_av_alsaDMix.so as  Alsa Audio Device (dmix) (c) Mean 2008
 [ADM_AudioDevices] 12:50:54-956  Name :AlsaDefault ApiVersion :2
 [tryLoadingFilterPlugin] 12:50:54-956  [Filters] Registered filter /tmp/user/1001/.mount_avidemYKZbIe/usr/lib/ADM_plugins6/audioDevices/libADM_av_alsaDefault.so as  Alsa Audio Device (default) (c) Mean 2009
 [ADM_AudioDevices] 12:50:54-959  Name :AlsaHw0 ApiVersion :2
 [tryLoadingFilterPlugin] 12:50:54-959  [Filters] Registered filter /tmp/user/1001/.mount_avidemYKZbIe/usr/lib/ADM_plugins6/audioDevices/libADM_av_alsaHw.so as  Alsa Audio Device (hw:0) (c) Mean 2008
 [ADM_AudioDevices] 12:50:54-960  Name :Oss ApiVersion :2
 [tryLoadingFilterPlugin] 12:50:54-960  [Filters] Registered filter /tmp/user/1001/.mount_avidemYKZbIe/usr/lib/ADM_plugins6/audioDevices/libADM_av_oss.so as  Oss audio device (c) mean
 [ADM_AudioDevices] 12:50:55-002  Name :PulseAudio ApiVersion :2
 [tryLoadingFilterPlugin] 12:50:55-002  [Filters] Registered filter /tmp/user/1001/.mount_avidemYKZbIe/usr/lib/ADM_plugins6/audioDevices/libADM_av_pulseAudio.so as  PulseAudio audio device (c) mean
 [ADM_av_loadPlugins] 12:50:55-002  [ADM_av_plugin] Scanning done


And I have the choice of audio devices in Avidemux


Thanks for your help and explanations

grandtoubab

#8
Compilation find pulseaudio now

**************************
***  Optional Library  ***
***      Summary      ***
**************************
*** Video Encoder      ***
    Xvid          No
    libvpx        No
    x264          Yes
    x265          No
*** Scripting          ***
    TinyPy        Yes
*** Miscellaneous      ***
    VapourSynth    No
    FreeType2      No
    FontConfig    No
    FRIBIDI        No
*** Audio Encoder      ***
    Aften          No
    TWOLAME        No
    LAME          Yes
    DCAENC        No
    Opus          No
    FAAC          Yes
    FDK_AAC        No
    Vorbis        No
*** Video Decoder      ***
    libaom        No
*** Audio Device      ***
    ALSA          No
    aRts          No
    ESD            No
    JACK          No
    OSS            Yes
    PulseAudio    Yes
*** Audio Decoder      ***
    FAAD          Yes
    Vorbis        No
    libdca        No
    opencore-amrwb No
    opencore-amrnb No
    Opus          No
*** User Interface    ***
    Common        Yes
    GTK+          No
    Qt            No
    CLI            No
**************************
***  Release Build    ***
**************************

I adapt the launch script to launch avidemux qt5

guy@debian:~/Avidemux/avidemux_2.8.1$ cat  Avidemux.sh
#!/bin/bash
# This is a script template to run Avidemux Jobs on Linux without installation.
# Adjust variables appropriately, copy it to a location included in $PATH
# and make it executable.

# TOPSRCDIR must match the location of the Avidemux source tree,
# default: ${HOME}/avidemux2
TOPSRCDIR="/home/guy/Avidemux/avidemux_2.8.1"

# PREFIX must match the prefix passed to bootStrap.bash when compiling Avidemux,
# default when no prefix specified: /usr
PREFIX="/usr"

# Avidemux version
MAJOR="2"
MINOR="8"

fail()
{
    echo "$1. Aborting."
    exit 1
}
HERE="${TOPSRCDIR}/install${PREFIX}"
CORECONFIG="${HERE}/include/avidemux/${MAJOR}.${MINOR}/ADM_coreConfig.h"
if ! [ -e "${CORECONFIG}" ]; then
    fail "${CORECONFIG} not found, can't determine the relative library directory"
fi
LIBDIR=$(grep ADM_RELATIVE_LIB_DIR "${CORECONFIG}" | cut -f 3 -d " " | sed -e 's/^"//' -e 's/"$//')
if [ -z "${LIBDIR}" ]; then
    fail "ADM_RELATIVE_LIB_DIR empty or not set in ${CORECONFIG}"
fi

if ! [ -e "${HERE}/lib" ]; then
    ln -s "${HERE}/${LIBDIR}" "${HERE}/lib"
fi

export LD_LIBRARY_PATH="${HERE}/${LIBDIR}:${LD_LIBRARY_PATH}"
"${HERE}/bin/avidemux3_qt5" --portable



And that is perfect


eumagga0x2a

You should ensure that more than the unaccelerated "Qt" (indicated as "RGB") video renderer is available and used. Please have a look at the convenience script to build Avidemux on Ubuntu for the list of developer packages.

grandtoubab

I perform

bash createDebFromSourceUbuntu.bash --deps-only
This will install all the packages necessary to build avidemux

which add all this on my installation

Start-Date: 2022-09-25  16:25:25
Commandline: apt-get install build-essential cmake pkg-config yasm libsqlite3-dev libxv-dev libvdpau-dev libva-dev libasound2-dev libpulse-dev qttools5-dev-tools qtbase5-dev libx264-dev libxvidcore-dev libmp3lame-dev libtwolame-dev libopus-dev libvorbis-dev libogg-dev libpng-dev libfontconfig1-dev libfribidi-dev
Requested-By: guy (1001)
Install: libva-dev:amd64 (2.15.0-1), libfreetype6-dev:amd64 (2.12.1+dfsg-3, automatic), libfontconfig1-dev:amd64 (2.13.1-4.5), libfribidi-dev:amd64 (1.0.8-2.1), libvorbis-dev:amd64 (1.3.7-1), libogg-dev:amd64 (1.3.5-1), libva-glx2:amd64 (2.15.0-1, automatic), libfontconfig-dev:amd64 (2.13.1-4.5, automatic), libtwolame-dev:amd64 (0.4.0-2), libbrotli-dev:amd64 (1.0.9-2+b4, automatic), libfreetype-dev:amd64 (2.12.1+dfsg-3, automatic), libwayland-bin:amd64 (1.21.0-1, automatic), libexpat1-dev:amd64 (2.4.9-1, automatic), libvdpau-dev:amd64 (1.5-1), libwayland-dev:amd64 (1.21.0-1, automatic), libxv-dev:amd64 (2:1.0.11-1.1), libset-scalar-perl:amd64 (1.29-3, automatic), libxvidcore-dev:amd64 (2:1.3.7-1), libopus-dev:amd64 (1.3.1-2), libasound2-dev:amd64 (1.2.7.2-1)
End-Date: 2022-09-25  16:25:51
Start-Date: 2022-09-25  16:34:46
Commandline: apt-get install libfdk-aac-dev
Requested-By: guy (1001)
Install: libfdk-aac2:amd64 (2.0.2-1, automatic), libfdk-aac-dev:amd64 (2.0.2-1)
End-Date: 2022-09-25  16:34:50

Start-Date: 2022-09-25  16:35:06
Commandline: apt-get install libx265-dev
Requested-By: guy (1001)
Install: libx265-dev:amd64 (3.5-2+b1)
End-Date: 2022-09-25  16:35:10

Start-Date: 2022-09-25  16:35:25
Commandline: apt-get install libvpx-dev
Requested-By: guy (1001)
Install: libvpx-dev:amd64 (1.12.0-1)
End-Date: 2022-09-25  16:35:29

Start-Date: 2022-09-25  16:35:45
Commandline: apt-get install libaom-dev
Requested-By: guy (1001)
Install: libaom-dev:amd64 (3.5.0~rc1-1)
End-Date: 2022-09-25  16:35:48



and  warn this

E: Impossible de trouver le paquet libaften-dev
Warning: libaften-dev cannot be installed using package management. Aften AC-3 audio encoder plugin won't be built.


I will try a new compil later
For the moment use of appimage is ok for me

eumagga0x2a

The warning about Aften missing is expected and the fact that it is missing doesn't matter, the AC3 encoder in libavcodec is good enough if you need to encode to AC3 at all.

grandtoubab

Hello,
Time to time I have a crash of Avidemux related to LIBVA
It happens as well with compiled version or appimage version.
[checkSupportedFunctionsAndImageFormat] 16:18:55-645  Did not find a usable way to transfer images to/from LibVA
free(): invalid pointer
Avidemux.sh : ligne 38 : 86765 Abandon                "${HERE}/bin/avidemux3_qt5" --portable "$@"

As to compile is a long process on my tiny PC, I prefer focus on the appimage version.

Once avidemux_2.8.1.appImage success to open, I copy all the /tmp useful parts to my Avidemux personnal folder.
That is:

guy@debian:~/Avidemux/281$ ls -alrt
total 56
drwxr-xr-x 6 guy guy  4096 25 sept. 23:54 usr
drwxr-xr-x 3 guy guy  4096 25 sept. 23:54 opt
-rwxr-xr-x 1 guy guy 16840 25 sept. 23:54 freetype_probe
-rw-r--r-- 1 guy guy  5254 25 sept. 23:56 avidemux.png
-rw-r--r-- 1 guy guy  342 25 sept. 23:56 avidemux.desktop
-rwxr-xr-x 1 guy guy  2656 26 sept. 08:28 AppRun-original-de-appimage
-rwxr-xr-x 1 guy guy  1377 26 sept. 09:01 AppRunGuy

I check Apprun and modify it to force the use of embedded libs . file is called AppRunGuy
#!/bin/bash
# set -x
OPENGL_NAME="libGL.so.1"
PULSE_NAME="libpulse-simple.so.0"
LIBVA_NAME="libva.so.2"
LIBVDPAU_NAME="libvdpau.so.1"



# make relative-path arguments absolute before changing directory
args=("--portable");
paramprefix="--";
param="--load";#enable filename as first/single argument, with --load as supposed default action
for arg in "$@";
do # add argument as is, or realpath of argument, depending on paramprefix
    [ "${arg::2}" = "$paramprefix" ] && args+=("$arg") && param="$arg" || {
        case "$param" in
        --append|--load|--run|--save*)
            args+=("$(realpath -- "$arg")") ;;
        *)
            args+=("$arg") ;;
        esac
    }
    [ "$arg" == "$paramprefix" ] && paramprefix="123" && param="--load"; # new paramprefix will never match length-2 string again
done;
HERE="$(dirname "$(readlink -f "${0}")")"
cd "${HERE}/usr/"
export QT_STYLE_OVERRIDE="fusion"
FT_PROBE_EXE_NAME="freetype_probe"


    echo "AppRunGuy Using bundled freetype, fontconfig and fribidi."

    LD_LIBRARY_PATH="${HERE}/opt/lib:${LD_LIBRARY_PATH}"


    echo "${LIBVA_NAME} AppRunGuy using bundled version."
    LD_LIBRARY_PATH="${HERE}/usr/lib/va:${LD_LIBRARY_PATH}"

    echo "${LIBVDPAU_NAME} ApprunGuy using bundled version."


export LD_LIBRARY_PATH="${HERE}/usr/lib/:${HERE}/usr/lib/qt5:${LD_LIBRARY_PATH}"
export PATH="${HERE}/usr/bin:${PATH}"

"${HERE}/usr/bin/avidemux3_qt5" "${args[@]}"

cd -

I add a launcher in .local/share/applications/

~/.local/share/applications$ cat Avidemux.desktop

[Desktop Entry]
Name=Avidemux
GenericName=Video Editor
Comment=Multiplatform video editor
Exec=bash /home/guy/Avidemux/281/AppRunGuy
Icon=/home/guy/Avidemux/avidemux.png
Terminal=false
Type=Application
Categories=AudioVideo;AudioVideoEditing;Video;
MimeType=video/mpeg;video/x-mpeg;video/mp4;video/x-m4v;video/quicktime;video/3gp;video/mkv;video/x-matroska;video/webm;video/flv;video/x-flv;video/dv;video/x-msvideo;video/x-ms-wmv;video/x-ms-asf;video/x-anim;

And since yesterday I do not reproduce the crash  :)



grandtoubab

About the libva crash

1- System libva => crash
libva info: VA-API version 1.15.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/r600_drv_video.so
libva info: Found init function __vaDriverInit_1_15
libva info: va_openDriver() returns 0
free(): invalid pointer
./AppRun : ligne 77 : 10712 Abandon                 "${HERE}/usr/bin/avidemux3_qt5" "${args[@]}"
+ cd -

2-bundled libva => no crash
libva info: VA-API version 1.4.0
libva info: va_getDriverName() returns 0
libva info: Trying to open ./././././././././././lib/dri/r600_drv_video.so
libva info: va_openDriver() returns -1