zirias@
Developer
As I'm writing this,
Forget all of the following, I found a better way without a jail for building, see next post!
What I did so far to get it running:
There are still two problems though:

makemkvcon
is running on my FreeBSD 12.0-RELEASE desktop machine (not in a vm or linux-jail) and reading a title from a commercial bluray disk!Forget all of the following, I found a better way without a jail for building, see next post!
What I did so far to get it running:
- Build and install a kernel with GENERIC configuration plus
device sg
for Linux-compatible /dev/sg* devices. - Setup a devuan jail and build MakeMKV inside it, statically linked against ffmpeg. For the GUI/oss part, I used
--prefix=/opt/makemkv
and addedLDFLAGS
to search libraries at runtime in /opt/makemkv/lib and request a program interpreter /opt/makemkv/lib/ld-linux.so. To achieve the same formakemkvcon
, I used PatchELF. - Install makemkv-oss and makemkv-bin, the latter with
make PREFIX=/opt/makemkv install
. - Copy /opt/makemkv from the jail to the host system, copy the jail's program interpreter to /opt/makemkv/lib/ld-linux.so and all required libraries to /opt/makemkv/lib. At this point,
makemkvcon
on the host will run (display the help text), but won't detect any drives. makemkvcon
uses /sys/bus/scsi to find the drive, and unfortunately, linsysfs(5) doesn't provide it. So I faked it: Unmount /compat/linux/sys and create the dirs /compat/linux/sys/bus/scsi/devices, /compat/linux/sys/bus/scsi/drivers/sr, /compat/linux/sys/class/block and /compat/linux/sys/class/scsi_generic.- Identify your optical drive with
camcontrol devlist
. On my system, it's
Code:<HL-DT-ST BD-RE GGW-H20L YL04> at scbus1 target 0 lun 0 (sg0,cd0,pass1)
cd0
, my linux scsi-generic device issg0
, my bus is 1, target 0, lun 0. Now create the directories /compat/linux/sys/class/block/<blockdev> (e.g. /compat/linux/sys/class/block/cd0), /compat/linux/sys/class/scsi_generic/<sgdev> (e.g. .../sg0) and /compat/linux/sys/bus/scsi/devices/<bus>:0:<target>:<lun> (e.g. for me: /compat/linux/sys/bus/scsi/devices/1:0:0:0). Inside this device directory, create relative symlinks to your "block" and "scsi_generic" directories, looking like this:
Code:/compat/linux/sys/bus/scsi/devices/1:0:0:0: total 3 lrwxr-xr-x 1 root wheel 23 Apr 27 08:52 block -> ../../../../class/block lrwxr-xr-x 1 root wheel 30 Apr 27 08:47 scsi_generic -> ../../../../class/scsi_generic
Then do
Code:echo 5 >/compat/linux/sys/bus/scsi/devices/1:0:0:0/type touch /compat/linux/sys/class/block/cd0/dev touch /compat/linux/sys/class/scsi_generic/sg0/dev
makemkvcon
should find and use the drive. - Try
/opt/makemkv/bin/makemkvcon info disc:0
to get info on the disc currently in the drive,/opt/makemkv/bin/makemkvcon mkv disc:0 <n> /path/to/output
to save title<n>
as an .mkv file to the output path.
There are still two problems though:
makemkvcon
crashes and dumps core after every run (fortunately after doing its work correctly)makemkv
(the gui) won't run at allIt prints the following to the console:
Code:QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv_open failed QIconvCodec::convertToUnicode: using Latin-1 for conversion, iconv_open failed

Last edited: