Direct Blu-ray playback with VLC

The place to discuss linux version of MakeMKV
Post Reply
PresidentBrandon
Posts: 2
Joined: Mon Oct 31, 2022 12:15 am

Direct Blu-ray playback with VLC

Post by PresidentBrandon »

The official instructions (viewtopic.php?f=3&t=7009) did not work for me. I have the Flatpak MakeMKV installed, and I made, as instructed, a symlink:

Code: Select all

/usr/lib64/libmmbd.so.0
to:

Code: Select all

/var/lib/flatpak/app/com.makemkv.MakeMKV/x86_64/stable/active/files/lib/libmmbd.so.0
The exact line of code is this:

Code: Select all

sudo ln -s /var/lib/flatpak/app/com.makemkv.MakeMKV/x86_64/stable/active/files/lib/libmmbd.so.0 /usr/lib64/libmmbd.so.0
Anything else I may be missing? What am I doing wrong?
mopato4931
Posts: 4
Joined: Sun Dec 29, 2024 5:09 am

Re: Direct Blu-ray playback with VLC

Post by mopato4931 »

Not working for me too I would like to know please
georgesgiralt
Posts: 67
Joined: Thu Jun 04, 2020 12:40 pm

Re: Direct Blu-ray playback with VLC

Post by georgesgiralt »

Hello,
I'm not fluent on Flatpack software, but if what I know is true, flatpack software is tightly contained and fenced.
Your VLC software is not (or is into a different container and thus another fence...) so it can't "reach" the MakeMkv library needed to work with BluRays...
You'd better get the tarball version of MakeMkv and compile and install it yourself, then applying the trick to have VLC open BluRay discs....
If you do so, do not forget to remove the flatpack version of MakeMkv in order to avoid any mix up ....
Joel B
Posts: 5
Joined: Thu Aug 27, 2020 12:43 am

Re: Direct Blu-ray playback with VLC

Post by Joel B »

Nah you've got the right idea, but your VLC is not loading libraries from /usr/lib64/ apparently.

I just ended up fixing this same thing myself, setting up a new Linux system. On my older system I had done that kind of linking into /usr/lib/ but for whatever reason it didn't work on this new system. Instead of trying to figure out the right directory to link the library into, I took the opportunity to try out what I had been thinking would be a better solution. (I'd like to avoid messing with system library directories.)

NOTE: In my flatpak installation of MakeMKV, I don't have that "x86_64/stable" directory in the flatpak files path. In my case the files are instead under "x86_64/current". So I will be using "x86_64/current" in the examples below. Double-check which path is actually correct on your system... if yours really is using "stable" rather than "current", then just substitute in "stable" for "current" when you try this out.

OK so first of all, I tested launching VLC from a shell prompt with a command like this:

Code: Select all

  LD_LIBRARY_PATH=/var/lib/flatpak/app/com.makemkv.MakeMKV/current/active/files/lib vlc
That worked... VLC was able to play a Blu-ray disc.

So at this point, I could make an alias or wrapper script for launching VLC like this, if I wanted to launch it from the command line in the future. I did do that, adding this alias into my shell startup scripts:

Code: Select all

  alias vlc="LD_LIBRARY_PATH=/var/lib/flatpak/app/com.makemkv.MakeMKV/current/active/files/lib /usr/bin/vlc"
However usually I'd rather use the graphical application launcher to start VLC. To support that, I first made a local copy of the VLC app description ("desktop file"):

Code: Select all

  mkdir -p ~/.local/share/applications/
  cp /usr/share/applications/vlc.desktop ~/.local/share/applications/
Then I opened that local copy "~/.local/share/applications/vlc.desktop" in a text editor. Found the Exec line which looks like this:

Code: Select all

Exec=/usr/bin/vlc --started-from-file %U
and I changed it to look like this:

Code: Select all

Exec=env LD_LIBRARY_PATH=/var/lib/flatpak/app/com.makemkv.MakeMKV/current/active/files/lib /usr/bin/vlc --started-from-file %U
Saved those changes and exited the text editor.

Then I ran this command to make sure the launcher was aware of this local definition:

Code: Select all

  update-desktop-database ~/.local/share/applications/
And that should do it; VLC started from the application launcher can play Blu-ray.

(Remember to use "stable" instead of "current" in the paths above if that really is correct for your system.)
Joel B
Posts: 5
Joined: Thu Aug 27, 2020 12:43 am

Re: Direct Blu-ray playback with VLC

Post by Joel B »

And sorry, one more thing.

VLC also needs to be able to run "makemkvcon", which it can't easily do with the MakeMKV stuff all hiding inside the flatpak. I ended up creating a script in /usr/bin to do this for now... I'd like to put this script somewhere else outside of the system directories, like a local bin directory in my PATH, but I remember having issues with that in the past and I haven't gone back yet to investigate that more.

Anyway the process I used was:

First, use a text editor to create the makemkvcon script in /usr/bin. E.g. if using the "vi" editor:

Code: Select all

  sudo vi /usr/bin/makemkvcon
For the contents of that file, I put:

Code: Select all

#!/bin/sh
/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=makemkvcon com.makemkv.MakeMKV "$@"
Saved that and exited the text editor. Then make it executable:

Code: Select all

  sudo chmod +x /usr/bin/makemkvcon
That should make the makemkvcon command available. Can test it out by running it from the command line.
MrPenguin
Posts: 914
Joined: Thu Oct 19, 2023 11:31 pm

Re: Direct Blu-ray playback with VLC

Post by MrPenguin »

Joel B wrote:
Tue May 06, 2025 6:01 pm
Nah you've got the right idea, but your VLC is not loading libraries from /usr/lib64/ apparently.
AFAIK libbluray.so.2 needs to load libmmbd.so.0 dynamically. VLC itself doesn't load libmmbd explicitly, but implicitly via libbluray.

And yes, libmmbd is also just a front-end for makemkvcon.
Post Reply