MakeMKV

Under the Advanced settings it is possible to tweak what MakeMKV is looking for when it rips a disc.

The original string is:

-sel:all,+sel:(favlang|nolang),-sel:mvcvideo,=100:all,-10:favlang

Which basically selects favourite language files and no language files, and deselects mvcvideo (3D) files. No idea what the bit on the end does but it does explain why my 3D films never worked properly.

From looking on the MakeMKV forum I’m now using:

-sel:all,+sel:(favlang|nolang|mvcvideo),=100:all,-10:favlang

which should let me rip 3D films and, now that I’ve sent falling to English, only selects the English tracks.

Ubuntu 24.04 on a Terra-Master T12-423

My reasons for putting Ubuntu are explained here: Confession Time and I’m using Ubuntu because that’s what Terra-Master use themselves so it should work just fine and it’s the distribution I’m slightly more familiar with at the moment. Debian would be my alternative choice.

First things first. Open up the case and remove the small SanDisk USB stick. This contains the TOS boot loader and we don’t want that anymore. Go and put it in a marked envelope in a drawer somewhere just in case you ever want to put it back.

Step 2 – not for the faint of heart. Update the BIOS. The full thread is here: https://forum.terra-master.com/en/viewtopic.php?t=4238 and with that done the rest is pretty straightforward.

Next we need to change the boot order. With the TOS USB stick removed that’s an awful lot easier. For some reason, for me at least, the TOS USB stick always took priority no matter what I did so with that out of the way it’s a lot easier to do things now.

I actually burned Ubuntu to DVD rather than a flash drive simply because I don’t think the flash drives I have are very reliable. They are incredibly slow for some reason too. So, I opted for DVD.

Slap the DVD in and run through the basic setup until the drive configuration page presents itself. Here choose the custom layout option. I have two Seagate IronWolf disks as my boot disks so I wanted a mirrored raid boot setup. Not having done that before I found a very easy to follow video (and I really hate having to follow videos) here:

Installing Ubuntu 24.04 With RAID

and a really useful page here:

Ubuntu 24.04 with software RAID1 and UEFI

The only changes to the process I made was to include in my four 10TB raid disks into the process. That means that at the end of the video I have a filesystem that looks something like:

md0 RAID1 /boot
md1 RAID1 SWAP
md2 RAID1 /root
md3 RAID5 /storage

It also means that as the storage is built at installation time I can just sit back and let the RAID configure itself for a few hours.

Because I always choose a minimised installation I need to add a few things in to make the environment usable so this is what I do:

sudo apt update
sudo apt install htop
sudo apt install avahi-daemon
sudo apt install vim
sudo apt install cron
sudo apt upgrade

Once cron and vim are installed I set up my lazy mdstat rebuild page.

I have a little web server with a basic html page of:

<!DOCTYPE html>
<html>
<head>
<title>
RAID Rebuild Status
</title>
<meta http-equiv="refresh" content="60" >
</head>
<body>
<embed src="raid.txt" width="100%" height="1000">
</body>
</html>

It’s really not much of a page. Then on the T12 I add in a cron job:

* * * * * cat /proc/mdstat | ssh ricardo@server.local 'cat - > /home/ricardo/docker/dumkid/html/raid.txt'

This means that I can point my phone / laptop / work computer to my little webpage and see how the rebuild is going without having to log in to the T12 itself.

Apple Screensavers

Putting this here so I don’t forget.

Hacking a ScreenSaver means swapping out an existing asset for a new one.

Use this location:

/Library/Application Support/com.apple.idleassetsd/Customer/4KSDR240FPS

Use this asset:

E161929C-0819-4BC2-8359-550C081C7D54

(Scottish Castle)

Xcode

I can never remember this so, to stop me having to constantly refer to my non-work computer, here is how to accept the new Xcode update:

sudo xcodebuild -licence accept

Ubuntu

As much as I love Docker (even though I’m not brilliant with it) sometimes I just need a proper server. In this case I need a nice shiny WebDav server with the ability to show web pages too.

I’m using Ubuntu for this because, as much as I like Debian, I find Ubuntu just that little bit easier to work with. Except Snap. Snap can burn in hell. The rest of it is pretty nice though.

The plan is to use Nginx as the web /WebDav server and if I can configure it up the way I need and get it doing everything I want I can then get the UNIX team at work to build me one for the office. I can’t help but wonder if they can manage that.

Ubuntu on USB

I can never remember how to do this and the Ubuntu pages are, surprisingly, useless. So, for future reference:

  • Download Ubuntu server from: https://ubuntu.com/download/server
  • Write it to a USB stick: dd if=ubuntu-24.04.1-live-server-amd64.iso of=/dev/disk2 bs=1m
  • Set PC to boot from USB stick
  • Boot.

In my case I’m using a small Dell OptiPlex 7070 Micro. So, to get into the BIOS it’s:

  • Boot
  • Hammer F2
  • General -> Advanced Boot Options -> Enable Legacy Option ROMs
  • General ->Boot Sequence -> Legacy External Devices
  • Reboot
  • Hammer F2
  • General -> Boot Sequence -> USB Storage Device

It should now be possible to boot from the USB stick.

When partitioning the disk don’t get confused between the USB stick filesystem and the PC filesystem. It’s pretty easy once you realise that the PC is NVME.

Fun with the Cambridge Audio CXN-v2

Buckle up, this is a ride.

First off, I have to say that I do love the Cambridge Audio kit, I’ve not got anything fancy, just a CXA-60, a CXN(v2), a CXN and a pair of SX-60s. I’ve been after some Cambridge Audio separates for ages since I originally saw them in Richer Sounds many years ago. When my small Panasonic network player died it was more costly to get it fixed than to buy a new one and, since it was cheaper to buy a new one, I just went for the CXA-60 and the CXN(v2) and kept the speakers I had. The Cambridge Audio stuff does sound truly fabulous and properly love it.

There’s just one (smallish) problem.

I use iTunes to rip all my media and Meta to keep the data tidy. The back end storage is a WD My Cloud Mirror Gen 2 running Twonky 8.1. Twonky isn’t perfect and sometimes it needs a helping hand to properly recognise all album tracks but I really like the sort order it uses and it’s pretty useful for media management.

Most discs tend to have data something like:

The Title, Track Number and Disc Number are the important fields.

With most albums the tracks play in the order they’re expected to, track 1, track2 track 3 etc.

However, there is a bit of a problem with multi-disc albums. For some reason the play order is not set. Sometimes track 1, disc 1 plays first and sometimes track 1 disc 2 plays first. The play order is always alphabetic. So, really, the sort order for multi-disc albums is track number followed by alphabetic sorting of the resultant list. For albums that have two discs this is irritating because the play order is completely out of sequence, for compilations that have around five discs this is a nightmare.

Because I’d given feedback on the Cambridge Audio app I was given the opportunity to do some beta testing with the new app. Naturally, I gave that a go.

One of the things I noticed was that the app displayed a different sort order to the CXN for multi-disc albums (the proper order) but when the album was played via the app the actual play order was different from the displayed play order. That was kind of annoying really.

Investigating things further I used my LG TV do navigate the album structure to see if the same problem occurred there too. The LG TV doesn’t play AIFF files though so, as far as the TV was concerned, there was no content in any of the directories I was looking at. I had to convert all the AIFF files to MP4 files and then the TV could see the files. Not only could the TV see the files but they were displayed and played in the correct order too. To my mind, this meant that the CXN was not asking for the disc number when generating a list of assets to play.

After much back-and-forth with Cambridge Audio support I managed to get the developers to take a look at the problem. The upshot there is that as the albums play correctly when played through a USB stick and other NAS (Synology in this case) there must be a problem with the WD NAS and the way it presents its data. I’m completely not convinced that is the case because the LG TV plays everything correctly and if there was a problem with the NAS that could not happen.

At this point I was thinking I should just buy a new NAS, especially as a disk has died in the WD one, but I’m just too stubborn to give up like that and, although I can’t seem to generate DLNA traffic, I wondered whether it would be possible to snoop the traffic between the CXN and the NAS. Turns out it totally is. I mirrored the NAS port and used my Mac to read all the traffic. Using a packet capture of:

tcpdump -i en5 port 9000 host wdmycloudmirror.local -XAvvv -w cxn.cap --print

Using Wireshark I managed to filter out the HTTP traffic and I could see that when the request came for the album details it looked like this:

<?xml version="1.0" ?>
<s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
	<s:Body>
		<u:Browse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">
			<ObjectID>0$1$12$18640</ObjectID>
			<BrowseFlag>BrowseDirectChildren</BrowseFlag>
			<Filter>dc:title,upnp:class,upnp:album,upnp:originalTrackNumber,id,res,res@protection,res@duration,upnp:searchClass,upnp:artist,upnp:genre,upnp:albumArtURI</Filter>
			<StartingIndex>0</StartingIndex>
			<RequestedCount>100</RequestedCount>
			<SortCriteria>+upnp:originalTrackNumber,+dc:title</SortCriteria>
		</u:Browse>
	</s:Body>
</s:Envelope>


Here it’s pretty easy to see that the sorting requested by the CXN is:

+upnp:originalTrackNumber,+dc:title

So it’s not asking for the disc number at all. The same request from the app looks like this:

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
	<s:Body>
		<u:Browse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">
			<ObjectID>0$1$12$18640</ObjectID>
			<BrowseFlag>BrowseDirectChildren</BrowseFlag>
			<Filter>*</Filter>
			<StartingIndex>0</StartingIndex>
			<RequestedCount>100</RequestedCount>
			<SortCriteria/>
		</u:Browse>
	</s:Body>
</s:Envelope>

Again, here it’s pretty easy to see that no sorting has been applied to the results. Also, no filtering has been applied to the original request either.

Now, not being a software developer I’m only making a suggestion here but I reckon that adding +pv:numberOfThisDisc to the filtering and sorting of the CXN requests would completely fix the problem with multi-disc albums. I’ve suggested that but it’s out of my hands and I just have to hope that my proposal is accepted…