avidemux 2.7.# Compiling Avidemux on Ubuntu 18.04 LTS

Started by Jan Gruuthuse, June 12, 2018, 08:15:16 am

Previous topic - Next topic

Jan Gruuthuse

June 12, 2018, 08:15:16 am Last Edit: June 12, 2018, 08:43:08 am by Jan Gruuthuse
remove and delete installed avidemux
sudo apt-get purge "avidemux*"

Information update of repositories on packages and their dependencies
sudo apt-get update

Install GIT (source code management and distributed revision control system)
sudo apt-get install git

Get the source code
git clone https://github.com/mean00/avidemux2.git

Go into the cloned folder
cd ~/avidemux2

Run script that checks and install dependencies and builds avidemux.
bash createDebFromSourceUbuntu.bash

Jan Gruuthuse

June 12, 2018, 08:17:31 am #1 Last Edit: June 12, 2018, 08:20:21 am by Jan Gruuthuse
starting script createDebFromSourceUbuntu.bash checks and install dependencies and builds avidemux: terminal output.
The following NEW packages will be installed:
  build-essential cmake cmake-data dpkg-dev fakeroot g++ g++-7 gcc gcc-7 i965-va-driver libaften-dev libaften0 libalgorithm-diff-perl
  libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan4 libasound2-dev libatomic1 libbrotli1 libc-dev-bin libc6-dev libcilkrts5 libcurl4 libdca-dev
  libdca0 libdouble-conversion1 libdrm-dev libegl1-mesa-dev libexpat1-dev libfaac-dev libfaac0 libfaad-dev libfaad2 libfakeroot libfontconfig1-dev
  libfreetype6-dev libfribidi-dev libgcc-7-dev libgl1-mesa-dev libgles2-mesa-dev libglib2.0-dev libglib2.0-dev-bin libglu1-mesa-dev libglvnd-core-dev
  libglvnd-dev libitm1 libjsoncpp1 liblsan0 libmp3lame-dev libmpx2 libogg-dev libopengl0 libopus-dev libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5
  libpng-dev libpng-tools libpthread-stubs0-dev libpulse-dev libqt5concurrent5 libqt5core5a libqt5dbus5 libqt5designer5 libqt5designercomponents5 libqt5gui5
  libqt5help5 libqt5network5 libqt5opengl5 libqt5opengl5-dev libqt5positioning5 libqt5printsupport5 libqt5qml5 libqt5quick5 libqt5quickwidgets5 libqt5sensors5
  libqt5sql5 libqt5sql5-sqlite libqt5svg5 libqt5test5 libqt5webchannel5 libqt5webkit5 libqt5widgets5 libqt5xml5 libquadmath0 librhash0 libset-scalar-perl
  libsqlite3-dev libstdc++-7-dev libtsan0 libubsan0 libuv1 libva-dev libva-drm2 libva-glx2 libva-wayland2 libva-x11-2 libva2 libvdpau-dev libvdpau1
  libvorbis-dev libwayland-bin libwayland-dev libwoff1 libx11-dev libx11-doc libx11-xcb-dev libx264-152 libx264-dev libxau-dev libxcb-dri2-0-dev
  libxcb-dri3-dev libxcb-glx0-dev libxcb-present-dev libxcb-randr0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev
  libxcb-xinerama0 libxcb1-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxshmfence-dev libxv-dev libxvidcore-dev libxvidcore4 libxxf86vm-dev
  linux-libc-dev make manpages-dev mesa-common-dev mesa-va-drivers mesa-vdpau-drivers pkg-config python3-distutils python3-lib2to3 qt5-assistant
  qt5-gtk-platformtheme qt5-qmake qt5-qmake-bin qtbase5-dev qtbase5-dev-tools qtchooser qttools5-dev-tools qttranslations5-l10n va-driver-all vdpau-driver-all
  x11proto-core-dev x11proto-damage-dev x11proto-dev x11proto-dri2-dev x11proto-fixes-dev x11proto-gl-dev x11proto-xext-dev x11proto-xf86vidmode-dev
  xorg-sgml-doctools xtrans-dev yasm zlib1g-dev

Jan Gruuthuse

Reading state information... Done
The following additional packages will be installed:
Suggested packages:
The following NEW packages will be installed:
  libx265-146 libx265-dev
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 1636 kB of archives.
After this operation, 16,3 MB of additional disk space will be used

take note:
QuoteReading state information

Quote** ALL DONE **
** The installable packages are in the debs folder **

Jan Gruuthuse

QuoteTWOLAME        No : libtwolame-dev
FDK_AAC        No : libfdk-aac-dev
opencore-amrnb No : libopencore-amrnb-dev
opencore-amrwb No : libopencore-amrwb-dev

sudo apt-get install libtwolame-dev libfdk-aac-dev libopencore-amrnb-dev libopencore-amrwb-dev

Jan Gruuthuse

sudo apt-get install nvidia-cuda-toolkit libnvidia-encode-390

Search your system for: nvEncodeAPI.h.

When found, copy  nvEncodeAPI.h as root  into /usr/include/x86_64-linux-gnu

when building from git, terminal should show:
***  Optional Library  ***
***      Summary       ***
*** Video Encoder      ***
    NVENC          Yes

Jan Gruuthuse

June 12, 2018, 08:31:09 am #6 Last Edit: June 12, 2018, 08:41:23 am by Jan Gruuthuse
check if Video Acceleration (VA) API for Linux -- info program is installed: dpkg -l vainfo
if not install: sudo apt-get install vainfo

check libva info:
Quotelibva info: VA-API version 1.1.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

sudo apt-get install vdpau-va-driver

Quotevainfo: VA-API version: 1.1 (libva 2.1.0)
vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA-API - 0.7.4
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :   VAEntrypointVLD
      VAProfileMPEG2Main              :   VAEntrypointVLD
      VAProfileMPEG4Simple            :   VAEntrypointVLD
      VAProfileMPEG4AdvancedSimple    :   VAEntrypointVLD
      <unknown profile>               :   VAEntrypointVLD
      VAProfileH264Main               :   VAEntrypointVLD
      VAProfileH264High               :   VAEntrypointVLD
      VAProfileVC1Simple              :   VAEntrypointVLD
      VAProfileVC1Main                :   VAEntrypointVLD
      VAProfileVC1Advanced            :   VAEntrypointVLD

Jan Gruuthuse

libsamplerate installs only if Jack is found.
sudo apt-get install  libjack-dev libsamplerate0-dev

Jan Gruuthuse

March 20, 2019, 10:27:09 am #8 Last Edit: March 20, 2019, 10:49:07 am by Jan Gruuthuse
Checkout the ffmpeg4x branch, which contains the current code (the master branch is far behind at the moment):
cd ~/avidemux2 && git checkout ffmpeg4x
if you're coming from master:
git pull
Check if these dependencies are there and uptodate:
sudo apt-get install libass-dev liba52-0.7.4-dev libmad0-dev libmp4v2-dev

If you have recent NVIDIA graphics card
You would need to clone nv-codec-headers for that:
cd ~ && git clone https://github.com/FFmpeg/nv-codec-headers
if NVIDIA driver version is => 390
cd ~/nv-codec-headers
git checkout sdk/8.1
sudo make install

proceed as before.

Thanks to the developers

source eumagga0x2a: Re: Subtitles filter disappeared

Tested with:

Description:   Ubuntu 18.04.2 LTS
Release:   18.04
Codename:   bionic
Bit:            64
Desktop:        ubuntu:GNOME

NVIDIA VDPAU Driver Shared Library  396.54


git master is now more current than ffmpeg4x branch.
But master, in recent update 6 days ago (commit 3a992b2), appears to have broken avidemux/qt4/i18n/ directory contents (directory is empty) meaning cannot compile.

CMake Error at i18n/CMakeLists.txt:2 (INCLUDE):
  INCLUDE could not find load file:


CMake Error at i18n/CMakeLists.txt:3 (COMPILE_TS_FILES):
  Unknown CMake command "COMPILE_TS_FILES".


You must do

git submodule update --init --recursive

once, then use

git pull --recurse

to include eventual changes in the i18n repo, where translations now reside.


I compiled Avidemux following steps in this thread but it the version is 2.7.3.
Is there a git with newer version? Nightly builds are 2.7.5.


You've probably checked out the old ffmpeg4x branch. It was used in the fall of 2018 to implement necessary changes for a major ffmpeg update. You need to checkout the master branch (in other words, you should not checkout ffmpeg4x).

git checkout master


Thank you very much for such a quick and helpful reply - it works :-)