Page 1 of 1

Ubuntu Desktop Install and Integration with VLC

Posted: Tue Aug 11, 2020 5:14 pm
by MetalDave
I am running the latest Ubuntu Desktop distribution (Ubuntu 20.04.1 LTS). I have used the Snap package manager to install MakeMKV v1.15.2. All appears to work fine, but I noticed the supporting files are not being installed correctly for use with VLC and the like.

As it would appear the Integration tab only works with the Windows and Mac ports of MakeMKV (based on a thread discussing the introduction of libmmbd with MakeMKV v1.15.0), I believe manual intervention is required to achieve the same level of integration. This is no big deal as I'd been doing this prior to v1.15.0, so I'm familar with the process.

In the Direct Blu-ray playback with VLC thread, Mike provides instructions to create a symbolic link for in our local user library path (/usr/lib/). Assumedly, this location enables the functionality for all users on the system (rather than just installing into the ~/lib/ directory for your user only). However, I'm wondering if we're missing a couple of steps as I have VLC complaining that it cannot find libaacs for Blu-ray disc playback.

In prior versions of the application, we needed to create respective symlink aliases for libaacs or libbdplus (both pointing to libmmbd). With the introduction of the Integration tab, these symlinks were created silently in the background. For example, use of the Integration tab on macOS appears to create those aliases in the user's home folder (~/lib/) pointing back to libmmbd as follows:

Code: Select all

 ~ % ll lib
total 0
drwxr-xr-x   4 username  staff   128B Apr 29 15:45 ./
drwxr-xr-x+ 35 username  staff   1.1K Aug 11 09:41 ../
lrwxr-xr-x   1 username  staff    56B Apr 29 15:45 libaacs.dylib@ -> /Applications/
lrwxr-xr-x   1 username  staff    56B Apr 29 15:45 libbdplus.dylib@ -> /Applications/
 ~ % 
As shown, macOS uses the '.dylib' extension on that OS. I'm not familiar with the naming scheme on Ubuntu, but I'm guessing the extension is '.so.0' per the example in the instructions provided by Mike. If that's the case, shouldn't we also have symlinks for libaacs and libbdplus in the /usr/lib/ directory?

To be direct: is it as simple as creating a symlink called /usr/lib/ and /usr/lib/ to at the MakeMKV installation location? Do we think the installation from Snap has crated some other fundamental problem? Would a complete compile do something different to fix the issue?

A little background: I am new to Ubuntu, but familiar with Linux. I'm exploring the use of Ubuntu Desktop as my OS of choice for an encoding system. This rig is, effectively, an appliance to do nothing but rip discs and encode. I'm hoping to avoid Windows altogether, and I believe the core tools I use (FFMPEG, MakeMKV, Handbrake, etc.) all offer a Linux port.

Re: Ubuntu Desktop Install and Integration with VLC

Posted: Wed Aug 12, 2020 10:46 am
by Atlas2000
Hello, you can install VLC Player in software flathub and then the extensions for Bluray java menus and encoding plugin and Makemkv plugin for VLC player. have picture attached works perfectly without copying libmbd.
Have fun everyone. mfg Atlas2000

Re: Ubuntu Desktop Install and Integration with VLC

Posted: Wed Aug 12, 2020 2:35 pm
by MetalDave

Thanks for the feedback. That's an interesting approach to address multiple areas.

First, I've heard of Flatpak as an alternative to the Ubuntu built-in Snap package manager. Similar to Snap, it doesn't look like the developers themselves are creating the distributions on Flathub in the majority of the cases. Notably, MakeMKV and VLC are community distributed. While I can find the plugins you've indicated via the GitHub repository for flathub, they don't appear to be available in the Flatpak package manager at this time. I speculate they're not maintained as the MakeMKV Plug-in for VLC hasn't been touched in 14 months (since MakeMKV v1.14.4). It looks like the same goes for the FDK-AAC Encoding (fdkaac) and Blu-ray Disc Java (bdj) plugins. That's the problem with community-driven publishing; You get the convenience, but you have no guarantee of the latest and greatest from the Developer.

Getting to the core issues, it appears the MakeMKV Plugin is, indeed, just manipulating libmmbd and creating paths to that library and makemkvcon per the code on GitHub:

Code: Select all


export LIBAACS_PATH=/app/share/vlc/extra/makemkv/lib/libmmbd
export LIBBDPLUS_PATH=/app/share/vlc/extra/makemkv/lib/libmmbd
export MAKEMKVCON=/app/share/vlc/extra/makemkv/bin/makemkvcon
Thus, there's nothing new going on behind the curtain. Perhaps the clue given here is that we need to go into the VLC directory and create some symlinks.

I'm also learning that installing software via Snap (and I expect similar with Flatpak) does not actually unpack the content of a .snap file. This is interesting as it allows for modular software and easy updates by using a static archive. I have installed VLC using Snap, and trying to find the extra directory indicated above has been a challenge. This might lend credence to avoiding the package manager altogether as it conflicts with the instructions provided by the developer. I like the concept, so I'm going to figure out where the variable data is stored (a la plug-ins).

I'll keep investigating until I have a solid set of steps. Thanks again for the feedback; At the very least, it provided some clues.

Re: Ubuntu Desktop Install and Integration with VLC

Posted: Thu Aug 27, 2020 6:08 am
by MetalDave
As I was unable to resolve the use of dynamic shared libraries with the Snap installation, I removed that application. As a next step, I installed the version from the focal repository. I used the apt package manager, but you can use the Ubuntu Software app manager to get this version via the GUI as well.

Using this method, the binary and the various packages dependencies directly into the filesystem (as you would expect). Additionally, various dynamic libraries are installed in /usr/lib/x86_64-linux-gnu/ (including older versions of libaacs and libbdplus). Installing and using additional libraries (or symlinks) in this location are easy enough and work without further intervention. I was able to get Blu-ray playback to work with libmmbd by building the symlinks for libaacs and libbdplus as follows:

Code: Select all

$ sudo rm /lib/x86_64-linux-gnu/ 
$ sudo ln -s /lib/ /lib/x86_64-linux-gnu/
$ sudo rm /lib/x86_64-linux-gnu/ 
$ sudo ln -s /lib/ /lib/x86_64-linux-gnu/

$ ll /lib/x86_64-linux-gnu/ 
lrwxrwxrwx 1 root root 17 Aug 26 22:36 /lib/x86_64-linux-gnu/ -> /lib/
$ ll /lib/x86_64-linux-gnu/
lrwxrwxrwx 1 root root 17 Aug 26 22:35 /lib/x86_64-linux-gnu/ -> /lib/
The only drawback to the focal distribution version is that it's a revision or two behind the version distributed via Snap (v3.0.9.2-1 versus v3.0.11). Now that I have confirmed the appropriate location of the dynamic libraries with a "normal" install of VLC, I may remove and try experimenting again with the Snap. After all, VideoLAN is maintaining the Snap method directly and there are other security benefits. If the /usr/lib/x86_64-linux-gnu/ is accessible to the snap RO filesystem via some type of aliasing, I may be able to manipulate the dynamic libraries again. I'll follow up with any findings, but this will get folks running with playback in the interim.